From e66df967a461d349c26e138a8287b4df77640d23 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Mon, 19 Feb 2024 15:20:51 -0500 Subject: [PATCH] Fix breadcrumbs --- config.yaml | 2 + content/blog/clean-config-reply/index.md | 2 +- content/software/graphite.md | 2 +- content/software/redai.md | 2 +- content/software/shaderboy.md | 2 +- content/taxonomies/arttag.md | 3 +- content/taxonomies/blogseries.md | 3 +- content/taxonomies/blogtags.md | 3 +- content/taxonomies/characters.md | 8 ++ content/taxonomies/projtags.md | 1 + themes/red/layouts/_default/art-detail.html | 2 +- themes/red/layouts/partials/breadcrumbs.html | 77 ++++++++++++++++---- 12 files changed, 84 insertions(+), 23 deletions(-) create mode 100644 content/taxonomies/characters.md diff --git a/config.yaml b/config.yaml index d40b4e6..6872813 100644 --- a/config.yaml +++ b/config.yaml @@ -6,6 +6,8 @@ enableGitInfo: true enableRobotsTXT: true languageCode: 'en-us' summarylength: 15 +disableKinds: +- taxonomy markup: tableOfContents: diff --git a/content/blog/clean-config-reply/index.md b/content/blog/clean-config-reply/index.md index 3955a79..18fd49f 100644 --- a/content/blog/clean-config-reply/index.md +++ b/content/blog/clean-config-reply/index.md @@ -5,7 +5,7 @@ draft: false tags: - KDE - Qt -- C++ +- CPlusPlus - Open Source --- diff --git a/content/software/graphite.md b/content/software/graphite.md index 2ee4fc3..d638510 100644 --- a/content/software/graphite.md +++ b/content/software/graphite.md @@ -4,7 +4,7 @@ date: 2016-12-01 draft: false layout: "project" projtags: -- C++ +- CPlusPlus source: "https://git.sr.ht/~redstrate/graphite" license: MIT summary: "Game engine from 2017" diff --git a/content/software/redai.md b/content/software/redai.md index 4816752..2c66c9f 100644 --- a/content/software/redai.md +++ b/content/software/redai.md @@ -4,7 +4,7 @@ date: 2023-03-27 draft: false layout: "project" projtags: -- C++ +- CPlusPlus - Qt source: "https://git.sr.ht/~redstrate/redai" license: GPLv3 diff --git a/content/software/shaderboy.md b/content/software/shaderboy.md index c22bc01..715a2b0 100644 --- a/content/software/shaderboy.md +++ b/content/software/shaderboy.md @@ -4,7 +4,7 @@ date: 2016-02-01 draft: false layout: "project" projtags: -- C++ +- CPlusPlus source: "https://git.sr.ht/~redstrate/shaderboy" license: MIT summary: "Allows you to view shadertoy shaders offline" diff --git a/content/taxonomies/arttag.md b/content/taxonomies/arttag.md index 39578d1..5bd219d 100644 --- a/content/taxonomies/arttag.md +++ b/content/taxonomies/arttag.md @@ -1,7 +1,8 @@ --- -title: "Art Tags" +title: "Tags" url: /art/tags/ layout: listart listtag: 'arttags' skipparent: true +trueparent: "/art" --- diff --git a/content/taxonomies/blogseries.md b/content/taxonomies/blogseries.md index af5bace..9cba4e1 100644 --- a/content/taxonomies/blogseries.md +++ b/content/taxonomies/blogseries.md @@ -1,7 +1,8 @@ --- -title: "Blog Series" +title: "Series" url: /blog/series/ layout: listart listtag: 'series' skipparent: true +trueparent: "/blog" --- diff --git a/content/taxonomies/blogtags.md b/content/taxonomies/blogtags.md index 97503fa..be69076 100644 --- a/content/taxonomies/blogtags.md +++ b/content/taxonomies/blogtags.md @@ -1,9 +1,10 @@ --- -title: "Blog Tags" +title: "Tags" url: /blog/tags/ layout: listart listtag: 'tags' skipparent: true aliases: - /tags +trueparent: "/blog" --- diff --git a/content/taxonomies/characters.md b/content/taxonomies/characters.md new file mode 100644 index 0000000..f83ac7c --- /dev/null +++ b/content/taxonomies/characters.md @@ -0,0 +1,8 @@ +--- +title: "Characters" +url: /art/characters/ +layout: listart +listtag: 'characters' +skipparent: true +trueparent: "/art" +--- diff --git a/content/taxonomies/projtags.md b/content/taxonomies/projtags.md index e8cc7cc..1d077ef 100644 --- a/content/taxonomies/projtags.md +++ b/content/taxonomies/projtags.md @@ -4,4 +4,5 @@ url: /software/tags/ layout: listart listtag: 'projtags' skipparent: true +trueparent: '/software' --- diff --git a/themes/red/layouts/_default/art-detail.html b/themes/red/layouts/_default/art-detail.html index 2ee3bb9..1d0e32a 100644 --- a/themes/red/layouts/_default/art-detail.html +++ b/themes/red/layouts/_default/art-detail.html @@ -15,7 +15,7 @@ {{ $month = int (index $split 3) }} {{ end }} - {{ if and (ge (int $year) 2023) (and (not $.Params.animation) (not $.Params.threed) ) }} + {{ if and (ge (int $year) 2023) (and (not $.Params.animation) (and (not (in .File.Dir "art/guest")) (not $.Params.threed)) ) }} {{ $full := printf "https://images.redstrate.com/art/%s.avif" $.Params.slug }} {{ $jpeg := printf "https://images.redstrate.com/art/%s.jpg" $.Params.slug }} diff --git a/themes/red/layouts/partials/breadcrumbs.html b/themes/red/layouts/partials/breadcrumbs.html index 08a5c00..ee299b0 100644 --- a/themes/red/layouts/partials/breadcrumbs.html +++ b/themes/red/layouts/partials/breadcrumbs.html @@ -8,24 +8,71 @@ {{ $len := len .Ancestors }} {{ $i := 0 }} {{- range .Ancestors.Reverse }} - {{ if eq .Title "Arttags" }} - Art - / - Tags - / - {{ else }} - {{ if eq .Title "Characters" }} - Characters + {{ $end := false }} + {{ if eq (add $i 1) $len }} + {{ $end = true }} + {{ end }} + + {{ $needs_skip := $skip_next }} + + {{ if not (and $needs_skip $end) }} + + {{ if eq .Title "Arttags" }} + Art + / + Tags / {{ else }} - {{ $end := false }} - {{ if eq (add $i 1) $len }} - {{ $end = true }} + + {{ if eq .Title "Projtags" }} + Software + / + Tags + / + {{ else }} + + {{ if and (eq .Title "Tags") (hasPrefix $.Path "tags/") }} + {{ if not (and $needs_skip $end) }} + Blog + / + Tags + / + {{ end }} + {{ else }} + + {{ if and (eq .Title "Series") (hasPrefix $.Path "series/") }} + {{ if not (and $needs_skip $end) }} + Blog + / + Series + / + {{ end }} + {{ else }} + + {{ if and (eq .Title "Characters") (hasPrefix $.Path "characters/") }} + Art + / + Characters + / + {{ else }} + {{ if eq .Title "Characters" }} + Characters + / + {{ else }} + + {{ if not (and $needs_skip $end) }} + {{ .Title }} + / + {{ end }} + {{ end }} + {{ end }} + {{ end }} + {{ end }} {{ end }} - - {{ $needs_skip := $skip_next }} - - {{ if not (and $needs_skip $end) }} + {{ end }} + {{ else }} + {{ if $.Params.trueparent }} + {{ with $.Site.GetPage ($.Params.trueparent) }} {{ .Title }} / {{ end }}