aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicksphere.ch>2022-04-30 00:00:00 +0000
committerNicholas Johnson <nick@nicksphere.ch>2022-04-30 00:00:00 +0000
commit7aa9bdd5653fb01539e032f89d081aefccd25b578dc9de9626d06e4e6dd8bb29 (patch)
tree9753c7949694a52e9109ab6ad028bdda37d83ad9937b6accf7e9ed8b65b7926c /layouts/partials
parent290401a89ec4d6c877452ea8d8fb4a70b76c84c64a20d8e2fd2b6351337f0a7c (diff)
downloadhugo-theme-journal-7aa9bdd5653fb01539e032f89d081aefccd25b578dc9de9626d06e4e6dd8bb29.tar.gz
hugo-theme-journal-7aa9bdd5653fb01539e032f89d081aefccd25b578dc9de9626d06e4e6dd8bb29.zip
Output Gemini
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/footer.gmi2
-rw-r--r--layouts/partials/header.gmi3
-rw-r--r--layouts/partials/metadata.gmi11
3 files changed, 16 insertions, 0 deletions
diff --git a/layouts/partials/footer.gmi b/layouts/partials/footer.gmi
new file mode 100644
index 0000000..3c95b3f
--- /dev/null
+++ b/layouts/partials/footer.gmi
@@ -0,0 +1,2 @@
+Unless otherwise noted, the writing in this journal is licensed under {{ $.Site.Copyright }}
+Copyright {{ .Site.Params.beginCopyrightYear }}-{{ now.Format "2006" }} {{ $.Site.Author.name }}
diff --git a/layouts/partials/header.gmi b/layouts/partials/header.gmi
new file mode 100644
index 0000000..e060cd0
--- /dev/null
+++ b/layouts/partials/header.gmi
@@ -0,0 +1,3 @@
+```nicksphere logo
+{{ $.Site.Params.logo }}
+```
diff --git a/layouts/partials/metadata.gmi b/layouts/partials/metadata.gmi
new file mode 100644
index 0000000..3984494
--- /dev/null
+++ b/layouts/partials/metadata.gmi
@@ -0,0 +1,11 @@
+{{ $entriesMinusOne := sub (len (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse) 1 }}
+{{- range first $entriesMinusOne (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse }}
+{{- $dateFormat := .Site.Params.dateFormat | default "2 Jan 2006" }}
+{{- .PublishDate.Format $dateFormat }} - {{ .ReadingTime }} minute read
+=> .{{ .RelPermalink }} {{ .Title }}
+
+{{ end }}
+{{- range last 1 (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse }}
+{{- $dateFormat := .Site.Params.dateFormat | default "2 Jan 2006" }}
+{{- .PublishDate.Format $dateFormat }} - {{ .ReadingTime }} minute read
+=> .{{ .RelPermalink }} {{ .Title }}{{ end }}