From: Kai Moritz Date: Sat, 27 Dec 2025 15:42:07 +0000 (+0100) Subject: Taxonomien `Categories` und `Tags` als Untersektionen von `Blog` -- MOVE X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=bcf38ca021d8bdf186c117da15257c1ed41daaf7;p=website Taxonomien `Categories` und `Tags` als Untersektionen von `Blog` -- MOVE * Jahres-Sektionen unter die Sektion `/blog/archive` verschoben. * Die Taxonomien `categories` und `tags` über eine explizite URL-Angabe virtuell in die Sektion `blog` verschoben. * Angeapsste `section`- und `taxonomy`-Templates erstellt, die das Menü entsprechend darstellen. --- diff --git a/content/blog/archive/_index.html b/content/blog/archive/_index.html new file mode 100644 index 00000000..10db07b5 --- /dev/null +++ b/content/blog/archive/_index.html @@ -0,0 +1,3 @@ +--- +title: "Archive" +--- diff --git a/content/categories/_index.html b/content/categories/_index.html new file mode 100644 index 00000000..3417dd6e --- /dev/null +++ b/content/categories/_index.html @@ -0,0 +1,5 @@ +--- +title: Blog - Categories +linkTitle: Categories +url: /blog/categories/ +--- diff --git a/content/tags/_index.html b/content/tags/_index.html new file mode 100644 index 00000000..8ac82d42 --- /dev/null +++ b/content/tags/_index.html @@ -0,0 +1,5 @@ +--- +title: Blog - Tags +linkTitle: Tags +url: /blog/tags/ +--- diff --git a/layouts/baseof.html b/layouts/baseof.html index da0ed325..50dc9338 100644 --- a/layouts/baseof.html +++ b/layouts/baseof.html @@ -6,7 +6,7 @@
{{- partial "header.html" . }} - {{- partial "breadcrumb.html" . }} + {{- block "breadcrumb" . }}{{ partial "breadcrumb.html" . }}{{ end -}}
{{- block "article" . }} diff --git a/layouts/blog/archive/page.html b/layouts/blog/archive/page.html index 843c4466..2fe89e4a 100644 --- a/layouts/blog/archive/page.html +++ b/layouts/blog/archive/page.html @@ -14,7 +14,69 @@
{{ end }} {{ end }} -{{ define "menu" }}{{ partial "menu/blog.html" (dict "page" .) }}{{ end }} +{{- define "menu" }} +{{- $page := $ }} + +{{- end }}{{/* end menu */}} {{ define "marginalcontent" }} {{ partial "terms.html" . }} {{ end }} diff --git a/layouts/blog/archive/year.html b/layouts/blog/archive/year.html index b897d409..54167c6a 100644 --- a/layouts/blog/archive/year.html +++ b/layouts/blog/archive/year.html @@ -47,5 +47,65 @@ {{- end }}{{/* end main */}} {{- define "menu" }} -{{- partial "menu/blog.html" (dict "page" .) }} +{{- $page := $ }} + {{- end }}{{/* end menu */}} diff --git a/layouts/blog/section.html b/layouts/blog/section.html index b50e04ad..2f7b2509 100644 --- a/layouts/blog/section.html +++ b/layouts/blog/section.html @@ -1,23 +1,65 @@ -{{- define "title" }} -

- {{- with .OutputFormats.Get "rss" }} - - - - - - - Archive of all Blog-Articles - -

- {{- end }} -{{- end }}{{/* end title */}} +{{ define "menu" }} +{{- $page := $ }} + +{{ end }} -{{- define "content" }} -{{- range .RegularPagesRecursive }} +{{- define "article" }} +

Recently Published Articles

+ {{- range first 3 .RegularPagesRecursive.ByDate.Reverse }}
-

+

{{- .Title | markdownify }} {{- if .Draft }} @@ -27,10 +69,47 @@ {{- end }} -

+
{{- partial "post_meta.html" . -}}
+
+ {{ .Summary | plainify }} + Read on... +
+ {{- end }} + +

Browse Articles By Year

+ +{{- with .Site.Taxonomies.categories -}} +

Browse Articles By Category

+ +{{- end }} +{{- with .Site.Taxonomies.tags -}} +

Browse Articles By Tag

+ {{- end }} {{- end }}{{/* end main */}} diff --git a/layouts/categories/taxonomy.html b/layouts/categories/taxonomy.html index b50e04ad..8afdd174 100644 --- a/layouts/categories/taxonomy.html +++ b/layouts/categories/taxonomy.html @@ -1,36 +1,88 @@ +{{ define "breadcrumb" }} + +{{ end }} + +{{ define "menu" }} +{{- $page := $ }} + +{{ end }} + {{- define "title" }} -

- {{- with .OutputFormats.Get "rss" }} - - - - - - - Archive of all Blog-Articles - -

- {{- end }} -{{- end }}{{/* end title */}} +

{{ .Title }}

+{{- with .Description }}

{{ . }}

{{- end }} +{{- end }} {{- define "content" }} -{{- range .RegularPagesRecursive }} -
-

- {{- .Title | markdownify }} - {{- if .Draft }} - - - - - - {{- end }} -

-
- {{- partial "post_meta.html" . -}} -
-
-{{- end }} -{{- end }}{{/* end main */}} + +{{ .Content }} +{{- end }}{{/* end main */ -}} diff --git a/layouts/categories/term.html b/layouts/categories/term.html index b50e04ad..3df28692 100644 --- a/layouts/categories/term.html +++ b/layouts/categories/term.html @@ -1,3 +1,83 @@ +{{ define "breadcrumb" }} + +{{ end }} + +{{ define "menu" }} +{{- $page := $ }} + +{{ end }} + {{- define "title" }}

{{- with .OutputFormats.Get "rss" }} @@ -8,7 +88,7 @@ - Archive of all Blog-Articles + {{ ($.Site.GetPage $.Section).LinkTitle }}: {{ $.Title }}

{{- end }} diff --git a/layouts/rss.xml b/layouts/rss.xml deleted file mode 100644 index 70b73407..00000000 --- a/layouts/rss.xml +++ /dev/null @@ -1,27 +0,0 @@ -{{- printf "" | safeHTML }} - - - {{ site.Title }} - {{ .Permalink }} - {{ site.Params.description }} - Hugo -- {{ hugo.Version }} - {{ site.Language.LanguageCode }} - {{site.Params.author.email}} ({{site.Params.author.name}}) - {{site.Params.author.email}} ({{site.Params.author.name}}) - {{ site.Copyright | markdownify | plainify | strings.TrimPrefix "© " }} - {{ site.Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - - {{- range .RegularPagesRecursive }} - - {{ .Title }} - {{ .Permalink }} - {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{site.Params.author.email}} ({{site.Params.author.name}}) - {{ .Permalink }} - {{ with .Description }} - {{ . }} - {{ end -}} - - {{- end }} - - diff --git a/layouts/tags/taxonomy.html b/layouts/tags/taxonomy.html index b50e04ad..3c8a37bc 100644 --- a/layouts/tags/taxonomy.html +++ b/layouts/tags/taxonomy.html @@ -1,36 +1,88 @@ +{{ define "breadcrumb" }} + +{{ end }} + +{{ define "menu" }} +{{- $page := $ }} + +{{ end }} + {{- define "title" }} -

- {{- with .OutputFormats.Get "rss" }} - - - - - - - Archive of all Blog-Articles - -

- {{- end }} -{{- end }}{{/* end title */}} +

{{ .Title }}

+{{- with .Description }}

{{ . }}

{{- end }} +{{- end }} {{- define "content" }} -{{- range .RegularPagesRecursive }} -
-

- {{- .Title | markdownify }} - {{- if .Draft }} - - - - - - {{- end }} -

-
- {{- partial "post_meta.html" . -}} -
-
-{{- end }} -{{- end }}{{/* end main */}} + +{{ .Content }} +{{- end }}{{/* end main */ -}}