From be0d5a49d7c296118600dbc2cea43ea08576ac8f7010b1b146f742fb5f5c3c22 Mon Sep 17 00:00:00 2001
From: Nicholas Johnson <>
Date: Thu, 24 Jul 2025 00:00:00 +0000
Subject: Move taxonomy and term layouts to layouts/_default
Hugo's template system was reimplemented in Hugo version 0.146.0.
"We [the Hugo developers] have aimed to maintain as much backward
compatibility as possible by mapping "old to new," but some reported
breakages have occurred."
Reference: https://gohugo.io/templates/new-templatesystem-overview/
The "mapping "old to new,"" is not yet documented, but moving the
taxonomy and term layouts to layouts/_default seems to be sufficient to
properly generate this theme on Hugo versions later than 0.146.0.
To retain backward compatibility with older Hugo versions, the other
recommended changes to the layouts directory are not made.
Reference: https://gohugo.io/templates/new-templatesystem-overview/#changes-to-the-layouts-folder
---
layouts/_default/taxonomy.atom.xml | 56 +++++++++++++++++++++++++++++++
layouts/_default/taxonomy.gemini_atom.xml | 55 ++++++++++++++++++++++++++++++
layouts/_default/taxonomy.gmi | 17 ++++++++++
layouts/_default/taxonomy.html | 16 +++++++++
layouts/_default/term.atom.xml | 56 +++++++++++++++++++++++++++++++
layouts/_default/term.gemini_atom.xml | 55 ++++++++++++++++++++++++++++++
layouts/_default/term.gmi | 19 +++++++++++
layouts/_default/term.html | 14 ++++++++
8 files changed, 288 insertions(+)
create mode 100644 layouts/_default/taxonomy.atom.xml
create mode 100644 layouts/_default/taxonomy.gemini_atom.xml
create mode 100644 layouts/_default/taxonomy.gmi
create mode 100644 layouts/_default/taxonomy.html
create mode 100644 layouts/_default/term.atom.xml
create mode 100644 layouts/_default/term.gemini_atom.xml
create mode 100644 layouts/_default/term.gmi
create mode 100644 layouts/_default/term.html
(limited to 'layouts/_default')
diff --git a/layouts/_default/taxonomy.atom.xml b/layouts/_default/taxonomy.atom.xml
new file mode 100644
index 0000000..cbcbae8
--- /dev/null
+++ b/layouts/_default/taxonomy.atom.xml
@@ -0,0 +1,56 @@
+{{/* Deprecate site.Author.name in favor of site.Params.author.name */}}
+{{- $authorName := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .name }}
+ {{- $authorName = . }}
+ {{- end }}
+ {{- else }}
+ {{- $authorName = . }}
+ {{- end }}
+{{- else }}
+ {{- with site.Author.name }}
+ {{- $authorName = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
+ {{- end }}
+{{- end }}
+
+{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
+{{- $authorEmail := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .email }}
+ {{- $authorEmail = . }}
+ {{- end }}
+ {{- end }}
+{{- else }}
+ {{- with site.Author.email }}
+ {{- $authorEmail = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
+ {{- end }}
+{{- end -}}
+
+{{ "" | safeHTML }}
+
+ {{ .Permalink }}
+ {{ .Site.Title }}
+ {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}
+
+
+ {{- with $authorName }}
+
+ {{ . }}
+ {{- with $authorEmail }}
+ {{ . }} {{ end }}
+ {{ end }}
+ Hugo -- gohugo.io
+ {{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}
+ {{ .Site.Params.Description }} {{ range first .Site.Config.Services.RSS.Limit .Data.Pages }}
+
+ {{ .Permalink }}
+ {{ .Title }}
+ {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}
+
+ {{ .Content | html }}
+ {{ end }}
+
diff --git a/layouts/_default/taxonomy.gemini_atom.xml b/layouts/_default/taxonomy.gemini_atom.xml
new file mode 100644
index 0000000..76431e3
--- /dev/null
+++ b/layouts/_default/taxonomy.gemini_atom.xml
@@ -0,0 +1,55 @@
+{{/* Deprecate site.Author.name in favor of site.Params.author.name */}}
+{{- $authorName := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .name }}
+ {{- $authorName = . }}
+ {{- end }}
+ {{- else }}
+ {{- $authorName = . }}
+ {{- end }}
+{{- else }}
+ {{- with site.Author.name }}
+ {{- $authorName = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
+ {{- end }}
+{{- end }}
+
+{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
+{{- $authorEmail := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .email }}
+ {{- $authorEmail = . }}
+ {{- end }}
+ {{- end }}
+{{- else }}
+ {{- with site.Author.email }}
+ {{- $authorEmail = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
+ {{- end }}
+{{- end -}}
+
+{{ "" | safeHTML }}
+
+ {{ .Permalink | strings.TrimSuffix "index.gmi" }}
+ {{ .Site.Title }}
+ {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}
+
+
+ {{- with $authorName }}
+
+ {{ . }}
+ {{- with $authorEmail }}
+ {{ . }} {{ end }}
+ {{ end }}
+ Hugo -- gohugo.io
+ {{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}
+ {{ .Site.Params.Description }} {{ range first .Site.Config.Services.RSS.Limit .Data.Pages }}
+
+ {{ .Permalink | strings.TrimSuffix "index.gmi" }}
+ {{ .Title }}
+ {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}
+
+ {{ end }}
+
diff --git a/layouts/_default/taxonomy.gmi b/layouts/_default/taxonomy.gmi
new file mode 100644
index 0000000..9c2a9f0
--- /dev/null
+++ b/layouts/_default/taxonomy.gmi
@@ -0,0 +1,17 @@
+{{ define "main" -}}
+=> {{ .Site.Home.RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ i18n "returnHome" }}
+
+
+# {{ .Type | humanize }}
+
+
+## {{ i18n "feeds" }}
+
+=> {{ .RelPermalink | replaceRE `index.gmi$` "atom.xml" }} {{ emojify ":link:" }} {{ i18n "atomFeed" }}
+
+
+## {{ i18n "list" }}
+{{ range .Data.Pages }}
+=> {{ .RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ .Title -}}
+{{ end -}}
+{{ end }}
\ No newline at end of file
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
new file mode 100644
index 0000000..86d7f89
--- /dev/null
+++ b/layouts/_default/taxonomy.html
@@ -0,0 +1,16 @@
+{{ define "main" -}}
+
+ {{ emojify ":link:" }} {{ i18n "returnHome" }}
+
+
+ {{ .Type | humanize }}
+ {{ i18n "feeds" }}
+ {{ emojify ":link:" }} {{ i18n "atomFeed" }}
+ {{ i18n "list" }}
+
+ {{- range .Data.Pages }}
+ {{ emojify ":link:" }} {{ .Title }}
+ {{- end }}
+
+
+{{- end }}
\ No newline at end of file
diff --git a/layouts/_default/term.atom.xml b/layouts/_default/term.atom.xml
new file mode 100644
index 0000000..cbcbae8
--- /dev/null
+++ b/layouts/_default/term.atom.xml
@@ -0,0 +1,56 @@
+{{/* Deprecate site.Author.name in favor of site.Params.author.name */}}
+{{- $authorName := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .name }}
+ {{- $authorName = . }}
+ {{- end }}
+ {{- else }}
+ {{- $authorName = . }}
+ {{- end }}
+{{- else }}
+ {{- with site.Author.name }}
+ {{- $authorName = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
+ {{- end }}
+{{- end }}
+
+{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
+{{- $authorEmail := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .email }}
+ {{- $authorEmail = . }}
+ {{- end }}
+ {{- end }}
+{{- else }}
+ {{- with site.Author.email }}
+ {{- $authorEmail = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
+ {{- end }}
+{{- end -}}
+
+{{ "" | safeHTML }}
+
+ {{ .Permalink }}
+ {{ .Site.Title }}
+ {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}
+
+
+ {{- with $authorName }}
+
+ {{ . }}
+ {{- with $authorEmail }}
+ {{ . }} {{ end }}
+ {{ end }}
+ Hugo -- gohugo.io
+ {{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}
+ {{ .Site.Params.Description }} {{ range first .Site.Config.Services.RSS.Limit .Data.Pages }}
+
+ {{ .Permalink }}
+ {{ .Title }}
+ {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}
+
+ {{ .Content | html }}
+ {{ end }}
+
diff --git a/layouts/_default/term.gemini_atom.xml b/layouts/_default/term.gemini_atom.xml
new file mode 100644
index 0000000..287bcc4
--- /dev/null
+++ b/layouts/_default/term.gemini_atom.xml
@@ -0,0 +1,55 @@
+{{/*Deprecate site.Author.name in favor of site.Params.author.name */}}
+{{- $authorName := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .name }}
+ {{- $authorName = . }}
+ {{- end }}
+ {{- else }}
+ {{- $authorName = . }}
+ {{- end }}
+{{- else }}
+ {{- with site.Author.name }}
+ {{- $authorName = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
+ {{- end }}
+{{- end }}
+
+{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
+{{- $authorEmail := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .email }}
+ {{- $authorEmail = . }}
+ {{- end }}
+ {{- end }}
+{{- else }}
+ {{- with site.Author.email }}
+ {{- $authorEmail = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
+ {{- end }}
+{{- end -}}
+
+{{ "" | safeHTML }}
+
+ {{ .Permalink | strings.TrimSuffix "index.gmi" }}
+ {{ .Site.Title }}
+ {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}
+
+
+ {{- with $authorName }}
+
+ {{ . }}
+ {{- with $authorEmail }}
+ {{ . }} {{ end }}
+ {{ end }}
+ Hugo -- gohugo.io
+ {{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}
+ {{ .Site.Params.Description }} {{ range first .Site.Config.Services.RSS.Limit .Data.Pages }}
+
+ {{ .Permalink | strings.TrimSuffix "index.gmi" }}
+ {{ .Title }}
+ {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}
+
+ {{ end }}
+
diff --git a/layouts/_default/term.gmi b/layouts/_default/term.gmi
new file mode 100644
index 0000000..5d7f7b1
--- /dev/null
+++ b/layouts/_default/term.gmi
@@ -0,0 +1,19 @@
+{{ define "main" -}}
+=> {{ .Site.Home.RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ i18n "returnHome" }}
+
+
+# {{ .Type | singularize | humanize }} "{{ .Title }}"
+
+
+## {{ i18n "feeds" }}
+
+=> {{ .RelPermalink | replaceRE `index.gmi$` "atom.xml" }} {{ emojify ":link:" }} {{ i18n "atomFeed" }}
+
+
+## {{ i18n "journalEntries" -}}
+
+{{ range .Data.Pages.ByPublishDate.Reverse }}
+
+{{ partial "metadata.gmi" . -}}
+{{ end -}}
+{{ end }}
\ No newline at end of file
diff --git a/layouts/_default/term.html b/layouts/_default/term.html
new file mode 100644
index 0000000..3b268dd
--- /dev/null
+++ b/layouts/_default/term.html
@@ -0,0 +1,14 @@
+{{ define "main" -}}
+
+ {{ emojify ":link:" }} {{ i18n "returnHome" }}
+
+
+ {{ .Type | singularize | humanize }} "{{ .Title }}"
+ {{ i18n "feeds" }}
+ {{ emojify ":link:" }} {{ i18n "atomFeed" }}
+ {{ i18n "journalEntries" }}
+ {{- range .Data.Pages.ByPublishDate.Reverse }}
+ {{ partial "metadata.html" . -}}
+ {{ end }}
+
+{{- end }}
\ No newline at end of file
--
cgit v1.2.3