Merge pull request #6 from gbl08ma/autohide-blog-link

Hide blog link in header if there is no blog
This commit is contained in:
Alexis Tacnet
2017-01-18 13:13:27 +01:00
committed by GitHub

View File

@@ -16,7 +16,9 @@
<a href="{{ .Site.BaseURL }}"><div class="name"><h1>{{ .Site.Title }}</h1></div></a>
<nav>
<ul>
<a href="{{ .Site.BaseURL }}blog/"><li>Blog</li></a>
{{ if ne (len (where .Site.RegularPages "Section" "blog")) 0 }}
<a href="{{ .Site.BaseURL }}blog/"><li>Blog</li></a>
{{ end }}
{{ range .Site.Sections }}
{{ range first 1 (where .Pages "Section" "ne" "")}}
{{ if ne .Section "blog"}}