From 20b3218aab776a85c03a33a8969d44b81cf9fa31 Mon Sep 17 00:00:00 2001 From: surtur Date: Thu, 1 Sep 2022 03:08:03 +0200 Subject: [PATCH] layouts(posts): add lastmod if set --- layouts/posts/single.html | 77 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 layouts/posts/single.html diff --git a/layouts/posts/single.html b/layouts/posts/single.html new file mode 100644 index 0000000..a593575 --- /dev/null +++ b/layouts/posts/single.html @@ -0,0 +1,77 @@ +{{ define "head" }} + {{ if .Params.featuredImg -}} + + {{- else if .Params.images -}} + {{- range first 1 .Params.images -}} + + {{- end -}} + {{- end -}} +{{ end }} + +{{ define "header" }} +{{ partial "header.html" . }} +{{ end }} + +{{ define "main" }} + {{- if (or .Params.images .Params.featuredImg) }} +
+ {{- end }} +
+
+
+ +

{{ .Title }}

+
+
+ {{ .Content | replaceRE "()" `${1}${3}` | safeHTML }} +
+ {{- if .Site.Params.relatedPosts }} + {{- partial "related-posts.html" . -}} + {{- end }} +
+
+ {{- with $.Param "author" }} +

{{ . }}

+ {{- end }} + {{- with .Params.tags }} +

+ + {{- range . -}} + {{.}} + {{- end }} +

+ {{- end }} +

{{ i18n "wordCount" . }}

+

{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}{{- if .Lastmod }} (last modified {{ dateFormat .Site.Params.dateformNumTime .Lastmod }}){{- end -}}

+ {{- if and .GitInfo .Site.Params.gitUrl }} +

{{ .GitInfo.AbbreviatedHash }} @ {{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}

+ {{- end }} +
+
+ {{- if .Params.toc }} + + {{- end }} +
+ {{- with .NextInSection }} + + {{- end }} + {{- with .PrevInSection }} + + {{- end }} +
+
+ {{- partial "comments.html" . -}} +
+
+{{ end }} + +{{ define "footer" }} +{{ partialCached "footer.html" . }} +{{ end }}