summaryrefslogtreecommitdiffstats
path: root/layouts/partials/sidebar.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/sidebar.html')
-rw-r--r--layouts/partials/sidebar.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 483e90b..5562215 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -17,6 +17,26 @@
<i data-feather="user" class="w-4 h-4 shrink-0" aria-hidden="true"></i>
<span>{{ .Site.Params.author }}</span>
</li>
+ {{ if .PublishDate }}
+ <li class="flex items-center gap-2">
+ <i data-feather="calendar" class="w-4 h-4 shrink-0" aria-hidden="true"></i>
+ <time datetime="{{ .PublishDate.Format "2006-01-02T15:04:05Z07:00" }}">
+ {{ .PublishDate.Format "Jan 2, 2006" }}
+ </time>
+ </li>
+ {{ end }}
+ {{ if .Lastmod }}
+ {{ $lastmodDate := .Lastmod.Format "2006-01-02" }}
+ {{ $pubDate := .PublishDate.Format "2006-01-02" }}
+ {{ if ne $lastmodDate $pubDate }}
+ <li class="flex items-center gap-2">
+ <i data-feather="edit-2" class="w-4 h-4 shrink-0" aria-hidden="true"></i>
+ <time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">
+ {{ .Lastmod.Format "Jan 2, 2006" }}
+ </time>
+ </li>
+ {{ end }}
+ {{ end }}
<li class="flex items-center gap-2">
<i data-feather="file-text" class="w-4 h-4 shrink-0" aria-hidden="true"></i>
<span>{{ .WordCount }} {{ i18n "words" }}</span>