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

Improve local datetime display

- Protect author's location privacy
- Reduce locale configuration parameters
This commit is contained in:
Cotes Chung
2022-01-26 22:06:44 +08:00
parent a24545ed60
commit a5d38e7fbc
26 changed files with 165 additions and 196 deletions

View File

@@ -13,13 +13,13 @@ layout: page
</h1>
<ul class="post-content pl-0">
{% assign post_df = site.data.locales[lang].date_format.post.long %}
{% for post in page.posts %}
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
<span class="dash flex-grow-1"></span>
<span class="text-muted small">{{ post.date | date: post_df }}</span>
<span class="text-muted small" data-ts="{{ post.date | date: '%s' }}" data-df="ll">
{{ post.date | date: '%Y-%m-%d' }}
</span>
</li>
{% endfor %}
</ul>