feat: hide blog link if page not created (#4)

Allows this theme to be used for sites that do not have a blog.
This commit is contained in:
Nick Badal 2020-09-16 22:35:58 -07:00 committed by GitHub
parent 3d510363c7
commit dcff8a4f85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,4 +2,6 @@
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<a href="{{ .URL }}">{{ .Name }}</a> <a href="{{ .URL }}">{{ .Name }}</a>
{{ end }} {{ end }}
{{ with .Site.GetPage "/blog" }}
<a href="{{ "/blog" | relURL }}">Blog</a> <a href="{{ "/blog" | relURL }}">Blog</a>
{{ end }}