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

perf(i18n): set the global default locales to "en" (#979)

Avoid missing labels caused by languages ​​outside of locales.
This commit is contained in:
Cotes Chung
2023-05-06 07:22:29 +08:00
parent aca79c1007
commit 61fdbcb83a
23 changed files with 417 additions and 342 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 and item.hidden != true' %}
@@ -58,7 +60,7 @@ layout: page
<div class="mr-auto">
<!-- posted date -->
<i class="far fa-calendar fa-fw"></i>
{% include datetime.html date=post.date %}
{% include datetime.html date=post.date lang=lang %}
<!-- categories -->
{% if post.categories.size > 0 %}
@@ -75,7 +77,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 }}</span>
<span>{{ site.data.locales[lang].post.pin_prompt }}</span>
</div>
{% endif %}
</div>