mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-11-17 17:57:04 +01:00
layouts/_default/baseof.html: Enumerate non-post pages in header nav menu
Still need to figure out how to determine which page we're on so we can set the "active" class accordingly (for Home we have the IsHome variable the we can check).
This commit is contained in:
parent
d31626c5a3
commit
4427040041
@ -29,6 +29,9 @@
|
||||
<div class="container">
|
||||
<nav class="nav blog-nav">
|
||||
<a class="nav-link {{ if .IsHome }}active{{ end }}" href="{{ .Site.BaseURL }}">Home</a>
|
||||
{{ range where .Site.Pages "Type" "!=" "post" }}
|
||||
<a class="nav-link" href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user