diff options
-rw-r--r-- | layouts/index.html | 3 | ||||
-rw-r--r-- | layouts/partials/post_header.html | 2 | ||||
-rw-r--r-- | layouts/post/single.html | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/layouts/index.html b/layouts/index.html index c44ebf9..591dbe6 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -7,6 +7,7 @@ {{ range $paginator.Pages }} <article> + {{ .Scratch.Set "isHome" true }} {{ partial "post_header.html" . }} {{ if eq .Site.Params.truncate false }} @@ -30,7 +31,7 @@ </article> {{ end }} <!-- {{ template "_internal/pagination.html" . }} default pagination --> - {{ partial "pagination.html" . }} <!-- use custom pagination --> + {{ partial "pagination.html" . }} <!-- use custom pagination --> </div> diff --git a/layouts/partials/post_header.html b/layouts/partials/post_header.html index b65d6cb..4c64bfc 100644 --- a/layouts/partials/post_header.html +++ b/layouts/partials/post_header.html @@ -2,7 +2,7 @@ <header> <h1 class="entry-title"> - {{ if .IsHome }} <a href="{{ .Permalink }}">{{ .Title }}</a> {{ else }} {{ .Title }} {{ end }} + {{ if ($.Scratch.Get "isHome") }}<a href="{{ .Permalink }}">{{ .Title }}</a>{{ else }} {{ .Title }} {{ end }} </h1> <p class="meta">{{ .Date.Format "Jan 2, 2006" }} {{ if not .Site.Params.disableReadingTime }} - {{ .ReadingTime }} minute read {{ end }} diff --git a/layouts/post/single.html b/layouts/post/single.html index d61ba0d..6e4de67 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -5,6 +5,7 @@ <div> <article class="hentry" role="article"> + {{ .Scratch.Set "isHome" false }} {{ partial "post_header.html" . }} <div class="entry-content"> |