Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/janraasch/hugo-bearblog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Badal <me@nbad.al>2020-09-17 08:35:58 +0300
committerGitHub <noreply@github.com>2020-09-17 08:35:58 +0300
commitdcff8a4f858ee892b177cd312c643c42a917f0ec (patch)
treecb5549c5965c55f7e723a88ef1c372f427eb592e
parent3d510363c720823f9b90bf9ca4955ee44750b456 (diff)
feat: hide blog link if page not created (#4)
Allows this theme to be used for sites that do not have a blog.
-rw-r--r--layouts/partials/nav.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index dd06f47..def9b6e 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -2,4 +2,6 @@
{{ range .Site.Menus.main }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
+{{ with .Site.GetPage "/blog" }}
<a href="{{ "/blog" | relURL }}">Blog</a>
+{{ end }}