diff options
author | Nicholas Johnson <nick@nicholasjohnson.ch> | 2022-12-06 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <nick@nicholasjohnson.ch> | 2022-12-06 00:00:00 +0000 |
commit | 4cddcc49f68379b85ef50994ed834303a06034e2945fc9359d0a734db3b8d44a (patch) | |
tree | 9026121a3f7de7d4b62e32682eaf153ef42f5598deaeeb2fbd6c106570fa99c9 | |
parent | 388120efecf61a26006043fb734424fe7cc0fb2a2ee1bcaaa1e01c498d2b13d9 (diff) | |
download | hugo-theme-journal-4cddcc49f68379b85ef50994ed834303a06034e2945fc9359d0a734db3b8d44a.tar.gz hugo-theme-journal-4cddcc49f68379b85ef50994ed834303a06034e2945fc9359d0a734db3b8d44a.zip |
Show page info by default on entries only
-rw-r--r-- | archetypes/default.md | 1 | ||||
-rw-r--r-- | archetypes/entry.md | 1 | ||||
-rw-r--r-- | layouts/_default/single.gmi | 2 | ||||
-rw-r--r-- | layouts/_default/single.html | 2 |
4 files changed, 3 insertions, 3 deletions
diff --git a/archetypes/default.md b/archetypes/default.md index 6a08b27..174e99f 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,5 +1,6 @@ --- title: "{{ replace .Name "-" " " | title }}" draft: true +pageinfo: false --- diff --git a/archetypes/entry.md b/archetypes/entry.md index 7334064..46d491a 100644 --- a/archetypes/entry.md +++ b/archetypes/entry.md @@ -2,6 +2,5 @@ title: "{{ replace .Name "-" " " | title }}" date: {{ dateFormat "2006-01-02T00:00:00" .Date }} draft: true -pageinfo: true --- diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi index 17d77bf..6201f74 100644 --- a/layouts/_default/single.gmi +++ b/layouts/_default/single.gmi @@ -3,7 +3,7 @@ => / 🔗 Return to homepage -{{ if .Page.Params.pageinfo }}{{ partial "pageinfo" . }} +{{ if (.Page.Params.pageinfo | default true) }}{{ partial "pageinfo" . }} {{ end -}} # {{ .Name | safeHTML }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 3a6ade1..a1f9ea3 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,7 +2,7 @@ <nav> <p id="return"><a href="/" rel="noreferrer">🔗 Return to homepage</a></p> </nav> -{{- if .Page.Params.pageinfo }} +{{- if (.Page.Params.pageinfo | default true) }} <p>{{ partial "pageinfo" . }}</p>{{ end }} <main> <h1 id="{{ .File.TranslationBaseName }}">{{ .Name }}</h1> |