summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicksphere.ch>2022-08-01 00:00:00 +0000
committerNicholas Johnson <nick@nicksphere.ch>2022-08-01 00:00:00 +0000
commitfa4da755d8c8938a1379dd63e9c550360ff118ed60e330b2088688f22e2fd7ac (patch)
treed795cb0efcb65f2b23f67093b540d9e9e9819139d8fbf03b8809a339f2324cd1 /layouts
parent55186f386fec783d83170d13e2d44810673cc35a726c7c88c4031fd6668e43be (diff)
Don't HTML escape Gemini templates
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/single.gmi2
-rw-r--r--layouts/partials/footer.gmi4
-rw-r--r--layouts/partials/metadata.gmi4
3 files changed, 5 insertions, 5 deletions
diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi
index 9dfb215..a286ca3 100644
--- a/layouts/_default/single.gmi
+++ b/layouts/_default/single.gmi
@@ -1,5 +1,5 @@
{{ define "main" }}
-=> ./{{ replaceRE ".+?/" "../" .RelPermalink }} Return to homepage
+=> ./{{ replaceRE ".+?/" "../" .RelPermalink | safeURL }} Return to homepage
{{ $content := .RawContent }}
{{- $content = $content | replaceRE `\[(.+?)\]\((.+?)\)` "=> $2 $1" }}
diff --git a/layouts/partials/footer.gmi b/layouts/partials/footer.gmi
index 3c95b3f..2dab362 100644
--- a/layouts/partials/footer.gmi
+++ b/layouts/partials/footer.gmi
@@ -1,2 +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 }}
+Unless otherwise noted, the writing in this journal is licensed under {{ $.Site.Copyright | safeHTML }}
+Copyright {{ .Site.Params.beginCopyrightYear | safeHTML }}-{{ now.Format "2006" | safeHTML }} {{ $.Site.Author.name | safeHTML }}
diff --git a/layouts/partials/metadata.gmi b/layouts/partials/metadata.gmi
index 92036a1..f5cca3b 100644
--- a/layouts/partials/metadata.gmi
+++ b/layouts/partials/metadata.gmi
@@ -1,11 +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
+{{- .PublishDate.Format $dateFormat | safeHTML }} - {{ .ReadingTime | safeHTML }} minute read
=> .{{ .RelPermalink }} {{ .Title | safeHTML }}
{{ 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
+{{- .PublishDate.Format $dateFormat | safeHTML }} - {{ .ReadingTime | safeHTML }} minute read
=> .{{ .RelPermalink }} {{ .Title | safeHTML }}{{ end }}