feat: localized time on cards
This commit is contained in:
parent
9a80850230
commit
55e67d1e27
5 changed files with 25 additions and 3 deletions
|
|
@ -22,7 +22,7 @@ description: Welcome to my website! I write about tech, politics, food, and hobb
|
|||
<li>
|
||||
<a href="{{ post.url }}" class="post-card">
|
||||
<h2>{{ post.data.title }}</h2>
|
||||
<time datetime="{{ post.data.createdAt | dateTimeFormat }}">{{ post.data.createdAt | 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 %}
|
||||
|
|
@ -54,6 +54,7 @@ description: Welcome to my website! I write about tech, politics, food, and hobb
|
|||
<li>
|
||||
<a href="/recipe/{{ recipe.slug }}/" class="post-card">
|
||||
<h2>{{ recipe.data.newest.data.title }}</h2>
|
||||
<time class="localizable-time" datetime="{{ recipe.data.newest.data.createdAt | isoDateTime }}">{{ recipe.data.newest.data.createdAt | dateTimeFormat }}</time>
|
||||
{% if recipe.data.newest.data.description %}
|
||||
<p>{{ recipe.data.newest.data.description }}</p>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue