Add page.date.format config

This commit is contained in:
Will Faught
2023-01-28 19:46:58 -08:00
parent 2c2961c4d6
commit 4aadf777fb
3 changed files with 5 additions and 4 deletions

View File

@@ -7,8 +7,8 @@
{{ with $authors }}
<p class="{{ if $date }} {{ $gap }} {{ end }} {{ $authorsclass }}">{{ . }}</p>
{{ end }}
{{ with $date }}
{{ if $date }}
<p class="{{ $dateclass }}">
<time datetime="{{ .Format `2006-01-02` }}">{{ time.Format (site.Params.paige.page.date.format | default ":date_long") . }}</time>
<time datetime="{{ $date.Format `2006-01-02` }}">{{ time.Format (.Param "paige.page.date.format" | default ":date_long") $date }}</time>
</p>
{{ end }}