diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 80b5e2ff..f464cb7b 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -8,14 +8,24 @@ {{ .Hugo.Generator }} {{ with .Site.Params.name }}{{ end }} - {{ with .Site.Params.role }}{{ end }} + + {{ $scr := .Scratch }} + {{/* Generate page description. */}} + {{ $scr.Set "description" .Site.Params.role }} + {{ if .IsPage }} + {{ if .Params.abstract }} + {{ $scr.Set "description" .Params.abstract }} + {{ else }} + {{ $scr.Set "description" .Summary }} + {{ end }} + {{ end }} + {{ range .Translations }} {{ end }} - {{ $scr := .Scratch }} {{ partial "css/parse_theme.css" . }} {{ $sri := .Site.Data.sri }} {{ if ne ($scr.Get "primary") "#fff" }} @@ -101,15 +111,7 @@ - + {{- with .Params.header.image }}{{end}} {{ if .IsPage }}