aboutsummaryrefslogtreecommitdiff
path: root/layouts/_default
diff options
context:
space:
mode:
authorNicholas Johnson <mail@nicholasjohnson.ch>2024-11-07 00:00:00 +0000
committerNicholas Johnson <mail@nicholasjohnson.ch>2024-11-07 00:00:00 +0000
commite8ce80b80dc1ebfc1db1e0cee7a7f7ac1e0e7e94961e456e5e60d1a15caeb7fe (patch)
treef6b9cd467ef103f8e2aca8b1f34b18ea847e8267b1dcf2aeef0dea10834c5727 /layouts/_default
parent49ac99612abe9fbe54547934fc76cba4bc277e2597b33716dbda4da00e5c6593 (diff)
downloadhugo-theme-journal-e8ce80b80dc1ebfc1db1e0cee7a7f7ac1e0e7e94961e456e5e60d1a15caeb7fe.tar.gz
hugo-theme-journal-e8ce80b80dc1ebfc1db1e0cee7a7f7ac1e0e7e94961e456e5e60d1a15caeb7fe.zip
Disable HTML renderer for Gemini output format
This avoids littering the gemtext templates with "safeHTML".
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/single.gmi14
1 files changed, 7 insertions, 7 deletions
diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi
index f51d403..207bb87 100644
--- a/layouts/_default/single.gmi
+++ b/layouts/_default/single.gmi
@@ -1,6 +1,6 @@
{{ define "main" -}}
{{ $emoji := cond (.Page.Params.showlinkemoji | default true) (emojify ":link: ") "" -}}
-=> {{ .Site.Home.RelPermalink | replaceRE `(?m)index.gmi$` "" }} {{ emojify ":link:" | safeHTML }} {{ i18n "returnHome" -}}
+=> {{ .Site.Home.RelPermalink | replaceRE `(?m)index.gmi$` "" }} {{ emojify ":link:" }} {{ i18n "returnHome" -}}
{{ if (.Page.Params.pageinfo | default true) }}
@@ -8,7 +8,7 @@
{{ end }}
-# {{ .Name | safeHTML }}
+# {{ .Name }}
{{ $content := chomp (.RawContent) -}}
{{ $scratch := newScratch -}}
@@ -98,11 +98,11 @@
{{/* demux regex matches above and below preformatted text */ -}}
{{ if $above_pre -}}
- {{ $rendered_text | safeHTML -}}
- {{ $pre | safeHTML -}}
+ {{ $rendered_text -}}
+ {{ $pre -}}
{{ else -}}
- {{ $pre | safeHTML -}}
- {{ $rendered_text | safeHTML -}}
+ {{ $pre -}}
+ {{ $rendered_text -}}
{{ end -}}
{{ end -}}
@@ -119,7 +119,7 @@
{{ $ref_title := .title -}}
{{/* render referenced links */}}
-{{ print "=> " $ref_link (emojify " :link: [") $ref_index "]: " (cond (ne (len $ref_title) 0) $ref_title $ref_text) | safeHTML -}}
+{{ print "=> " $ref_link (emojify " :link: [") $ref_index "]: " (cond (ne (len $ref_title) 0) $ref_title $ref_text) -}}
{{ end -}}
{{ end -}}