feat: updated date formatting logic
This commit is contained in:
parent
7b5f3adee9
commit
a849a028ec
5 changed files with 8 additions and 8 deletions
|
|
@ -5,9 +5,9 @@ layout: base.njk
|
|||
<article class="blog-post">
|
||||
<header class="post-header">
|
||||
<h1>{{ title }}</h1>
|
||||
<time datetime="{{ createdAt | dateFormat }}">{{ createdAt | dateFormat }}</time>
|
||||
<time datetime="{{ createdAt | dateTimeFormat }}">{{ createdAt | dateTimeFormat }}</time>
|
||||
{% if updatedAt and (updatedAt | isMoreThanHourAfter(createdAt)) %}
|
||||
<p class="updated-at">Updated: <time datetime="{{ updatedAt | dateFormat }}">{{ updatedAt | dateFormat }}</time></p>
|
||||
<p class="updated-at">Updated: <time datetime="{{ updatedAt | dateTimeFormat }}">{{ updatedAt | dateTimeFormat }}</time></p>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue