mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Add layout localization
This commit is contained in:
@@ -3,8 +3,8 @@ layout: page
|
||||
# The Archives of posts.
|
||||
---
|
||||
|
||||
|
||||
<div id="archives" class="pl-xl-2">
|
||||
|
||||
{% for post in site.posts %}
|
||||
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
|
||||
{% capture pre_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
|
||||
@@ -17,9 +17,10 @@ layout: page
|
||||
<li>
|
||||
<div>
|
||||
{% capture this_day %}{{ post.date | date: "%d" }}{% endcapture %}
|
||||
{% capture this_month %}{{ post.date | date: "%b" }}{% endcapture %}
|
||||
{% capture _mth_df %}{{ site.data.locales[site.lang].date_format.post.archive_month | default: "%b" }}{% endcapture %}
|
||||
{% capture this_month %}{{ post.date | date: _mth_df }}{% endcapture %}
|
||||
<span class="date day">{{ this_day }}</span>
|
||||
<span class="date month small text-muted">{{ this_month }}</span>
|
||||
<span class="date month small text-muted">{% include no-zero-date.html date_str=this_month %}</span>
|
||||
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user