feat: add parameter geekdocPageLastmod (#895)

This commit is contained in:
Robert Kaussow 2024-10-07 21:14:17 +02:00 committed by GitHub
parent bb6cf716b5
commit 15d3e40cdf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,13 @@
{{- $showPageLastmod := (or (default false .Page.Params.geekdocPageLastmod) (default false .Site.Params.geekdocPageLastmod)) -}}
{{- if $showPageLastmod -}}
<span class="flex align-center no-wrap">
<svg class="gdoc-icon gdoc_date"><use xlink:href="#gdoc_date"></use></svg>
<time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
{{ if .Lastmod.After (.Date.AddDate 0 0 1) }}
{{ i18n "posts_update_prefix" }}
{{ end }}
{{ .Lastmod.Format "Jan 2, 2006" }}
</time>
</span>
{{- end -}}