From 0fe83522333875de275d3b63fc6d195ca404f7b6 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sat, 10 Dec 2022 12:18:10 -0500 Subject: [PATCH] update theme to only show modified date if its different than post date ; add ability to add 'changelog' header to notes/recipes --- themes/gochowdown/layouts/notes/single.html | 19 ++++++++++++++++++- themes/gochowdown/layouts/recipes/single.html | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/themes/gochowdown/layouts/notes/single.html b/themes/gochowdown/layouts/notes/single.html index c847242..b184529 100644 --- a/themes/gochowdown/layouts/notes/single.html +++ b/themes/gochowdown/layouts/notes/single.html @@ -12,7 +12,10 @@
- Published: {{ .PublishDate.Format "January 2, 2006" }} • Last Updated: {{ .Lastmod.Format "January 2, 2006" }} + Published: {{ .PublishDate.Format "January 2, 2006" }} + {{ if ne .PublishDate .Lastmod }} + • Last Updated: {{ .Lastmod.Format "January 2, 2006" }} + {{ end }}
@@ -27,6 +30,20 @@ {{ with .Params.Tags }}{{ partial "taxonomy/tags" . }}{{ end }}
+ {{ if .Params.changelog }} +
+
+

Changelog

+
+ {{ range .Params.changelog }} +
{{ .changedate }}
+
{{ .change }}
+ {{ end }} +
+
+
+ {{ end }} +
{{.Content}}
diff --git a/themes/gochowdown/layouts/recipes/single.html b/themes/gochowdown/layouts/recipes/single.html index 1ed8e9f..6a17683 100644 --- a/themes/gochowdown/layouts/recipes/single.html +++ b/themes/gochowdown/layouts/recipes/single.html @@ -12,7 +12,10 @@
- Published: {{ .PublishDate.Format "January 2, 2006" }} • Last Updated: {{ .Lastmod.Format "January 2, 2006" }} + Published: {{ .PublishDate.Format "January 2, 2006" }} + {{ if ne .PublishDate .Lastmod }} + • Last Updated: {{ .Lastmod.Format "January 2, 2006" }} + {{ end }}
Chef: @@ -37,6 +40,20 @@ {{ end }}
+ {{ if .Params.changelog }} +
+
+

Changelog

+
+ {{ range .Params.changelog }} +
{{ .changedate }}
+
{{ .change }}
+ {{ end }} +
+
+
+ {{ end }} +