mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-14 12:25:07 +01:00
Fix list.html #87
This commit is contained in:
parent
7427cfa3b4
commit
819b0dc373
@ -2,7 +2,12 @@
|
|||||||
<div class="posts">
|
<div class="posts">
|
||||||
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
||||||
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||||
{{ $paginator := .Paginate (where .Site.RegularPages "Type" $contentTypeName) }}
|
|
||||||
|
{{ $PageContext := . }}
|
||||||
|
{{ if .IsHome }}
|
||||||
|
{{ $PageContext = .Site }}
|
||||||
|
{{ end }}
|
||||||
|
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
|
||||||
|
|
||||||
{{ range $paginator.Pages }}
|
{{ range $paginator.Pages }}
|
||||||
<div class="post on-list">
|
<div class="post on-list">
|
||||||
|
Loading…
Reference in New Issue
Block a user