From 5e287b6705aad34e894fa1c04aecf64447b8e427 Mon Sep 17 00:00:00 2001 From: Li-Wen Yip Date: Sun, 26 Mar 2017 14:01:02 +0100 Subject: [PATCH] Fix issues with title, subtitle, and bigimg on page 2 --- layouts/partials/header.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 }}