diff options
author | mogimogitomato <osakana.yano49@gmail.com> | 2020-05-30 22:23:33 +0300 |
---|---|---|
committer | mogimogitomato <osakana.yano49@gmail.com> | 2020-05-30 22:24:29 +0300 |
commit | 5df1d5d755c1443f2e292bd35923fec176c26b2a (patch) | |
tree | 27980c4f9d426af1f45f0138488ec2ff1377b186 | |
parent | 2b18ebb2d0b08b8ee570fa6e85f143661fc0fd78 (diff) |
Fix #98
change function of getting page collections
-rw-r--r-- | layouts/index.html | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/layouts/index.html b/layouts/index.html index 526534b..3c991d3 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,9 +2,12 @@ {{ partial "nav" . }} <section class="section"> <div class="container"> - {{- $pctx := . -}} - {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} - {{- $pages := $pctx.RegularPages -}} + {{- $pages := . -}} + {{- if .IsHome -}} + {{- $pages = .Site.RegularPages -}} + {{- else -}} + {{ $pages = .Pages -}} + {{- end -}} {{ $paginator := .Paginate (where $pages "Params.hidden" "ne" true) }} {{ range sort .Paginator.Pages }} <article> |