feat: update sorting auto generated menus

This commit is contained in:
Henk Verlinde 2022-03-30 09:08:30 +02:00
parent a927710685
commit 7a7c4d75ea
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
{{ $currentPage := . -}}
{{ $section := $currentPage.Section -}}
{{ range (where .Site.Sections "Section" "in" $section) }}
{{ range .Sections.Reverse }}
{{ range .Sections.ByWeight.Reverse }}
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
<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 }}">

View File

@ -2,7 +2,7 @@
{{ $currentPage := . -}}
{{ $section := $currentPage.Section -}}
{{ range (where .Site.Sections "Section" "in" $section) }}
{{ range .Sections.Reverse }}
{{ range .Sections.ByWeight.Reverse }}
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
<h3 class="h6 text-uppercase mb-2">{{ .Title }}</h3>
<ul class="list-unstyled">