mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-19 03:10:24 +00:00
Fix for random failures in menu generation
This commit is contained in:
parent
6562adeb7b
commit
12cab1bed6
1 changed files with 3 additions and 3 deletions
|
@ -111,11 +111,11 @@
|
||||||
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
||||||
{{ if ne $numberOfPages 0 }}
|
{{ if ne $numberOfPages 0 }}
|
||||||
<ul>
|
<ul>
|
||||||
{{ .Scratch.Set "pages" .Pages }}
|
{{ $currentNode.Scratch.Set "pages" .Pages }}
|
||||||
{{ if .Sections}}
|
{{ if .Sections}}
|
||||||
{{ .Scratch.Set "pages" (.Pages | union .Sections) }}
|
{{ $currentNode.Scratch.Set "pages" (.Pages | union .Sections) }}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{ $pages := (.Scratch.Get "pages") }}
|
{{ $pages := ($currentNode.Scratch.Get "pages") }}
|
||||||
|
|
||||||
{{if eq .Site.Params.ordersectionsby "title"}}
|
{{if eq .Site.Params.ordersectionsby "title"}}
|
||||||
{{ range $pages.ByTitle }}
|
{{ range $pages.ByTitle }}
|
||||||
|
|
Loading…
Reference in a new issue