feat: localized time on cards
This commit is contained in:
parent
9a80850230
commit
55e67d1e27
5 changed files with 25 additions and 3 deletions
3
tags.njk
3
tags.njk
|
|
@ -19,7 +19,7 @@ layout: base.njk
|
|||
<li>
|
||||
<a href="{{ post.url }}" class="post-card">
|
||||
<h2>{{ post.data.title }}</h2>
|
||||
<time datetime="{{ post.date | dateTimeFormat }}">{{ post.date | dateTimeFormat }}</time>
|
||||
<time class="localizable-time" datetime="{{ post.data.createdAt | isoDateTime }}">{{ post.data.createdAt | dateTimeFormat }}</time>
|
||||
{% if post.data.description %}
|
||||
<p>{{ post.data.description }}</p>
|
||||
{% endif %}
|
||||
|
|
@ -36,6 +36,7 @@ layout: base.njk
|
|||
<li>
|
||||
<a href="/recipe/{{ recipe.data.recipeSlug }}/" class="post-card">
|
||||
<h2>{{ recipe.data.title }}</h2>
|
||||
<time class="localizable-time" datetime="{{ recipe.data.createdAt | isoDateTime }}">{{ recipe.data.createdAt | dateTimeFormat }}</time>
|
||||
{% if recipe.data.description %}
|
||||
<p>{{ recipe.data.description }}</p>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue