Adds check for required variable before rendering menu - Fix for #9

This commit is contained in:
Josh Johnson 2018-11-15 10:54:42 -05:00
parent 0c39cde248
commit 85ddc72eb7
No known key found for this signature in database
GPG key ID: EDD179DEDA41E81C

View file

@ -2,6 +2,8 @@
<nav>
<h1><a href="/">@{{ .Site.Author.handle }}</a>s {{ .Site.Title }}.</h1>
<div class="menu">
{{ if isset .Site.Params "rsssections" }}
{{ $.Scratch.Add "sections" .Site.Params.rsssections }}
<ul>
{{ range .Site.Menus.main }}
@ -14,6 +16,8 @@
{{ end }}
{{ with .Site.Author.aboutpage }}<li><a href="{{ . }}">About</a></li>{{ end }}
</ul>
{{ end }}
</div>
</nav>
</header>