fix date format consistency

This commit is contained in:
mose 2017-08-31 21:16:26 +08:00
parent adcafc6f7c
commit 020df8f8fc
3 changed files with 33 additions and 1 deletions

26
_data/fr.yml Normal file
View File

@ -0,0 +1,26 @@
months:
- Janvier
- Février
- Mars
- Avril
- Mai
- Juin
- Juillet
- Aout
- Septembre
- Octobre
- Novembre
- Décembre
shortmonths:
- Jan
- Fév
- Mars
- Avr
- Mai
- Juin
- Juil
- Aout
- Sep
- Oct
- Nov
- Déc

6
_includes/i18n_date.html Normal file
View File

@ -0,0 +1,6 @@
{% capture i18n_date %}
{{ page.date | date: "%-d" }}
{% assign m = page.date | date: "%-m" | minus: 1 %}
{{ site.data.fr.months[m] }}
{{ page.date | date: "%Y" }}
{% endcapture %}

View File

@ -16,7 +16,7 @@ category: base
<h2 id="{{ this_word }}">{{ this_word }}</h2>
<ul class="post-list">
{% for post in site.categories[this_word] %}{% if post.title != null %}
<li><a href="{{ site.url }}{{ post.url }}">{{ post.title }}<span class="entry-date"><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%b %d, %Y" }}</time></span></a>
<li><a href="{{ site.url }}{{ post.url }}">{{ post.title }}<span class="entry-date"><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_string }}</time></span></a>
<div class="description">
{{ post.description | markdownify | remove: '<p>' | remove: '</p>' }}
<a href="{{ site.url }}{{ post.url }}" class="readmore">lire la suite</a>