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

github.com/leonhe/hugo_eiio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon He <lhe868@gmail.com>2019-08-20 06:53:05 +0300
committerLeon He <lhe868@gmail.com>2019-08-20 06:53:05 +0300
commitcc47f865c3f8ca354cad651401569e0ead7601ac (patch)
tree98b87b4deb4913bbc7a6665796db2632fa5bb54f
parentd1edf20ddf3b64e1aa9a5b464b1b71e92fb8deae (diff)
fixed:Hugo 0.57 version navigate display error #3
-rw-r--r--README.md1
-rw-r--r--layouts/partials/nav.html2
2 files changed, 2 insertions, 1 deletions
diff --git a/README.md b/README.md
index 596f2de..240ddfb 100644
--- a/README.md
+++ b/README.md
@@ -40,6 +40,7 @@ googleAnalytics='google analytics code'
securityPolicy = false #disable https content security policy
footerRight="Your tips content" #footer right content
addthisID="addthis.com sharder plugin id"
+ mainSections = ['page']
[sitemap]
changefreq = "monthly"
priority = 0.5
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index 1fbd279..4967627 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -16,7 +16,7 @@
{{ $siteURL:= "/" | absLangURL }}
<li {{ if eq $url $siteURL }} class="active" {{end}} ><a href="/">Home</a></li>
- {{ range where .Site.Pages "Section" "!=" "post" }}
+ {{ range where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ if isset .Params "title" }}
{{ $absURL:=.Permalink | absLangURL}}
<li {{ if eq $absURL $url }} class="active" {{end}}> <a href="{{.Permalink}}" >{{.Title}}</a></li>