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

github.com/xiaoheiAh/hugo-theme-pure.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_default/baseof.html')
-rw-r--r--layouts/_default/baseof.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 05b0d70..8088892 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -26,7 +26,12 @@
{{- if eq .Site.Params.sidebar "none"}}
{{- $.Scratch.Add "bodyClass" "no-sidebar" }}
{{- end }}
+
<!-- gen regular pages by mainSections -->
+ <!-- if exists, delete it -->
+ {{- if ($.Scratch.Get "pages") }}
+ {{- $.Scratch.Delete "pages"}}
+ {{- end}}
{{- if and (.Site.Params.mainSections) (ge (len .Site.Params.mainSections) 0) }}
{{- $.Scratch.Add "pages" (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
{{- else }}