fix(menus): sort pages and sections by default order
This restores the default hugo sorting behaviour.
This commit is contained in:
parent
cf51ea887d
commit
21ba62dcc8
|
@ -6,4 +6,5 @@ date: 2020-10-06T08:49:15+00:00
|
||||||
lastmod: 2020-10-06T08:49:15+00:00
|
lastmod: 2020-10-06T08:49:15+00:00
|
||||||
draft: false
|
draft: false
|
||||||
images: []
|
images: []
|
||||||
|
weight: 600
|
||||||
---
|
---
|
||||||
|
|
|
@ -6,4 +6,5 @@ date: 2020-10-06T08:48:45+00:00
|
||||||
lastmod: 2020-10-06T08:48:45+00:00
|
lastmod: 2020-10-06T08:48:45+00:00
|
||||||
draft: false
|
draft: false
|
||||||
images: []
|
images: []
|
||||||
|
weight: 100
|
||||||
---
|
---
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{{ $currentPage := . -}}
|
{{ $currentPage := . -}}
|
||||||
{{ $section := $currentPage.Section -}}
|
{{ $section := $currentPage.Section -}}
|
||||||
{{ range (where .Site.Sections "Section" "in" $section) }}
|
{{ range (where .Site.Sections "Section" "in" $section) }}
|
||||||
{{ range .Sections.ByWeight.Reverse }}
|
{{ range .Sections }}
|
||||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||||
<li class="mb-1">
|
<li class="mb-1">
|
||||||
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ md5 .Title }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ md5 .Title }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{{ $currentPage := . -}}
|
{{ $currentPage := . -}}
|
||||||
{{ $section := $currentPage.Section -}}
|
{{ $section := $currentPage.Section -}}
|
||||||
{{ range (where .Site.Sections "Section" "in" $section) }}
|
{{ range (where .Site.Sections "Section" "in" $section) }}
|
||||||
{{ range .Sections.ByWeight.Reverse }}
|
{{ range .Sections }}
|
||||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||||
<h3 class="h6 text-uppercase mb-2">{{ .Title }}</h3>
|
<h3 class="h6 text-uppercase mb-2">{{ .Title }}</h3>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
|
|
Loading…
Reference in New Issue