diff options
author | mogimogitomato <osakana.yano49@gmail.com> | 2019-12-08 22:01:19 +0300 |
---|---|---|
committer | mogimogitomato <osakana.yano49@gmail.com> | 2019-12-08 22:01:19 +0300 |
commit | 31b86b9591107d43686f835130d11fa130379564 (patch) | |
tree | c1a81ee229d6fba2cccab524698ab83d30463dd8 | |
parent | 073016f99669893a4dcea16b41ee5deea327445b (diff) |
change regularpage's context
-rw-r--r-- | layouts/index.html | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/layouts/index.html b/layouts/index.html index 37f41f1..14da1f4 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,7 +2,10 @@ {{ partial "nav" . }} <section class="section"> <div class="container"> - {{ $paginator := .Paginate (where .Site.RegularPages "Params.hidden" "ne" true) }} + {{- $pctx := . -}} + {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} + {{- $pages := $pctx.RegularPages -}} + {{ $paginator := .Paginate (where $pages "Params.hidden" "ne" true) }} {{ range sort .Paginator.Pages }} <article> <div class="subtitle tags is-6 is-pulled-right"> |