diff options
author | Leon He <lhe868@gmail.com> | 2019-08-20 06:53:05 +0300 |
---|---|---|
committer | Leon He <lhe868@gmail.com> | 2019-08-20 06:53:05 +0300 |
commit | cc47f865c3f8ca354cad651401569e0ead7601ac (patch) | |
tree | 98b87b4deb4913bbc7a6665796db2632fa5bb54f | |
parent | d1edf20ddf3b64e1aa9a5b464b1b71e92fb8deae (diff) |
fixed:Hugo 0.57 version navigate display error #3
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | layouts/partials/nav.html | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -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> |