diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 816265c..45725fa 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,17 +1,17 @@ {{ if .IsHome }} - {{ $.Scratch.Add "title" .Site.Title }} - {{ if .Site.Params.subtitle }}{{ $.Scratch.Add "subtitle" .Site.Params.subtitle }}{{ end }} - {{ if .Site.Params.bigimg }}{{ $.Scratch.Add "bigimg" .Site.Params.bigimg }}{{ end }} + {{ $.Scratch.Set "title" .Site.Title }} + {{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }} + {{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }} {{ else }} - {{ $.Scratch.Add "title" .Title }} - {{ if .Params.subtitle }}{{ $.Scratch.Add "subtitle" .Params.subtitle }}{{ end }} - {{ if .Params.bigimg }}{{ $.Scratch.Add "bigimg" .Params.bigimg }}{{ end }} + {{ $.Scratch.Set "title" .Title }} + {{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }} + {{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }} {{ end }} {{ $bigimg := $.Scratch.Get "bigimg" }} {{ if or $bigimg ($.Scratch.Get "title") }} {{ if isset $bigimg 0 }} -
+ {{ end }}