diff options
author | breadcat | 2020-06-28 13:00:32 +0100 |
---|---|---|
committer | breadcat | 2020-06-28 13:00:32 +0100 |
commit | 94d7804535e38c737658dca06fda209cc8c81daf (patch) | |
tree | 12d3ba35cc9299a70b34b8fd0c8da841bb223780 /themes/Brine | |
parent | 0a707292bde7f658868ccc3790fbd1648429de67 (diff) | |
download | blog.minskio.co.uk-94d7804535e38c737658dca06fda209cc8c81daf.tar.gz blog.minskio.co.uk-94d7804535e38c737658dca06fda209cc8c81daf.tar.bz2 blog.minskio.co.uk-94d7804535e38c737658dca06fda209cc8c81daf.zip |
Merge page and single layouts
Using if statements, no less
Diffstat (limited to 'themes/Brine')
-rw-r--r-- | themes/Brine/layouts/_default/page.html | 3 | ||||
-rw-r--r-- | themes/Brine/layouts/_default/single.html | 4 |
2 files changed, 2 insertions, 5 deletions
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" }} <h1>{{ .Title }}</h1> - <div>Reading time: {{ .ReadingTime }} min</div> - {{ .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" }} <h1>{{ .Title }}</h1> - <div>Published: {{ .PublishDate.Format "Jan 2, 2006" }}{{ if ne .Lastmod .PublishDate }}, last updated: {{ .Lastmod.Format "Jan 2, 2006" }}{{ end }}</div> +{{ define "main" }} <h1>{{ .Title }}</h1>{{ if .PublishDate }} + <div>Published: {{ .PublishDate.Format "Jan 2, 2006" }}{{ if ne .Lastmod .PublishDate }}, last updated: {{ .Lastmod.Format "Jan 2, 2006" }}{{ end }}</div>{{ end }} <div>Reading time: {{ .ReadingTime }} min</div>{{- with .Params.tags -}} <div>Tags: {{ range . -}}{{- with $.Site.GetPage (printf "/%s/%s" "tags" . ) -}}<a href="{{ .Permalink }}">{{ .Title }}</a> {{- end -}}{{- end -}}</div>{{- end -}} {{ .Content }}{{ end }} |