From 6ad63397418cc25be478fe4bfa3a8f85909432c439f811ad79a7c48c23ac26e7 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Thu, 10 Nov 2022 00:00:00 +0000 Subject: Replace emojis with the emojify processor This increases code accessibility. --- layouts/_default/_markup/render-link.html | 2 +- layouts/_default/single.gmi | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'layouts/_default') 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: ") -}} {{ $emoji }}{{ .Text | safeHTML }} 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 }} -- cgit v1.2.3