1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-06-26 16:13:45 +02: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:
Alan Orth 2016-09-14 23:42:59 +03:00
parent d31626c5a3
commit 4427040041
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -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>