diff options
author | Nick Badal <me@nbad.al> | 2020-09-16 22:35:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-17 07:35:58 +0200 |
commit | dcff8a4f858ee892b177cd312c643c42a917f0ec (patch) | |
tree | cb5549c5965c55f7e723a88ef1c372f427eb592e /layouts/partials | |
parent | 3d510363c720823f9b90bf9ca4955ee44750b456 (diff) | |
download | hugo-bearcub-dcff8a4f858ee892b177cd312c643c42a917f0ec.tar.gz hugo-bearcub-dcff8a4f858ee892b177cd312c643c42a917f0ec.tar.bz2 |
feat: hide blog link if page not created (#4)
Allows this theme to be used for sites that do not have a blog.
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/nav.html | 2 |
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 }} |