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

@@ -4,7 +4,7 @@
{% assign MAX_SIZE = 5 %}
{% assign all_list = "" | split: "" %}
{% assign all_list = '' | split: '' %}
{% for post in site.posts %}
{% if post.last_modified_at %}
@@ -17,24 +17,25 @@
{% assign all_list = all_list | sort | reverse %}
{% assign update_list = "" | split: "" %}
{% assign update_list = '' | split: '' %}
{% for entry in all_list limit:MAX_SIZE %}
{% for entry in all_list limit: MAX_SIZE %}
{% assign update_list = update_list | push: entry %}
{% endfor %}
{% if update_list.size > 0 %}
<div id="access-lastmod" class="post">
<div class="panel-heading">{{- site.data.locales[site.lang].panel.lastmod -}}</div>
<div class="panel-heading">{{- site.data.locales[include.lang].panel.lastmod -}}</div>
<ul class="post-content pl-0 pb-1 ml-1 mt-2">
{% for item in update_list %}
{% assign index = item | split: "::" | last | plus: 0 %}
{% assign index = item | split: '::' | last | plus: 0 %}
{% assign post = site.posts[index] %}
{% assign url = post.url | relative_url %}
<li><a href="{{ url }}">{{ post.title }}</a></li>
<li>
<a href="{{ url }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
</div> <!-- #access-lastmod -->
</div>
<!-- #access-lastmod -->
{% endif %}