mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-30 19:35:26 +01:00 
			
		
		
		
	Fix context
This commit is contained in:
		| @@ -1,12 +1,16 @@ | |||||||
| {{ partial "header.html" . }} | {{ partial "header.html" . }} | ||||||
|  |  | ||||||
| {{ if not .IsHome }} | {{ $pctx := . }} | ||||||
|  |  | ||||||
|  | {{ if .IsHome }} | ||||||
|  | {{ $pctx = .Site }} | ||||||
|  | {{ else }} | ||||||
| <header class="page-header"> | <header class="page-header"> | ||||||
|   <h1>{{ if eq .Data.Singular "tag" }}{{ .Data.Term }}{{ else }}Posts{{ end }}</h1> |   <h1>{{ if eq .Data.Singular "tag" }}{{ .Data.Term }}{{ else }}Posts{{ end }}</h1> | ||||||
| </header> | </header> | ||||||
| {{ end }} | {{ 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 }} | {{ if gt $paginator.TotalPages 0 }} | ||||||
| {{ range $index, $page := $paginator.Pages }} | {{ range $index, $page := $paginator.Pages }} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 nanxiaobei
					nanxiaobei