feat: formatted date times one website

This commit is contained in:
Leyla Becker 2026-02-19 16:32:11 -06:00
parent dffd14a19f
commit 927f13b623
5 changed files with 51 additions and 17 deletions

View file

@ -10,9 +10,9 @@ layout: base.njk
{% endif %}
<header class="post-header">
<h1>{{ title }}</h1>
<time datetime="{{ createdAt | dateTimeFormat }}">{{ createdAt | dateTimeFormat }}</time>
<time class="localizable-time" datetime="{{ createdAt | isoDateTime }}">{{ createdAt | dateTimeFormat }}</time>
{% if updatedAt and (updatedAt | isMoreThanHourAfter(createdAt)) %}
<p class="updated-at">Updated: <time datetime="{{ updatedAt | dateTimeFormat }}">{{ updatedAt | dateTimeFormat }}</time></p>
<p class="updated-at">Updated: <time class="localizable-time" datetime="{{ updatedAt | isoDateTime }}">{{ updatedAt | dateTimeFormat }}</time></p>
{% endif %}
</header>