]> danix's work - danix2-hugo-theme.git/commitdiff
fix: correct page.html layout template for is section navigation
authorDanilo M. <redacted>
Sun, 5 Apr 2026 06:45:36 +0000 (08:45 +0200)
committerDanilo M. <redacted>
Sun, 5 Apr 2026 06:45:36 +0000 (08:45 +0200)
layouts/page.html

index 09cf39fcd35457aa5e02f27d1f72ad6b9e72bb3e..8fb2903b7adec40a6a9bf3b2d09e3f94fd40b9bb 100644 (file)
       <nav class="page-nav">
         <h3 style="margin-bottom: 1rem;">Other pages</h3>
         <ul style="list-style: none; margin: 0;">
-          {{ range .Site.Sections.By }}
-            {{ if eq .Type "is" }}
-              {{ range .Pages }}
-                <li style="margin-bottom: 0.5rem;">
-                  <a href="{{ .RelPermalink }}" {{ if eq $.RelPermalink .RelPermalink }}class="active"{{ end }}>
-                    {{ .Title }}
-                  </a>
-                </li>
-              {{ end }}
+          {{ $section := .Site.GetPage "/is" }}
+          {{ if $section }}
+            {{ range $section.Pages }}
+              <li style="margin-bottom: 0.5rem;">
+                <a href="{{ .RelPermalink }}" {{ if eq $.RelPermalink .RelPermalink }}class="active"{{ end }}>
+                  {{ .Title }}
+                </a>
+              </li>
             {{ end }}
           {{ end }}
         </ul>