mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 19:00: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)) }}
|
||||
{{ if ne $numberOfPages 0 }}
|
||||
<ul>
|
||||
{{ .Scratch.Set "pages" .Pages }}
|
||||
{{ $currentNode.Scratch.Set "pages" .Pages }}
|
||||
{{ if .Sections}}
|
||||
{{ .Scratch.Set "pages" (.Pages | union .Sections) }}
|
||||
{{ $currentNode.Scratch.Set "pages" (.Pages | union .Sections) }}
|
||||
{{end}}
|
||||
{{ $pages := (.Scratch.Get "pages") }}
|
||||
{{ $pages := ($currentNode.Scratch.Get "pages") }}
|
||||
|
||||
{{if eq .Site.Params.ordersectionsby "title"}}
|
||||
{{ range $pages.ByTitle }}
|
||||
|
|
Loading…
Reference in a new issue