diff options
author | Nicholas Johnson <nick@nicholasjohnson.ch> | 2023-08-25 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <nick@nicholasjohnson.ch> | 2023-08-25 00:00:00 +0000 |
commit | 6e9cc2a184805f6b3de073e4e96986c1f7d6e427c7baae9220313fde34b7dc0f (patch) | |
tree | 9fed9640e3847be8149a4bbf7d7a36e4869bc6698bfe0845a91fa86f22147f45 /layouts/index.gmi | |
parent | 67d60bba76e2d2678b5096164468deff70991985ca451ad6ae866d3590a3f363 (diff) | |
download | hugo-theme-journal-6e9cc2a184805f6b3de073e4e96986c1f7d6e427c7baae9220313fde34b7dc0f.tar.gz hugo-theme-journal-6e9cc2a184805f6b3de073e4e96986c1f7d6e427c7baae9220313fde34b7dc0f.zip |
Correctly handle absent navlinks
Diffstat (limited to 'layouts/index.gmi')
-rw-r--r-- | layouts/index.gmi | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/layouts/index.gmi b/layouts/index.gmi index 1b66945..a15154c 100644 --- a/layouts/index.gmi +++ b/layouts/index.gmi @@ -3,13 +3,17 @@ {{ .Site.Params.indexIntro | safeHTML }} +{{- if .Site.Menus.main }} + ## {{ i18n "navLinks" }} +{{ range .Site.Menus.main }} +=> {{ .URL }} {{ emojify ":link:" | safeHTML }} {{ .Name | safeHTML -}} +{{ end -}} -{{ range .Site.Menus.main -}} -=> {{ .URL }} {{ emojify ":link:" | safeHTML }} {{ .Name | safeHTML }} {{ end }} + ## {{ i18n "journalEntries" -}} {{ range (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse }} |