From c802241deb0d3a36ccd973bf60c340c7e31d88a0 Mon Sep 17 00:00:00 2001 From: Jez Cope Date: Fri, 9 Apr 2021 20:35:44 +0100 Subject: [PATCH] Include topics in meta description tag --- layouts/_default/baseof.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 41e7a9f..4a2431b 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -5,7 +5,12 @@ {{ .Title }} - {{ with .Site.Params.description }}{{ end }} + {{ .Scratch.Set "desc" slice }} + {{ with .Site.Params.description }}{{ $.Scratch.Add "desc" (slice .) }}{{ end }} + {{ with .Site.Params.topics }}{{ $.Scratch.Add "desc" (slice (delimit . " & ")) }}{{ end }} + {{ if gt (len (.Scratch.Get "desc")) 0 }} + + {{ end }} {{ with .Site.Params.author }}{{ end }} {{ $style := resources.Get "style/main.sass" | resources.ToCSS }}