From 922922cf94ae5fd9be4b179387123b0e8eb7c751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Fri, 19 May 2023 09:04:44 +0200 Subject: [PATCH] tags: split taxonomy and terms templates #530 --- layouts/_default/taxonomy.html | 31 +++++++++++++++++++++- layouts/_default/term.html | 24 +++++++++++++++++ layouts/partials/_taxonomy.html | 46 --------------------------------- 3 files changed, 54 insertions(+), 47 deletions(-) create mode 100644 layouts/_default/term.html delete mode 100644 layouts/partials/_taxonomy.html diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index 4c70c18a99..bbb24c8be8 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -1 +1,30 @@ -{{- partial "_taxonomy.html" . }} \ No newline at end of file +{{- partialCached "page-meta.hugo" . .RelPermalink }} +{{- partial "header.html" . }} +
+{{- $page := . }} + +{{- $title := i18n .Data.Plural }} +{{- if not $title }} + {{- $title = .Data.Plural | humanize }} +{{- end }} +

{{ $title }}

+ + +
+
+
+{{- partial "footer.html" . }} \ No newline at end of file diff --git a/layouts/_default/term.html b/layouts/_default/term.html new file mode 100644 index 0000000000..f9951a453b --- /dev/null +++ b/layouts/_default/term.html @@ -0,0 +1,24 @@ +{{- partialCached "page-meta.hugo" . .RelPermalink }} +{{- partial "header.html" . }} +
+{{- $page := . }} + +{{- $title := i18n .Data.Singular }} +{{- if not $title }} + {{- $title = .Data.Singular | humanize }} +{{- end }} +{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) (.Title | humanize) }} +

{{ $title }}

+ + +
+
+
+{{- partial "footer.html" . }} \ No newline at end of file diff --git a/layouts/partials/_taxonomy.html b/layouts/partials/_taxonomy.html deleted file mode 100644 index 8cce078fe1..0000000000 --- a/layouts/partials/_taxonomy.html +++ /dev/null @@ -1,46 +0,0 @@ -{{- partialCached "page-meta.hugo" . .RelPermalink }} -{{- partial "header.html" . }} -
-{{- $page := . }} - -{{- $title := "" }} -{{- if eq .Kind "taxonomy" }} - {{- $title = i18n .Data.Plural }} - {{- if not $title }} - {{- $title = .Data.Plural | humanize }} - {{- end }} -{{- else }} - {{- $title = i18n .Data.Singular }} - {{- if not $title }} - {{- $title = .Data.Singular | humanize }} - {{- end }} - {{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) (.Title | humanize) }} -{{- end }} -

{{ $title }}

- - - -
-{{- partial "footer.html" . }} \ No newline at end of file