diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index f1e2252..69f514d 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - + {{- partial "head.html" . -}} {{- partial "header.html" . -}} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index abe664f..c26af0f 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -3,6 +3,7 @@ {{ .Title }} | {{ .Site.Title }} + {{- partial "metadata.html" . -}} {{ if .Site.IsServer }} {{ $options := (dict "targetPath" "styles.css" "enableSourceMap" true) }} {{ $styles := resources.Get "scss/main.scss" | toCSS $options }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 37dee05..becbb89 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -14,7 +14,6 @@ {{ if .IsPage }} / rss {{ end }} - diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html new file mode 100644 index 0000000..68e44e7 --- /dev/null +++ b/layouts/partials/metadata.html @@ -0,0 +1,35 @@ + + + + + + +{{ if .IsNode }} + +{{ end }} +{{ if .IsPage }} + + + + + {{ if (and (isset .Params "lastmod") (gt (dateFormat "2016-01-02" (.Lastmod)) (dateFormat "2006-01-02" (.PublishDate)))) }} + + {{ end }} + + {{ if (and (isset .Params "lastmod") (gt (dateFormat "2016-01-02" (.Lastmod)) (dateFormat "2006-01-02" (.PublishDate)))) }} + + {{ end }} + {{ with .Params.categories }} + {{ range . }} + + {{ end }} + {{ end }} + {{ with .Params.tags }} + {{ range . }} + + {{ end }} + {{ end }} +{{ end }} diff --git a/layouts/partials/post-info.html b/layouts/partials/post-info.html index e83bb26..89592bf 100644 --- a/layouts/partials/post-info.html +++ b/layouts/partials/post-info.html @@ -1,9 +1,6 @@ -{{ $LastmodFormatted := dateFormat "2006-01-02" (.Lastmod) }} -{{ $PublishdateFormatted := dateFormat "2006-01-02" (.PublishDate) }} -