trwnh.com/unified.test.hugo/layouts/partials/site-sidebar.html
2024-11-13 11:24:48 -06:00

22 lines
No EOL
544 B
HTML

<div class="site-sidebar">
<aside>
<div class="container">
<h2>{{.Site.Title}}</h2>
</div>
</aside>
<nav>
<div class="container">
{{ $sections := where .Site.Sections "Section" "not in" (slice "_dump" "meta" "responses") }}
{{ $sections = sort $sections "Title" "asc"}}
<h2>Other content</h2>
{{ range $sections }}
<h3><a href="{{.Permalink}}">{{or .Title .File.ContentBaseName}}</a></h3>
<ul>
{{ range first 5 .RegularPages }}
<li><a href="{{.Permalink}}">{{or .Title .File.LogicalName}}</a></li>
{{ end }}
</ul>
{{ end }}
</div>
</nav>
</div>