Fix context
This commit is contained in:
parent
6a21a64488
commit
c1a940e084
1 changed files with 6 additions and 2 deletions
|
@ -1,12 +1,16 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
{{ if not .IsHome }}
|
||||
{{ $pctx := . }}
|
||||
|
||||
{{ if .IsHome }}
|
||||
{{ $pctx = .Site }}
|
||||
{{ else }}
|
||||
<header class="page-header">
|
||||
<h1>{{ if eq .Data.Singular "tag" }}{{ .Data.Term }}{{ else }}Posts{{ end }}</h1>
|
||||
</header>
|
||||
{{ end }}
|
||||
|
||||
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
|
||||
{{ $paginator := .Paginate (where $pctx.RegularPages "Type" "in" .Site.Params.mainSections) }}
|
||||
|
||||
{{ if gt $paginator.TotalPages 0 }}
|
||||
{{ range $index, $page := $paginator.Pages }}
|
||||
|
|
Loading…
Reference in a new issue