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:
authorEmir Ribić <ribice@gmail.com>2019-12-10 11:11:23 +0300
committerGitHub <noreply@github.com>2019-12-10 11:11:23 +0300
commit329df0977b5e2a3519e048124d262d642eedb118 (patch)
treec1a81ee229d6fba2cccab524698ab83d30463dd8
parent073016f99669893a4dcea16b41ee5deea327445b (diff)
parent31b86b9591107d43686f835130d11fa130379564 (diff)
Merge pull request #84 from mogimogitomato/change_regularpages_context
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">