diff options
| author | Arne Rief <riearn@proton.me> | 2025-09-15 17:11:49 +0200 |
|---|---|---|
| committer | Arne Rief <riearn@proton.me> | 2025-09-15 17:11:49 +0200 |
| commit | bea135e9b4945cf58a066e88de7bcc24605761de (patch) | |
| tree | 84da5c1b2d5e73aa17ad338322c9a71eb51979bc /layouts/_default/single.html | |
| parent | afc1f095745a548ff400f187d53bc1570f02bcf2 (diff) | |
Scroll to top, conditional date on posts
Diffstat (limited to 'layouts/_default/single.html')
| -rw-r--r-- | layouts/_default/single.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index dba5a10..e1728d3 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,9 +4,11 @@ <h1 class="post__headline"> {{ .Title }} </h1> - <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" class="post__publish-date"> - {{ .Date | time.Format ":date_medium" }} + {{- with .Date }} + <time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}" class="post__publish-date"> + {{ . | time.Format ":date_medium" }} </time> + {{- end }} </header> <div class="post__content"> |
