From c4fb87b392a5c3e47e955162a56a1d9968078027 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 23 Dec 2018 15:59:00 +0100 Subject: [PATCH] add site specific meta keyword, description, author to head --- layouts/partials/head.html | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index d33f6ac..93fe545 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,11 +1,29 @@ - - {{ .Site.Title }} - {{ .Site.Params.longTitle }} - - - - - {{ range .AlternativeOutputFormats -}} - {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} - {{ end -}} + + {{- if .IsHome }} + {{- $author := index $.Site.Data.authors .Site.Params.author }} + {{- with .Site.Params.description }} + + {{- end }} + + {{- else if in .Page.URL "/posts/" }} + {{- with .Page.Description }} + + {{- end }} + {{- with .Page.Keywords }} + + {{- end }} + {{- with .Page.Params.Author }} + {{- $author := index $.Site.Data.authors . }} + + {{- end }} + {{- end }} + {{ .Site.Title }} - {{ .Site.Params.longTitle }} + + + + + {{- range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{- end }}