summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorAlexis Hovorka <[email protected]>2022-10-25 10:59:23 -0600
committerAlexis Hovorka <[email protected]>2022-10-25 10:59:23 -0600
commit85d82f4dfce3f2b791cffb6e3bcf70e0d0c6df25 (patch)
treea2ea2fac2334669616e6307fc3bc9a0c2528ae65 /layouts
parent634301e45433bf06fcdae500d51275677e568adb (diff)
[feat] Add post dates
Diffstat (limited to 'layouts')
-rw-r--r--layouts/post.njk4
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/post.njk b/layouts/post.njk
index 0c0e4a9..53deceb 100644
--- a/layouts/post.njk
+++ b/layouts/post.njk
@@ -4,10 +4,12 @@ layout: page.njk
<a id="up" title="Home" aria-label="Home" href="/"></a>
<a id="back" title="Back" aria-label="Back" href="javascript:history.back()"></a>
<h1>{{ title }}</h1>
+ {%- set postDate = date.toISOString().slice(0,10) %}
+ <p class="post-date"><time datetime="{{ postDate }}">{{ postDate }}</time></p>
{%- if heroImg %}
<img class="hero" src="{{ heroImg }}" alt="{{ heroImgAlt }}">
- {% endif -%}
+ {%- endif %}
{{ content | safe }}