Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pavel-pi/kiss-em.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormogimogitomato <osakana.yano49@gmail.com>2019-12-08 22:01:19 +0300
committermogimogitomato <osakana.yano49@gmail.com>2019-12-08 22:01:19 +0300
commit31b86b9591107d43686f835130d11fa130379564 (patch)
treec1a81ee229d6fba2cccab524698ab83d30463dd8
parent073016f99669893a4dcea16b41ee5deea327445b (diff)
change regularpage's context
-rw-r--r--layouts/index.html5
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">