aboutsummaryrefslogtreecommitdiff
path: root/layouts/_default
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicksphere.ch>2022-11-10 00:00:00 +0000
committerNicholas Johnson <nick@nicksphere.ch>2022-11-10 00:00:00 +0000
commit6ad63397418cc25be478fe4bfa3a8f85909432c439f811ad79a7c48c23ac26e7 (patch)
treec7a7e6b1722de1a25e167647cae0207bdc4ed8445d755a36ce1795199243e32d /layouts/_default
parent3123c9eb98359ca972c797dbd7561c97fadac9dc3d2b5fcc4a9e33ac836fb982 (diff)
downloadhugo-theme-journal-6ad63397418cc25be478fe4bfa3a8f85909432c439f811ad79a7c48c23ac26e7.tar.gz
hugo-theme-journal-6ad63397418cc25be478fe4bfa3a8f85909432c439f811ad79a7c48c23ac26e7.zip
Replace emojis with the emojify processor
This increases code accessibility.
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/_markup/render-link.html2
-rw-r--r--layouts/_default/single.gmi1
2 files changed, 2 insertions, 1 deletions
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
index fb5a1e3..4d300ab 100644
--- a/layouts/_default/_markup/render-link.html
+++ b/layouts/_default/_markup/render-link.html
@@ -1,2 +1,2 @@
-{{ $emoji := cond (.Page.Params.nolinkemoji | default false) "" "🔗 " -}}
+{{ $emoji := cond (.Page.Params.nolinkemoji | default false) "" (emojify ":link: ") -}}
<a href="{{ .Destination | safeURL }}" rel="noreferrer">{{ $emoji }}{{ .Text | safeHTML }}</a>
diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi
index 5ff88c8..17d77bf 100644
--- a/layouts/_default/single.gmi
+++ b/layouts/_default/single.gmi
@@ -12,4 +12,5 @@
{{- $content = $content | replaceRE `\n\[(.+?)\]\((.+?)\)` (print "\n=> $2 " $emoji "$1") }}
{{- $content = $content | replaceRE `\*{3}(.+?)\*{3}|\*{2}(.+?)\*{2}|\*{1}(.+?)\*{1}` "$1$2$3$4$5$6" }}
{{- $content = $content | replaceRE `\n- ` "\n* " }}
+{{- $content = $content | emojify }}
{{- $content | safeHTML }}{{ end }}