From cd9afef68d82c8348d4ab31ebf71c8613c3dde4c Mon Sep 17 00:00:00 2001 From: bbb Date: Sun, 23 Feb 2025 11:31:02 +0100 Subject: [PATCH] Add dates and tags to blog posts and fix date formating so it's localized --- themes/datacoop2020/layouts/_default/list.html | 5 +---- themes/datacoop2020/layouts/blog/single.html | 11 +++++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 themes/datacoop2020/layouts/blog/single.html diff --git a/themes/datacoop2020/layouts/_default/list.html b/themes/datacoop2020/layouts/_default/list.html index 54925c5..f68d2f8 100644 --- a/themes/datacoop2020/layouts/_default/list.html +++ b/themes/datacoop2020/layouts/_default/list.html @@ -8,10 +8,7 @@ {{ range $pages.ByPublishDate.Reverse }}

{{ .Title | markdownify }} - {{ $customDateFormat := "January 2, 2006" }} - {{ with .Site.Params.customDateFormat }}{{ $customDateFormat = . }}{{ end }} -
- {{ .PublishDate.Format $customDateFormat }} + {{ .PublishDate | time.Format ":date_medium" }} {{ partial "tags" . }} {{ if eq .Site.Params.showPostSummary true }}
diff --git a/themes/datacoop2020/layouts/blog/single.html b/themes/datacoop2020/layouts/blog/single.html new file mode 100644 index 0000000..d376bbd --- /dev/null +++ b/themes/datacoop2020/layouts/blog/single.html @@ -0,0 +1,11 @@ +{{- define "main" -}} + +

{{ .Title | markdownify }}

+ +{{ .PublishDate | time.Format ":date_medium" }} +{{ partial "tags" . }} + + +{{ .Content }} + +{{- end -}}