1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Improve the way to set the default value of locales

This commit is contained in:
Cotes Chung
2021-08-01 21:54:27 +08:00
parent 780af9ac5f
commit 0213331a16
23 changed files with 87 additions and 60 deletions

View File

@@ -3,6 +3,8 @@ layout: page
# The Home page layout
---
{% include lang.html %}
{% assign pinned = site.posts | where: "pin", "true" %}
{% assign default = site.posts | where_exp: "item", "item.pin != true" %}
@@ -78,7 +80,7 @@ layout: page
{% if post.pin %}
<div class="pin">
<i class="fas fa-thumbtack fa-fw"></i>
<span>{{ site.data.locales[site.lang].post.pin_prompt | default: 'Pinned' }}</span>
<span>{{ site.data.locales[lang].post.pin_prompt }}</span>
</div>
{% endif %}