From: kengrimes Date: Fri, 20 Apr 2018 20:48:22 +0000 (-0700) Subject: using .Page.Description instead of .Page.Params.heading X-Git-Url: https://www.kengrimes.com/gitweb/?p=kengrimes.com%2Ftheme.git;a=commitdiff_plain;h=3a03bebcc0264e37e178addb6475c72341bef004 using .Page.Description instead of .Page.Params.heading --- diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index d73bc08..ddfb8b0 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -15,19 +15,12 @@ {{- $ph := cond (or (not .Params.header) (not (fileExists (printf "static/%s" .Params.header)))) $sh .Params.header }}
-

{{- if not .Page.Params.heading }} - {{ .Page.Title }} - {{- else if eq (printf "%T" .Page.Params.heading) "string" }} - {{ .Page.Params.heading }} - {{- else }} - {{- index .Page.Params.heading 0 }} - {{- if (gt (len .Page.Params.heading) 1) }} - {{- range after 1 .Page.Params.heading -}} -
- {{ . }} - {{- end -}} - {{- end -}} - {{- end }} +

+ {{- if not .Page.Description }} + {{ .Page.Title }} + {{- else }} + {{ replaceRE "\n\n" "
\n" .Page.Description | safeHTML }} + {{- end }}