aboutsummaryrefslogtreecommitdiff
path: root/layouts/index.html
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicholasjohnson.ch>2023-08-25 00:00:00 +0000
committerNicholas Johnson <nick@nicholasjohnson.ch>2023-08-25 00:00:00 +0000
commit6e9cc2a184805f6b3de073e4e96986c1f7d6e427c7baae9220313fde34b7dc0f (patch)
tree9fed9640e3847be8149a4bbf7d7a36e4869bc6698bfe0845a91fa86f22147f45 /layouts/index.html
parent67d60bba76e2d2678b5096164468deff70991985ca451ad6ae866d3590a3f363 (diff)
downloadhugo-theme-journal-6e9cc2a184805f6b3de073e4e96986c1f7d6e427c7baae9220313fde34b7dc0f.tar.gz
hugo-theme-journal-6e9cc2a184805f6b3de073e4e96986c1f7d6e427c7baae9220313fde34b7dc0f.zip
Correctly handle absent navlinks
Diffstat (limited to 'layouts/index.html')
-rw-r--r--layouts/index.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/layouts/index.html b/layouts/index.html
index d49b710..f2e757c 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -2,6 +2,7 @@
<main>
<h1>{{ .Site.Params.indexTitle }}</h1>
<p>{{ .Site.Params.indexIntro }}</p>
+ {{ if .Site.Menus.main -}}
<h2>{{ i18n "navLinks" }}</h2>
<nav>
<ul class="list">
@@ -10,6 +11,7 @@
{{- end }}
</ul>
</nav>
+ {{ end -}}
<h2>{{ i18n "journalEntries" }}</h2>
{{ range (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse -}}
{{ partial "metadata.html" . }}