aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md105
-rw-r--r--README.md7
-rw-r--r--archetypes/entry.md2
-rw-r--r--assets/static/css/style.css (renamed from assets/style.css)18
-rw-r--r--config/_default/hugo.toml (renamed from config/_default/config.toml)5
-rw-r--r--i18n/en.toml2
-rw-r--r--layouts/404.html2
-rw-r--r--layouts/_default/_markup/render-link.html3
-rw-r--r--layouts/_default/single.gmi184
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/index.atom.xml6
-rw-r--r--layouts/index.gemini_atom.xml16
-rw-r--r--layouts/index.gmi6
-rw-r--r--layouts/index.html2
-rw-r--r--layouts/partials/footer.gmi2
-rw-r--r--layouts/partials/footer.html2
-rw-r--r--layouts/partials/head.html2
-rw-r--r--layouts/partials/header.gmi2
-rw-r--r--layouts/partials/metadata.gmi2
-rw-r--r--layouts/partials/metadata.html2
-rw-r--r--layouts/partials/pageinfo.gmi18
-rw-r--r--layouts/partials/pageinfo.html23
-rw-r--r--layouts/taxonomy/taxonomy.atom.xml6
-rw-r--r--layouts/taxonomy/taxonomy.gemini_atom.xml16
-rw-r--r--layouts/taxonomy/taxonomy.gmi6
-rw-r--r--layouts/taxonomy/taxonomy.html6
-rw-r--r--layouts/term/term.atom.xml6
-rw-r--r--layouts/term/term.gemini_atom.xml16
-rw-r--r--layouts/term/term.gmi6
-rw-r--r--layouts/term/term.html4
30 files changed, 324 insertions, 155 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3c62b30..78f3c14 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,100 @@
# Changelog
+## [1.6.7] - 2025-02-06
+
+### Changed
+
+* Add non-breaking spaces within entry tag names
+
+## [1.6.6] - 2025-02-06
+
+### Changed
+
+* Add non-breaking spaces after emojis and within entry dates and read times
+* Remove commas from entry tag list in html output format
+
+### Fixed
+
+* Move taxonomy and term feeds' link emojis to outside link text in html output format
+
+## [1.6.5] - 2025-02-05
+
+### Fixed
+
+- Add missing hyphen to compound modifier in pageinfo partial for English translation
+
+## [1.6.4] - 2025-01-28
+
+### Added
+
+- Add Gemini capsule demo URL to README.md
+
+## [1.6.3] - 2024-11-25
+
+### Changed
+
+- Move css stylesheet to subdirectory
+
+## [1.6.2] - 2024-11-23
+
+### Changed
+
+- Improve conversion of ref numbers to superscripts
+
+## [1.6.1] - 2024-11-08
+
+### Fixed
+
+- Fix typo in README.md
+
+## [1.6.0] - 2024-11-08
+
+### Changed
+
+- Make hover/non-hover link colors equivalent
+- Improve code readability
+
+### Added
+
+- Add distinct CSS styling to external links
+
+### Fixed
+
+- Disable html renderer in gemtext output format
+- Disable html-specific features in gemtext output format
+- Stop treating link titles as safe html
+
+## [1.5.0] - 2024-11-07
+
+### Changed
+
+- Transition to new config file naming convention
+- Convert tabs to spaces
+
+### Added
+
+- Add time element to entry date and duration in HTML output format
+
+### Removed
+
+- Remove niche timestamp obfuscation privacy feature
+
+## [1.4.0] - 2024-08-16
+
+### Changed
+
+- Make author element optional in Atom feeds
+- Make email subelement optional in author element
+
+### Added
+
+- Add support for site.Params.author, retain compatibility with site.Author
+
+### Fixed
+
+- Remove erroneous "index.gmi" suffix in gemtext Atom feeds
+- Fix incorrect greedy italics/bold parsing in gemtext renderer
+
## [1.3.7] - 2024-07-04
### Fixed
@@ -434,6 +529,16 @@
_First release._
+[1.6.7]: https://git.nicholasjohnson.ch/hugo-theme-journal/tag/?h=v1.6.7
+[1.6.6]: https://git.nicholasjohnson.ch/hugo-theme-journal/tag/?h=v1.6.6
+[1.6.5]: https://git.nicholasjohnson.ch/hugo-theme-journal/tag/?h=v1.6.5
+[1.6.4]: https://git.nicholasjohnson.ch/hugo-theme-journal/tag/?h=v1.6.4
+[1.6.3]: https://git.nicholasjohnson.ch/hugo-theme-journal/tag/?h=v1.6.3
+[1.6.2]: https://git.nicholasjohnson.ch/hugo-theme-journal/tag/?h=v1.6.2
+[1.6.1]: https://git.nicholasjohnson.ch/hugo-theme-journal/tag/?h=v1.6.1
+[1.6.0]: https://git.nicholasjohnson.ch/hugo-theme-journal/tag/?h=v1.6.0
+[1.5.0]: https://git.nicholasjohnson.ch/hugo-theme-journal/tag/?h=v1.5.0
+[1.4.0]: https://git.nicholasjohnson.ch/hugo-theme-journal/tag/?h=v1.4.0
[1.3.7]: https://git.nicholasjohnson.ch/hugo-theme-journal/tag/?h=v1.3.7
[1.3.6]: https://git.nicholasjohnson.ch/hugo-theme-journal/tag/?h=v1.3.6
[1.3.5]: https://git.nicholasjohnson.ch/hugo-theme-journal/tag/?h=v1.3.5
diff --git a/README.md b/README.md
index 42ecb4b..8220c86 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,10 @@ Hugo Journal Theme is an accessible, no-JS, minimalist, high-contrast Hugo theme
## Demo
-A live demo of the theme can be found at the following domain: [https://nicholasjohnson.ch](https://nicholasjohnson.ch)
+A live demo of the theme can be found at the following URLs:
+
+* [gemini://nicholasjohnson.ch](gemini://nicholasjohnson.ch)
+* [https://nicholasjohnson.ch](https://nicholasjohnson.ch)
## Features
@@ -21,7 +24,7 @@ A live demo of the theme can be found at the following domain: [https://nicholas
## Documentation
-The [gemtext compatibility reference guide](GEMTEXT-COMPATIBILITY-REFERENCE-GUIDE.md) documents the compatibility of Markdown features with gemtext as an output format in of this Hugo theme. The [gemtext compatibility rationale document](GEMTEXT-COMPATIBILITY-RATIONALE.md) explains the rationale behind the design decisions for the gemtext output format.
+The [gemtext compatibility reference guide](GEMTEXT-COMPATIBILITY-REFERENCE-GUIDE.md) documents the compatibility of Markdown features with gemtext as an output format of this Hugo theme. The [gemtext compatibility rationale document](GEMTEXT-COMPATIBILITY-RATIONALE.md) explains the rationale behind the design decisions for the gemtext output format.
## Get The Theme
diff --git a/archetypes/entry.md b/archetypes/entry.md
index 32d6347..e4b95fc 100644
--- a/archetypes/entry.md
+++ b/archetypes/entry.md
@@ -1,6 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
-date: {{ now.UTC.Format "2006-01-02T00:00:00Z" }}
+date: {{ now.Format "2006-01-02T15:04:05-0700" }}
draft: true
---
diff --git a/assets/style.css b/assets/static/css/style.css
index b6d506f..81ea8bd 100644
--- a/assets/style.css
+++ b/assets/static/css/style.css
@@ -115,12 +115,24 @@ blockquote, ol, p, pre, ul, .highlight {
}
.link {
- color: #0091ea;
text-underline-offset: 3px;
}
-.link:hover {
- background-color: #004eff;
+.link--internal {
+ color: #0091ea;
+}
+
+.link--internal:hover {
+ background-color: #0091ea;
+ color: black;
+}
+
+.link--external {
+ color: #9370DB;
+}
+
+.link--external:hover {
+ background-color: #9370DB;
color: black;
}
diff --git a/config/_default/config.toml b/config/_default/hugo.toml
index e2e77ea..78f2292 100644
--- a/config/_default/config.toml
+++ b/config/_default/hugo.toml
@@ -10,9 +10,14 @@
baseName = "atom"
[outputFormats.Gemini]
mediaType = "text/gemini"
+ isPlainText = true # Disable HTML renderer
+ isHTML = false # Disable LiveReload, alias redirect, etc.
+ permalinkable = true
+ protocol = "gemini://"
[outputFormats.Gemini_Atom]
mediaType = "application/atom"
baseName = "atom"
+ protocol = "gemini://"
[markup]
[markup.goldmark]
diff --git a/i18n/en.toml b/i18n/en.toml
index 7b9c38a..9f122c8 100644
--- a/i18n/en.toml
+++ b/i18n/en.toml
@@ -1,5 +1,5 @@
[readingTime]
- other = "{{ .Count }} minute read"
+ other = "{{ .Count }}-minute read"
[returnHome]
other = "Return to homepage"
diff --git a/layouts/404.html b/layouts/404.html
index f3b9742..dfb2c5f 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 link--internal" href="{{ .Site.Home.RelPermalink }}" rel="noreferrer">{{ i18n "returnHome" }}</a></p>
</nav>
<main>
<h1 id="404">{{ i18n "pageNotFound" }}</h1>
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
index 934c0ef..8fb3c26 100644
--- a/layouts/_default/_markup/render-link.html
+++ b/layouts/_default/_markup/render-link.html
@@ -1,2 +1,3 @@
{{ $emoji := cond (and (not (.Page.Params.makerefs | default true)) (.Page.Params.showlinkemoji | default true)) (emojify ":link: ") "" -}}
-{{ $emoji }}<a class="link" href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }} rel="noreferrer">{{ .Text | safeHTML }}</a> \ No newline at end of file
+{{ $isExternalLink := (urls.Parse .Destination).IsAbs -}}
+{{ $emoji }}<a class="link {{ if $isExternalLink }}link--external{{ else }}link--internal{{ end }}" href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }} rel="{{ if $isExternalLink }}external {{ end }}noreferrer">{{ .Text }}</a> \ No newline at end of file
diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi
index 2064bdd..1502830 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" -}}
+{{ $emoji := cond (.Page.Params.showlinkemoji | default true) (emojify ":link: ") "" -}}
+=> {{ .Site.Home.RelPermalink | strings.TrimSuffix "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 -}}
@@ -24,86 +24,92 @@
{{ $ref_index := 0 -}}
{{ range $chunks -}}
- {{ $above_pre := index . 1 -}}
- {{ $pre := index . 2 -}}
- {{ $below_pre := index . 3 -}}
-
- {{/* mux regex matches above and below preformatted text for rendering (the matches are mutually exclusive) */ -}}
- {{ $rendered_text := print $above_pre $below_pre -}}
-
- {{ if ($.Page.Params.makerefs | default true) -}}
-
- {{/* find all the links within a chunk */ -}}
- {{ $chunk_refs := findRESubmatch `!?\[[\t ]*(.+?)[\t ]*\]\([\t ]*(.+?)(?:[\t ]+"(.+?)")?[\t ]*\)` $rendered_text -}}
-
- {{ range $chunk_refs -}}
- {{ $ref_index = add $ref_index 1 -}}
- {{ $chunk_ref := dict
- "index" $ref_index
- "text" (index . 1)
- "link" (index . 2)
- "title" (index . 3)
- -}}
-
- {{ $scratch.Add "refs" (slice $chunk_ref) -}}
-
- {{ $ref_index := $chunk_ref.index -}}
- {{ $ref_text := $chunk_ref.text -}}
-
- {{/* create superscript of $ref_index */ -}}
- {{ $ref_index := replace $ref_index "0" "⁰" -}}
- {{ $ref_index = replace $ref_index "1" "¹" -}}
- {{ $ref_index = replace $ref_index "2" "²" -}}
- {{ $ref_index = replace $ref_index "3" "³" -}}
- {{ $ref_index = replace $ref_index "4" "⁴" -}}
- {{ $ref_index = replace $ref_index "5" "⁵" -}}
- {{ $ref_index = replace $ref_index "6" "⁶" -}}
- {{ $ref_index = replace $ref_index "7" "⁷" -}}
- {{ $ref_index = replace $ref_index "8" "⁸" -}}
- {{ $ref_index = replace $ref_index "9" "⁹" -}}
-
- {{/* replace Markdown links with link text and their superscripted reference numbers */ -}}
- {{ $rendered_text = replace $rendered_text (index . 0) (print $ref_text $ref_index) 1 -}}
-
- {{ end -}}
-
- {{ else -}}
-
- {{/* render all links directly */ -}}
- {{ $rendered_text = $rendered_text | replaceRE `(?m)^!?\[[\t ]*(.+?)[\t ]*\]\([\t ]*(.+?)(?:[\t ]+"(.+?)")?[\t ]*\)$` (print "=> $2 " $emoji "$1") -}}
-
- {{ end -}}
-
- {{/* trim extra heading symbols */ -}}
- {{ $rendered_text = $rendered_text | replaceRE `(?m)^####{1,3} ` "### " -}}
-
- {{/* convert Markdown alternative heading syntax to gemtext heading syntax */ -}}
- {{ $rendered_text = $rendered_text | replaceRE `(?m)^[\t ]*(\S.+?)[\t ]*\n\=+$` "# $1" -}}
- {{ $rendered_text = $rendered_text | replaceRE `(?m)^[\t ]*(\S.+?)[\t ]*\n\-+$` "## $1" -}}
-
- {{/* convert Markdown alternative unordered list syntax to gemtext unordered list syntax */ -}}
- {{ $rendered_text = $rendered_text | replaceRE `(?m)^[-+] ` "* " -}}
-
- {{/* convert Markdown ordered list items to gemtext unordered list items */ -}}
- {{ $rendered_text = $rendered_text | replaceRE `(?m)^[1-9]\d*\.[\t ]+(.*?)[\t ]*$` "* $1" -}}
-
- {{/* remove bold and italics asterisk symbols */ -}}
- {{/* note: this operation is performed in 3 steps to handle nested bold and italics */ -}}
- {{/* note: this operation is performed last to avoid incorrectly rendering (un)ordered lists */ -}}
- {{ $rendered_text = $rendered_text | replaceRE `\*{3}(\S(?:.*?\S)?)\*{3}` "$1" -}}
- {{ $rendered_text = $rendered_text | replaceRE `\*{2}(\S(?:.*?\S)?)\*{2}` "$1" -}}
- {{ $rendered_text = $rendered_text | replaceRE `\*{1}(\S(?:.*?\S)?)\*{1}` "$1" -}}
-
- {{ $rendered_text = $rendered_text | emojify -}}
-
- {{/* demux regex matches above and below preformatted text */ -}}
- {{ if $above_pre -}}
- {{ $rendered_text | safeHTML -}}
- {{ $pre | safeHTML -}}
- {{ else -}}
- {{ $pre | safeHTML -}}
- {{ $rendered_text | safeHTML -}}
- {{ end -}}
+ {{ $above_pre := index . 1 -}}
+ {{ $pre := index . 2 -}}
+ {{ $below_pre := index . 3 -}}
+
+ {{/* mux regex matches above and below preformatted text for rendering (the matches are mutually exclusive) */ -}}
+ {{ $rendered_text := print $above_pre $below_pre -}}
+
+ {{ if ($.Page.Params.makerefs | default true) -}}
+
+ {{/* find all the links within a chunk */ -}}
+ {{ $chunk_refs := findRESubmatch `!?\[[\t ]*(.+?)[\t ]*\]\([\t ]*(.+?)(?:[\t ]+"(.+?)")?[\t ]*\)` $rendered_text -}}
+
+ {{ range $chunk_refs -}}
+ {{ $ref_index = add $ref_index 1 -}}
+ {{ $chunk_ref := dict
+ "index" $ref_index
+ "text" (index . 1)
+ "link" (index . 2)
+ "title" (index . 3)
+ -}}
+
+ {{ $scratch.Add "refs" (slice $chunk_ref) -}}
+
+ {{ $ref_index := $chunk_ref.index -}}
+ {{ $ref_text := $chunk_ref.text -}}
+
+ {{/* create superscript of $ref_index */ -}}
+ {{ $superscript_map := dict
+ "0" "⁰"
+ "1" "¹"
+ "2" "²"
+ "3" "³"
+ "4" "⁴"
+ "5" "⁵"
+ "6" "⁶"
+ "7" "⁷"
+ "8" "⁸"
+ "9" "⁹"
+ -}}
+ {{ $ref_superscript := "" -}}
+ {{ range (split $ref_index "") -}}
+ {{ $ref_superscript = print $ref_superscript (index $superscript_map .) -}}
+ {{ end -}}
+
+ {{/* replace Markdown links with link text and their superscripted reference numbers */ -}}
+ {{ $rendered_text = replace $rendered_text (index . 0) (print $ref_text $ref_superscript) 1 -}}
+
+ {{ end -}}
+
+ {{ else -}}
+
+ {{/* render all links directly */ -}}
+ {{ $rendered_text = $rendered_text | replaceRE `(?m)^!?\[[\t ]*(.+?)[\t ]*\]\([\t ]*(.+?)(?:[\t ]+"(.+?)")?[\t ]*\)$` (print "=> $2 " $emoji "$1") -}}
+
+ {{ end -}}
+
+ {{/* trim extra heading symbols */ -}}
+ {{ $rendered_text = $rendered_text | replaceRE `(?m)^####{1,3} ` "### " -}}
+
+ {{/* convert Markdown alternative heading syntax to gemtext heading syntax */ -}}
+ {{ $rendered_text = $rendered_text | replaceRE `(?m)^[\t ]*(\S.+?)[\t ]*\n\=+$` "# $1" -}}
+ {{ $rendered_text = $rendered_text | replaceRE `(?m)^[\t ]*(\S.+?)[\t ]*\n\-+$` "## $1" -}}
+
+ {{/* convert Markdown alternative unordered list syntax to gemtext unordered list syntax */ -}}
+ {{ $rendered_text = $rendered_text | replaceRE `(?m)^[-+] ` "* " -}}
+
+ {{/* convert Markdown ordered list items to gemtext unordered list items */ -}}
+ {{ $rendered_text = $rendered_text | replaceRE `(?m)^[1-9]\d*\.[\t ]+(.*?)[\t ]*$` "* $1" -}}
+
+ {{/* remove bold and italics asterisk symbols */ -}}
+ {{/* note: this operation is performed in 3 steps to handle nested bold and italics */ -}}
+ {{/* note: this operation is performed last to avoid incorrectly rendering (un)ordered lists */ -}}
+ {{ $rendered_text = $rendered_text | replaceRE `\*{3}(\S(?:.*?\S)?)\*{3}` "$1" -}}
+ {{ $rendered_text = $rendered_text | replaceRE `\*{2}(\S(?:.*?\S)?)\*{2}` "$1" -}}
+ {{ $rendered_text = $rendered_text | replaceRE `\*{1}(\S(?:.*?\S)?)\*{1}` "$1" -}}
+
+ {{ $rendered_text = $rendered_text | emojify -}}
+
+ {{/* demux regex matches above and below preformatted text */ -}}
+ {{ if $above_pre -}}
+ {{ $rendered_text -}}
+ {{ $pre -}}
+ {{ else -}}
+ {{ $pre -}}
+ {{ $rendered_text -}}
+ {{ end -}}
{{ end -}}
@@ -113,13 +119,13 @@
## {{ i18n "refs" }}
{{ range $refs -}}
- {{ $ref_index := .index -}}
- {{ $ref_text := .text -}}
- {{ $ref_link := .link -}}
- {{ $ref_title := .title -}}
+ {{ $ref_index := .index -}}
+ {{ $ref_text := .text -}}
+ {{ $ref_link := .link -}}
+ {{ $ref_title := .title -}}
- {{/* render referenced links */}}
-{{ print "=> " $ref_link (emojify " :link: [") $ref_index "]: " (cond (ne (len $ref_title) 0) $ref_title $ref_text) | safeHTML -}}
+ {{/* render referenced links */}}
+{{ print "=> " $ref_link (emojify " :link: [") $ref_index "]: " (cond (ne (len $ref_title) 0) $ref_title $ref_text) -}}
{{ end -}}
{{ end -}}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index cd80256..fdfa777 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:" }}&nbsp;<a class="link link--internal" 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.atom.xml b/layouts/index.atom.xml
index 6c3a111..0d988ee 100644
--- a/layouts/index.atom.xml
+++ b/layouts/index.atom.xml
@@ -34,7 +34,7 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ .Permalink }}</id>
<title>{{ .Site.Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink }}atom.xml" rel="self" />
<link href="{{ .Permalink }}" rel="alternate" />
{{- with $authorName }}
@@ -44,12 +44,12 @@
<email>{{ . }}</email>{{ end }}
</author>{{ end }}
<generator>Hugo -- gohugo.io</generator>
- <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }}</rights>
+ <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}</rights>
<subtitle>{{ .Site.Params.Description }}</subtitle>{{ range first .Site.Config.Services.RSS.Limit .Site.RegularPages }}
<entry>
<id>{{ .Permalink }}</id>
<title type="html">{{ .Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink }}" />
<content type="html">{{ .Content | html }}</content>
</entry>{{ end }}
diff --git a/layouts/index.gemini_atom.xml b/layouts/index.gemini_atom.xml
index a6abebc..446f9f8 100644
--- a/layouts/index.gemini_atom.xml
+++ b/layouts/index.gemini_atom.xml
@@ -32,11 +32,11 @@
{{ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" | safeHTML }}
<feed xmlns="http://www.w3.org/2005/Atom">
- <id>{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" }}</id>
+ <id>{{ .Permalink | strings.TrimSuffix "index.gmi" }}</id>
<title>{{ .Site.Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
- <link href="{{ .Permalink | replaceRE `^https://(.*)/index.gmi$` "gemini://$1/atom.xml" | safeURL }}" rel="self" />
- <link href="{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" | safeURL }}" rel="alternate" />
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
+ <link href="{{ .Permalink | replaceRE `index.gmi$` "atom.xml" | safeURL }}" rel="self" />
+ <link href="{{ .Permalink | strings.TrimSuffix "index.gmi" | safeURL }}" rel="alternate" />
{{- with $authorName }}
<author>
<name>{{ . }}</name>
@@ -44,12 +44,12 @@
<email>{{ . }}</email>{{ end }}
</author>{{ end }}
<generator>Hugo -- gohugo.io</generator>
- <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }}</rights>
+ <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}</rights>
<subtitle>{{ .Site.Params.Description }}</subtitle>{{ range first .Site.Config.Services.RSS.Limit .Site.RegularPages }}
<entry>
- <id>{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" }}</id>
+ <id>{{ .Permalink | strings.TrimSuffix "index.gmi" }}</id>
<title>{{ .Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
- <link href="{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" | safeURL }}" rel="alternate" />
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
+ <link href="{{ .Permalink | strings.TrimSuffix "index.gmi" | safeURL }}" rel="alternate" />
</entry>{{ end }}
</feed>
diff --git a/layouts/index.gmi b/layouts/index.gmi
index 05250fd..4ce3bf1 100644
--- a/layouts/index.gmi
+++ b/layouts/index.gmi
@@ -1,14 +1,14 @@
{{ define "main" -}}
-# {{ .Site.Params.indexTitle | safeHTML }}
+# {{ .Site.Params.indexTitle }}
-{{ .Site.Params.indexIntro | safeHTML }}
+{{ .Site.Params.indexIntro }}
{{- if .Site.Menus.main }}
## {{ i18n "navLinks" }}
{{ range .Site.Menus.main }}
-=> {{ .URL }} {{ emojify ":link:" | safeHTML }} {{ .Name | safeHTML -}}
+=> {{ .URL }} {{ emojify ":link:" }} {{ .Name -}}
{{ end -}}
{{ end -}}
diff --git a/layouts/index.html b/layouts/index.html
index 6f231df..efbebb1 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:" }}&nbsp;<a class="link link--internal" href="{{ .URL }}" rel="noreferrer">{{ .Name }}</a></li>
{{- end }}
</ul>
</nav>
diff --git a/layouts/partials/footer.gmi b/layouts/partials/footer.gmi
index 957c9d0..06b0678 100644
--- a/layouts/partials/footer.gmi
+++ b/layouts/partials/footer.gmi
@@ -1 +1 @@
-{{ replace $.Site.Copyright "{currentYear}" (now.UTC.Format "2006") | safeHTML }} \ No newline at end of file
+{{ replace $.Site.Copyright "{currentYear}" (now.Format "2006") }} \ No newline at end of file
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 00194b2..5f8ffc6 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,3 +1,3 @@
<footer class="footer">
- <p class="footer__text">{{ replace $.Site.Copyright "{currentYear}" (now.UTC.Format "2006") }}</p>
+ <p class="footer__text">{{ replace $.Site.Copyright "{currentYear}" (now.Format "2006") }}</p>
</footer> \ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 8132ec8..8250e19 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -13,7 +13,7 @@
<link rel="stylesheet" type="text/css" href="{{ relURL . }}">
{{- end -}}
{{ else }}
- <link rel="stylesheet" type="text/css" href="{{ (resources.Get "style.css").RelPermalink }}">
+ <link rel="stylesheet" type="text/css" href="{{ (resources.Get "static/css/style.css").RelPermalink }}">
{{- end -}}
{{ if (not (fileExists "static/favicon.ico")) }}
<link rel="icon" href="data:,">
diff --git a/layouts/partials/header.gmi b/layouts/partials/header.gmi
index a7f87a9..c70f84a 100644
--- a/layouts/partials/header.gmi
+++ b/layouts/partials/header.gmi
@@ -1,3 +1,3 @@
```plaintext
-{{ chomp (readFile "templates/logo.txt") | safeHTML }}
+{{ chomp (readFile "templates/logo.txt") }}
``` \ No newline at end of file
diff --git a/layouts/partials/metadata.gmi b/layouts/partials/metadata.gmi
index a4bf636..48d3db4 100644
--- a/layouts/partials/metadata.gmi
+++ b/layouts/partials/metadata.gmi
@@ -1,2 +1,2 @@
{{ partial "pageinfo.gmi" . }}
-=> {{ .RelPermalink | replaceRE `(?m)index.gmi$` "" }} {{ emojify ":link:" | safeHTML }} {{ .Title | safeHTML }} \ No newline at end of file
+=> {{ .RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ .Title }} \ No newline at end of file
diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html
index 47106e8..ed091b8 100644
--- a/layouts/partials/metadata.html
+++ b/layouts/partials/metadata.html
@@ -1,6 +1,6 @@
<article>
<header>
<p>{{ partial "pageinfo.html" . }}<br>
- {{ emojify ":link:" }} <a class="link" href="{{ .RelPermalink }}" rel="noreferrer">{{ .Title }}</a></p>
+ {{ emojify ":link:" }}&nbsp;<a class="link link--internal" href="{{ .RelPermalink }}" rel="noreferrer">{{ .Title }}</a></p>
</header>
</article> \ No newline at end of file
diff --git a/layouts/partials/pageinfo.gmi b/layouts/partials/pageinfo.gmi
index 951bdf4..9993d93 100644
--- a/layouts/partials/pageinfo.gmi
+++ b/layouts/partials/pageinfo.gmi
@@ -1,2 +1,18 @@
{{ $dateFormat := .Site.Params.dateFormat | default ":date_long" -}}
-{{ emojify ":calendar:" | safeHTML }} {{ .Page.PublishDate | time.Format $dateFormat | safeHTML }} | {{ emojify ":stopwatch:" | safeHTML }} {{ i18n "readingTime" .ReadingTime }}{{ if (.Param (lower (i18n "tags"))) }} | {{ emojify ":label:" | safeHTML }} {{ end }}{{ range $key, $val := (.Param (lower (i18n "tags"))) }}{{ if $key }}, {{ end }}{{ $val }}{{ end }} \ No newline at end of file
+
+{{ $nonBreakingPublishDate := .Page.PublishDate | time.Format $dateFormat -}}
+{{ $nonBreakingPublishDate = replace $nonBreakingPublishDate " " " " -}}
+{{ $nonBreakingPublishDate = replace $nonBreakingPublishDate "-" "‑" -}}
+
+{{ $nonBreakingReadingTime := i18n "readingTime" .ReadingTime -}}
+{{ $nonBreakingReadingTime = replace $nonBreakingReadingTime " " " " -}}
+{{ $nonBreakingReadingTime = replace $nonBreakingReadingTime "-" "‑" -}}
+
+{{ $nonBreakingTags := slice -}}
+{{ range .Param (lower (i18n "tags")) -}}
+ {{ $nonBreakingTag := replace . " " " " -}}
+ {{ $nonBreakingTag = replace $nonBreakingTag "-" "‑" -}}
+ {{ $nonBreakingTags = $nonBreakingTags | append $nonBreakingTag -}}
+{{ end -}}
+
+{{ emojify ":calendar:" }} {{ $nonBreakingPublishDate }} | {{ emojify ":stopwatch:" }} {{ $nonBreakingReadingTime }}{{ if $nonBreakingTags }} | {{ emojify ":label:" }} {{ end }}{{ range $key, $val := $nonBreakingTags }}{{ if $key }}, {{ end }}{{ $val }}{{ end }} \ No newline at end of file
diff --git a/layouts/partials/pageinfo.html b/layouts/partials/pageinfo.html
index ace8d18..3ca8fe9 100644
--- a/layouts/partials/pageinfo.html
+++ b/layouts/partials/pageinfo.html
@@ -1,2 +1,23 @@
{{ $dateFormat := .Site.Params.dateFormat | default ":date_long" -}}
-{{ emojify ":calendar:" | safeHTML }} {{ .Page.PublishDate | time.Format $dateFormat | safeHTML }} | {{ emojify ":stopwatch:" | safeHTML }} {{ i18n "readingTime" .ReadingTime | safeHTML }}{{ 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 }} \ No newline at end of file
+
+{{/* user-overridable parameter $dateFormat is escaped pre-insertion so that HTML entities can be inserted */ -}}
+{{ $nonBreakingPublishDate := .Page.PublishDate | time.Format $dateFormat | htmlEscape -}}
+{{ $nonBreakingPublishDate = replace $nonBreakingPublishDate " " "&nbsp;" -}}
+{{ $nonBreakingPublishDate = replace $nonBreakingPublishDate "-" "&#8209;" -}}
+
+{{/* user-overridable parameter $readingTime is escaped pre-insertion so that HTML entities can be inserted */ -}}
+{{ $nonBreakingReadingTime := i18n "readingTime" .ReadingTime | htmlEscape -}}
+{{ $nonBreakingReadingTime = replace $nonBreakingReadingTime " " "&nbsp;" -}}
+{{ $nonBreakingReadingTime = replace $nonBreakingReadingTime "-" "&#8209;" -}}
+
+{{ $breakingTags := .Param (lower (i18n "tags")) -}}
+{{ $nonBreakingTags := slice -}}
+{{ range $breakingTags -}}
+ {{/* user-defined tags are escaped pre-insertion so that HTML entities can be inserted */ -}}
+ {{ $nonBreakingTag := htmlEscape . -}}
+ {{ $nonBreakingTag = replace $nonBreakingTag " " "&nbsp;" -}}
+ {{ $nonBreakingTag = replace $nonBreakingTag "-" "&#8209;" -}}
+ {{ $nonBreakingTags = $nonBreakingTags | append $nonBreakingTag -}}
+{{ end -}}
+
+{{ emojify ":calendar:" }}&nbsp;<time {{ printf "datetime=%q" (.Page.PublishDate | time.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>{{ $nonBreakingPublishDate | safeHTML }}</time> | {{ emojify ":stopwatch:" }}&nbsp;<time datetime="PT{{ .ReadingTime }}M">{{ $nonBreakingReadingTime | safeHTML }}</time>{{ if $nonBreakingTags }} | {{ emojify ":label:" }}&nbsp;{{ end }}{{ range $key, $val := $nonBreakingTags }}{{ if $key }} {{ end }}<a class="link link--internal" href='{{ relLangURL (lower (i18n "tags")) }}/{{ index $breakingTags $key | urlize }}/' rel="noreferrer">{{ $val | safeHTML }}</a>{{ end }}
diff --git a/layouts/taxonomy/taxonomy.atom.xml b/layouts/taxonomy/taxonomy.atom.xml
index 9ceeb79..cbcbae8 100644
--- a/layouts/taxonomy/taxonomy.atom.xml
+++ b/layouts/taxonomy/taxonomy.atom.xml
@@ -34,7 +34,7 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ .Permalink }}</id>
<title>{{ .Site.Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink }}atom.xml" rel="self" />
<link href="{{ .Permalink }}" rel="alternate" />
{{- with $authorName }}
@@ -44,12 +44,12 @@
<email>{{ . }}</email>{{ end }}
</author>{{ end }}
<generator>Hugo -- gohugo.io</generator>
- <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }}</rights>
+ <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}</rights>
<subtitle>{{ .Site.Params.Description }}</subtitle>{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }}
<entry>
<id>{{ .Permalink }}</id>
<title type="html">{{ .Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink }}" />
<content type="html">{{ .Content | html }}</content>
</entry>{{ end }}
diff --git a/layouts/taxonomy/taxonomy.gemini_atom.xml b/layouts/taxonomy/taxonomy.gemini_atom.xml
index 5eadc00..76431e3 100644
--- a/layouts/taxonomy/taxonomy.gemini_atom.xml
+++ b/layouts/taxonomy/taxonomy.gemini_atom.xml
@@ -32,11 +32,11 @@
{{ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" | safeHTML }}
<feed xmlns="http://www.w3.org/2005/Atom">
- <id>{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" }}</id>
+ <id>{{ .Permalink | strings.TrimSuffix "index.gmi" }}</id>
<title>{{ .Site.Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
- <link href="{{ .Permalink | replaceRE `^https://(.*)/index.gmi$` "gemini://$1/atom.xml" | safeURL }}" rel="self" />
- <link href="{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" | safeURL }}" rel="alternate" />
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
+ <link href="{{ .Permalink | replaceRE `index.gmi$` "atom.xml" | safeURL }}" rel="self" />
+ <link href="{{ .Permalink | strings.TrimSuffix "index.gmi" | safeURL }}" rel="alternate" />
{{- with $authorName }}
<author>
<name>{{ . }}</name>
@@ -44,12 +44,12 @@
<email>{{ . }}</email>{{ end }}
</author>{{ end }}
<generator>Hugo -- gohugo.io</generator>
- <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }}</rights>
+ <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}</rights>
<subtitle>{{ .Site.Params.Description }}</subtitle>{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }}
<entry>
- <id>{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" }}</id>
+ <id>{{ .Permalink | strings.TrimSuffix "index.gmi" }}</id>
<title>{{ .Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
- <link href="{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" | safeURL }}" rel="alternate" />
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
+ <link href="{{ .Permalink | strings.TrimSuffix "index.gmi" | safeURL }}" rel="alternate" />
</entry>{{ end }}
</feed>
diff --git a/layouts/taxonomy/taxonomy.gmi b/layouts/taxonomy/taxonomy.gmi
index 873571d..9c2a9f0 100644
--- a/layouts/taxonomy/taxonomy.gmi
+++ b/layouts/taxonomy/taxonomy.gmi
@@ -1,5 +1,5 @@
{{ define "main" -}}
-=> {{ .Site.Home.RelPermalink | replaceRE `(?m)index.gmi$` "" }} {{ emojify ":link:" | safeHTML }} {{ i18n "returnHome" }}
+=> {{ .Site.Home.RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ i18n "returnHome" }}
# {{ .Type | humanize }}
@@ -7,11 +7,11 @@
## {{ i18n "feeds" }}
-=> {{ .RelPermalink | replaceRE `(?m)index.gmi$` "atom.xml" | safeHTML }} {{ emojify ":link:" | safeHTML }} {{ i18n "atomFeed" }}
+=> {{ .RelPermalink | replaceRE `index.gmi$` "atom.xml" }} {{ emojify ":link:" }} {{ i18n "atomFeed" }}
## {{ i18n "list" }}
{{ range .Data.Pages }}
-=> {{ .RelPermalink | replaceRE `(?m)index.gmi$` "" }} {{ emojify ":link:" | safeHTML }} {{ .Title | safeHTML -}}
+=> {{ .RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ .Title -}}
{{ end -}}
{{ end }} \ No newline at end of file
diff --git a/layouts/taxonomy/taxonomy.html b/layouts/taxonomy/taxonomy.html
index 51e00a3..86d7f89 100644
--- a/layouts/taxonomy/taxonomy.html
+++ b/layouts/taxonomy/taxonomy.html
@@ -1,15 +1,15 @@
{{ define "main" -}}
<nav>
- <p>{{ emojify ":link:" | safeHTML }} <a class="link" href="{{ .Site.Home.RelPermalink }}" rel="noreferrer">{{ i18n "returnHome" }}</a></p>
+ <p>{{ emojify ":link:" }}&nbsp;<a class="link link--internal" 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>{{ emojify ":link:" }}&nbsp;<a class="link link--internal" href="{{ print .RelPermalink "atom.xml" }}" rel="noreferrer">{{ i18n "atomFeed" }}</a></p>
<h2>{{ i18n "list" }}</h2>
<ul class="list">
{{- range .Data.Pages }}
- <li class="list__item">{{ emojify ":link:" }} <a class="link" href="{{ .RelPermalink }}" rel="noreferrer">{{ .Title }}</a></li>
+ <li class="list__item">{{ emojify ":link:" }}&nbsp;<a class="link link--internal" href="{{ .RelPermalink }}" rel="noreferrer">{{ .Title }}</a></li>
{{- end }}
</ul>
</main>
diff --git a/layouts/term/term.atom.xml b/layouts/term/term.atom.xml
index 9ceeb79..cbcbae8 100644
--- a/layouts/term/term.atom.xml
+++ b/layouts/term/term.atom.xml
@@ -34,7 +34,7 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ .Permalink }}</id>
<title>{{ .Site.Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink }}atom.xml" rel="self" />
<link href="{{ .Permalink }}" rel="alternate" />
{{- with $authorName }}
@@ -44,12 +44,12 @@
<email>{{ . }}</email>{{ end }}
</author>{{ end }}
<generator>Hugo -- gohugo.io</generator>
- <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }}</rights>
+ <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}</rights>
<subtitle>{{ .Site.Params.Description }}</subtitle>{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }}
<entry>
<id>{{ .Permalink }}</id>
<title type="html">{{ .Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink }}" />
<content type="html">{{ .Content | html }}</content>
</entry>{{ end }}
diff --git a/layouts/term/term.gemini_atom.xml b/layouts/term/term.gemini_atom.xml
index e02d2fe..287bcc4 100644
--- a/layouts/term/term.gemini_atom.xml
+++ b/layouts/term/term.gemini_atom.xml
@@ -32,11 +32,11 @@
{{ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" | safeHTML }}
<feed xmlns="http://www.w3.org/2005/Atom">
- <id>{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" }}</id>
+ <id>{{ .Permalink | strings.TrimSuffix "index.gmi" }}</id>
<title>{{ .Site.Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
- <link href="{{ .Permalink | replaceRE `^https://(.*)/index.gmi$` "gemini://$1/atom.xml" | safeURL }}" rel="self" />
- <link href="{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" | safeURL }}" rel="alternate" />
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
+ <link href="{{ .Permalink | replaceRE `index.gmi$` "atom.xml" | safeURL }}" rel="self" />
+ <link href="{{ .Permalink | strings.TrimSuffix "index.gmi" | safeURL }}" rel="alternate" />
{{- with $authorName }}
<author>
<name>{{ . }}</name>
@@ -44,12 +44,12 @@
<email>{{ . }}</email>{{ end }}
</author>{{ end }}
<generator>Hugo -- gohugo.io</generator>
- <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }}</rights>
+ <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}</rights>
<subtitle>{{ .Site.Params.Description }}</subtitle>{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }}
<entry>
- <id>{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" }}</id>
+ <id>{{ .Permalink | strings.TrimSuffix "index.gmi" }}</id>
<title>{{ .Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
- <link href="{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" | safeURL }}" rel="alternate" />
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
+ <link href="{{ .Permalink | strings.TrimSuffix "index.gmi" | safeURL }}" rel="alternate" />
</entry>{{ end }}
</feed>
diff --git a/layouts/term/term.gmi b/layouts/term/term.gmi
index 8d6158f..5d7f7b1 100644
--- a/layouts/term/term.gmi
+++ b/layouts/term/term.gmi
@@ -1,13 +1,13 @@
{{ define "main" -}}
-=> {{ .Site.Home.RelPermalink | replaceRE `(?m)index.gmi$` "" }} {{ emojify ":link:" | safeHTML }} {{ i18n "returnHome" }}
+=> {{ .Site.Home.RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ i18n "returnHome" }}
-# {{ .Type | singularize | humanize | safeHTML }} "{{ .Title | safeHTML }}"
+# {{ .Type | singularize | humanize }} "{{ .Title }}"
## {{ i18n "feeds" }}
-=> {{ .RelPermalink | replaceRE `(?m)index.gmi$` "atom.xml" | safeHTML }} {{ emojify ":link:" | safeHTML }} {{ i18n "atomFeed" }}
+=> {{ .RelPermalink | replaceRE `index.gmi$` "atom.xml" }} {{ emojify ":link:" }} {{ i18n "atomFeed" }}
## {{ i18n "journalEntries" -}}
diff --git a/layouts/term/term.html b/layouts/term/term.html
index fa89acf..3b268dd 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:" }}&nbsp;<a class="link link--internal" 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>{{ emojify ":link:" }}&nbsp;<a class="link link--internal" href="{{ print .RelPermalink "atom.xml" }}" rel="noreferrer">{{ i18n "atomFeed" }}</a></p>
<h2>{{ i18n "journalEntries" }}</h2>
{{- range .Data.Pages.ByPublishDate.Reverse }}
{{ partial "metadata.html" . -}}