summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Johnson <mail@nicholasjohnson.ch>2024-11-08 00:00:00 +0000
committerNicholas Johnson <mail@nicholasjohnson.ch>2024-11-08 00:00:00 +0000
commit033724cd709402e1da184e60da2da3031d8e119990129baa7ced9f957904e615 (patch)
tree4df486cfca09184234672c36089a34d467795640f731db850bed3ef91acfcea3
parent3b77b61bf662efe71c7f75e73a2d6fae0e3c8c8b74b05f036809b0913785a432 (diff)
downloadhugo-theme-journal-033724cd709402e1da184e60da2da3031d8e119990129baa7ced9f957904e615.tar.gz
hugo-theme-journal-033724cd709402e1da184e60da2da3031d8e119990129baa7ced9f957904e615.zip
Stop safeHTML overuse in emojis for readability
-rw-r--r--layouts/404.html2
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/index.html2
-rw-r--r--layouts/partials/pageinfo.html2
-rw-r--r--layouts/taxonomy/taxonomy.html4
-rw-r--r--layouts/term/term.html4
6 files changed, 8 insertions, 8 deletions
diff --git a/layouts/404.html b/layouts/404.html
index f3b9742..6100aa9 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,6 +1,6 @@
{{ define "main" -}}
<nav>
- <p>{{ emojify ":link:" | safeHTML }} <a class="link" href="{{ .Site.Home.RelPermalink }}" rel="noreferrer">{{ i18n "returnHome" }}</a></p>
+ <p>{{ emojify ":link:" }} <a class="link" href="{{ .Site.Home.RelPermalink }}" rel="noreferrer">{{ i18n "returnHome" }}</a></p>
</nav>
<main>
<h1 id="404">{{ i18n "pageNotFound" }}</h1>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index cd80256..1bc79e4 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,6 +1,6 @@
{{ define "main" -}}
<nav>
- <p>{{ emojify ":link:" | safeHTML }} <a class="link" href="{{ .Site.Home.RelPermalink }}" rel="noreferrer">{{ i18n "returnHome" }}</a></p>
+ <p>{{ emojify ":link:" }} <a class="link" href="{{ .Site.Home.RelPermalink }}" rel="noreferrer">{{ i18n "returnHome" }}</a></p>
</nav>
{{- if (.Page.Params.pageinfo | default true) }}
<p>{{ partial "pageinfo.html" . }}</p>
diff --git a/layouts/index.html b/layouts/index.html
index d15d932..398a770 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -7,7 +7,7 @@
<nav>
<ul class="list">
{{- range .Site.Menus.main }}
- <li class="list__item">{{ emojify ":link:" | safeHTML }} <a class="link" href="{{ .URL }}" rel="noreferrer">{{ .Name }}</a></li>
+ <li class="list__item">{{ emojify ":link:" }} <a class="link" href="{{ .URL }}" rel="noreferrer">{{ .Name }}</a></li>
{{- end }}
</ul>
</nav>
diff --git a/layouts/partials/pageinfo.html b/layouts/partials/pageinfo.html
index 2e5d2b9..3eae94c 100644
--- a/layouts/partials/pageinfo.html
+++ b/layouts/partials/pageinfo.html
@@ -1,2 +1,2 @@
{{ $dateFormat := .Site.Params.dateFormat | default ":date_long" -}}
-{{ emojify ":calendar:" | safeHTML }} <time {{ printf "datetime=%q" (.Page.PublishDate | time.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>{{ .Page.PublishDate | time.Format $dateFormat | safeHTML }}</time> | {{ emojify ":stopwatch:" | safeHTML }} <time datetime="PT{{ .ReadingTime }}M">{{ i18n "readingTime" .ReadingTime | safeHTML }}</time>{{ if (.Param (lower (i18n "tags"))) }} | {{ emojify ":label:" | safeHTML }} {{ end }}{{ range $key, $val := (.Param (lower (i18n "tags"))) }}{{ if $key }}, {{ end }}<a class="link" href='{{ relLangURL (lower (i18n "tags")) }}/{{ . | urlize }}/' rel="noreferrer">{{ $val }}</a>{{ end }}
+{{ emojify ":calendar:" }} <time {{ printf "datetime=%q" (.Page.PublishDate | time.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>{{ .Page.PublishDate | time.Format $dateFormat | safeHTML }}</time> | {{ emojify ":stopwatch:" }} <time datetime="PT{{ .ReadingTime }}M">{{ i18n "readingTime" .ReadingTime | safeHTML }}</time>{{ if (.Param (lower (i18n "tags"))) }} | {{ emojify ":label:" }} {{ end }}{{ range $key, $val := (.Param (lower (i18n "tags"))) }}{{ if $key }}, {{ end }}<a class="link" href='{{ relLangURL (lower (i18n "tags")) }}/{{ . | urlize }}/' rel="noreferrer">{{ $val }}</a>{{ end }}
diff --git a/layouts/taxonomy/taxonomy.html b/layouts/taxonomy/taxonomy.html
index 51e00a3..77475de 100644
--- a/layouts/taxonomy/taxonomy.html
+++ b/layouts/taxonomy/taxonomy.html
@@ -1,11 +1,11 @@
{{ define "main" -}}
<nav>
- <p>{{ emojify ":link:" | safeHTML }} <a class="link" href="{{ .Site.Home.RelPermalink }}" rel="noreferrer">{{ i18n "returnHome" }}</a></p>
+ <p>{{ emojify ":link:" }} <a class="link" href="{{ .Site.Home.RelPermalink }}" rel="noreferrer">{{ i18n "returnHome" }}</a></p>
</nav>
<main>
<h1>{{ .Type | humanize }}</h1>
<h2>{{ i18n "feeds" }}</h2>
- <p><a class="link" href="{{ print .RelPermalink "atom.xml" }}" rel="noreferrer"> {{ emojify ":link:" | safeHTML }} {{ i18n "atomFeed" }}</a></p>
+ <p><a class="link" href="{{ print .RelPermalink "atom.xml" }}" rel="noreferrer"> {{ emojify ":link:" }} {{ i18n "atomFeed" }}</a></p>
<h2>{{ i18n "list" }}</h2>
<ul class="list">
{{- range .Data.Pages }}
diff --git a/layouts/term/term.html b/layouts/term/term.html
index fa89acf..5519ba2 100644
--- a/layouts/term/term.html
+++ b/layouts/term/term.html
@@ -1,11 +1,11 @@
{{ define "main" -}}
<nav>
- <p>{{ emojify ":link:" | safeHTML }} <a class="link" href="{{ .Site.Home.RelPermalink }}" rel="noreferrer">{{ i18n "returnHome" }}</a></p>
+ <p>{{ emojify ":link:" }} <a class="link" href="{{ .Site.Home.RelPermalink }}" rel="noreferrer">{{ i18n "returnHome" }}</a></p>
</nav>
<main>
<h1>{{ .Type | singularize | humanize }} "{{ .Title }}"</h1>
<h2>{{ i18n "feeds" }}</h2>
- <p><a class="link" href="{{ print .RelPermalink "atom.xml" }}" rel="noreferrer"> {{ emojify ":link:" | safeHTML }} {{ i18n "atomFeed" }}</a></p>
+ <p><a class="link" href="{{ print .RelPermalink "atom.xml" }}" rel="noreferrer"> {{ emojify ":link:" }} {{ i18n "atomFeed" }}</a></p>
<h2>{{ i18n "journalEntries" }}</h2>
{{- range .Data.Pages.ByPublishDate.Reverse }}
{{ partial "metadata.html" . -}}