mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 19:56:41 +02:00
Automatically hide blog link in header if there are no blog posts
This commit is contained in:
@@ -16,7 +16,9 @@
|
|||||||
<a href="{{ .Site.BaseURL }}"><div class="name"><h1>{{ .Site.Title }}</h1></div></a>
|
<a href="{{ .Site.BaseURL }}"><div class="name"><h1>{{ .Site.Title }}</h1></div></a>
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
|
{{ if ne (len (where .Site.RegularPages "Section" "blog")) 0 }}
|
||||||
<a href="{{ .Site.BaseURL }}blog/"><li>Blog</li></a>
|
<a href="{{ .Site.BaseURL }}blog/"><li>Blog</li></a>
|
||||||
|
{{ end }}
|
||||||
{{ range .Site.Sections }}
|
{{ range .Site.Sections }}
|
||||||
{{ range first 1 (where .Pages "Section" "ne" "")}}
|
{{ range first 1 (where .Pages "Section" "ne" "")}}
|
||||||
{{ if ne .Section "blog"}}
|
{{ if ne .Section "blog"}}
|
||||||
|
Reference in New Issue
Block a user