From 94d7804535e38c737658dca06fda209cc8c81daf Mon Sep 17 00:00:00 2001 From: breadcat Date: Sun, 28 Jun 2020 13:00:32 +0100 Subject: Merge page and single layouts Using if statements, no less --- themes/Brine/layouts/_default/page.html | 3 --- themes/Brine/layouts/_default/single.html | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 themes/Brine/layouts/_default/page.html (limited to 'themes') diff --git a/themes/Brine/layouts/_default/page.html b/themes/Brine/layouts/_default/page.html deleted file mode 100644 index e32b8d9..0000000 --- a/themes/Brine/layouts/_default/page.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ define "main" }}

{{ .Title }}

-
Reading time: {{ .ReadingTime }} min
- {{ .Content }}{{ end }} diff --git a/themes/Brine/layouts/_default/single.html b/themes/Brine/layouts/_default/single.html index 9adb790..eb13967 100644 --- a/themes/Brine/layouts/_default/single.html +++ b/themes/Brine/layouts/_default/single.html @@ -1,5 +1,5 @@ -{{ define "main" }}

{{ .Title }}

-
Published: {{ .PublishDate.Format "Jan 2, 2006" }}{{ if ne .Lastmod .PublishDate }}, last updated: {{ .Lastmod.Format "Jan 2, 2006" }}{{ end }}
+{{ define "main" }}

{{ .Title }}

{{ if .PublishDate }} +
Published: {{ .PublishDate.Format "Jan 2, 2006" }}{{ if ne .Lastmod .PublishDate }}, last updated: {{ .Lastmod.Format "Jan 2, 2006" }}{{ end }}
{{ end }}
Reading time: {{ .ReadingTime }} min
{{- with .Params.tags -}}
Tags: {{ range . -}}{{- with $.Site.GetPage (printf "/%s/%s" "tags" . ) -}}{{ .Title }} {{- end -}}{{- end -}}
{{- end -}} {{ .Content }}{{ end }} -- cgit v1.2.3