aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md40
-rw-r--r--README.md5
-rw-r--r--i18n/en.toml2
-rw-r--r--layouts/_default/single.gmi6
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/index.gmi2
-rw-r--r--layouts/index.html2
-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.gmi6
-rw-r--r--layouts/taxonomy/taxonomy.html6
-rw-r--r--layouts/term/term.gmi4
-rw-r--r--layouts/term/term.html4
15 files changed, 102 insertions, 22 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 161d554..78f3c14 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,40 @@
# 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
@@ -494,6 +529,11 @@
_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
diff --git a/README.md b/README.md
index 4c21eca..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
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/_default/single.gmi b/layouts/_default/single.gmi
index 7666f8c..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 | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ 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) }}
@@ -125,7 +125,7 @@
{{ $ref_title := .title -}}
{{/* render referenced links */}}
-{{ print "=> " $ref_link (emojify " :link: [") $ref_index "]: " (cond (ne (len $ref_title) 0) $ref_title $ref_text) -}}
+{{ 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 1a8aa10..fdfa777 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,6 +1,6 @@
{{ define "main" -}}
<nav>
- <p>{{ emojify ":link:" }} <a class="link link--internal" 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.gmi b/layouts/index.gmi
index ec9a959..4ce3bf1 100644
--- a/layouts/index.gmi
+++ b/layouts/index.gmi
@@ -8,7 +8,7 @@
## {{ i18n "navLinks" }}
{{ range .Site.Menus.main }}
-=> {{ .URL }} {{ emojify ":link:" }} {{ .Name -}}
+=> {{ .URL }} {{ emojify ":link:" }} {{ .Name -}}
{{ end -}}
{{ end -}}
diff --git a/layouts/index.html b/layouts/index.html
index c5ba561..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:" }} <a class="link link--internal" 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/metadata.gmi b/layouts/partials/metadata.gmi
index 04749d9..48d3db4 100644
--- a/layouts/partials/metadata.gmi
+++ b/layouts/partials/metadata.gmi
@@ -1,2 +1,2 @@
{{ partial "pageinfo.gmi" . }}
-=> {{ .RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ .Title }} \ 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 4158ee5..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 link--internal" 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 0e2d051..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:" }} {{ .Page.PublishDate | time.Format $dateFormat }} | {{ emojify ":stopwatch:" }} {{ i18n "readingTime" .ReadingTime }}{{ if (.Param (lower (i18n "tags"))) }} | {{ emojify ":label:" }} {{ 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 c002530..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:" }} <time {{ printf "datetime=%q" (.Page.PublishDate | time.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>{{ .Page.PublishDate | time.Format $dateFormat }}</time> | {{ emojify ":stopwatch:" }} <time datetime="PT{{ .ReadingTime }}M">{{ i18n "readingTime" .ReadingTime }}</time>{{ if (.Param (lower (i18n "tags"))) }} | {{ emojify ":label:" }} {{ end }}{{ range $key, $val := (.Param (lower (i18n "tags"))) }}{{ if $key }}, {{ end }}<a class="link link--internal" href='{{ relLangURL (lower (i18n "tags")) }}/{{ . | urlize }}/' rel="noreferrer">{{ $val }}</a>{{ end }}
+
+{{/* 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.gmi b/layouts/taxonomy/taxonomy.gmi
index a889b37..9c2a9f0 100644
--- a/layouts/taxonomy/taxonomy.gmi
+++ b/layouts/taxonomy/taxonomy.gmi
@@ -1,5 +1,5 @@
{{ define "main" -}}
-=> {{ .Site.Home.RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ i18n "returnHome" }}
+=> {{ .Site.Home.RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ i18n "returnHome" }}
# {{ .Type | humanize }}
@@ -7,11 +7,11 @@
## {{ i18n "feeds" }}
-=> {{ .RelPermalink | replaceRE `index.gmi$` "atom.xml" }} {{ emojify ":link:" }} {{ i18n "atomFeed" }}
+=> {{ .RelPermalink | replaceRE `index.gmi$` "atom.xml" }} {{ emojify ":link:" }} {{ i18n "atomFeed" }}
## {{ i18n "list" }}
{{ range .Data.Pages }}
-=> {{ .RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ .Title -}}
+=> {{ .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 7dd447d..86d7f89 100644
--- a/layouts/taxonomy/taxonomy.html
+++ b/layouts/taxonomy/taxonomy.html
@@ -1,15 +1,15 @@
{{ define "main" -}}
<nav>
- <p>{{ emojify ":link:" }} <a class="link link--internal" 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 link--internal" href="{{ print .RelPermalink "atom.xml" }}" rel="noreferrer"> {{ emojify ":link:" }} {{ 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 link--internal" 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.gmi b/layouts/term/term.gmi
index b2c7bcb..5d7f7b1 100644
--- a/layouts/term/term.gmi
+++ b/layouts/term/term.gmi
@@ -1,5 +1,5 @@
{{ define "main" -}}
-=> {{ .Site.Home.RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ i18n "returnHome" }}
+=> {{ .Site.Home.RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ i18n "returnHome" }}
# {{ .Type | singularize | humanize }} "{{ .Title }}"
@@ -7,7 +7,7 @@
## {{ i18n "feeds" }}
-=> {{ .RelPermalink | replaceRE `index.gmi$` "atom.xml" }} {{ emojify ":link:" }} {{ 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 33d5347..3b268dd 100644
--- a/layouts/term/term.html
+++ b/layouts/term/term.html
@@ -1,11 +1,11 @@
{{ define "main" -}}
<nav>
- <p>{{ emojify ":link:" }} <a class="link link--internal" 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 link--internal" href="{{ print .RelPermalink "atom.xml" }}" rel="noreferrer"> {{ emojify ":link:" }} {{ 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" . -}}