summaryrefslogtreecommitdiff
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
commit5d08e8402299fc3ef75718b90a235f455ddfa026f404217d6f89e8afaf7ff624 (patch)
treed1312b8010deb06198b436de44f656bc8d013a8f3f9f99282ab9a8021a774a76 /layouts/index.html
parent6e9cc2a184805f6b3de073e4e96986c1f7d6e427c7baae9220313fde34b7dc0f (diff)
downloadhugo-theme-journal-5d08e8402299fc3ef75718b90a235f455ddfa026f404217d6f89e8afaf7ff624.tar.gz
hugo-theme-journal-5d08e8402299fc3ef75718b90a235f455ddfa026f404217d6f89e8afaf7ff624.zip
Correctly handle absent journal entries
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 f2e757c..6f231df 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -12,9 +12,11 @@
</ul>
</nav>
{{ end -}}
+ {{ if .Site.RegularPages -}}
<h2>{{ i18n "journalEntries" }}</h2>
{{ range (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse -}}
{{ partial "metadata.html" . }}
{{ end -}}
+ {{ end -}}
</main>
{{- end }} \ No newline at end of file