Fix breadcrumbs
This commit is contained in:
parent
73a76aee3d
commit
e66df967a4
12 changed files with 84 additions and 23 deletions
|
@ -6,6 +6,8 @@ enableGitInfo: true
|
||||||
enableRobotsTXT: true
|
enableRobotsTXT: true
|
||||||
languageCode: 'en-us'
|
languageCode: 'en-us'
|
||||||
summarylength: 15
|
summarylength: 15
|
||||||
|
disableKinds:
|
||||||
|
- taxonomy
|
||||||
|
|
||||||
markup:
|
markup:
|
||||||
tableOfContents:
|
tableOfContents:
|
||||||
|
|
|
@ -5,7 +5,7 @@ draft: false
|
||||||
tags:
|
tags:
|
||||||
- KDE
|
- KDE
|
||||||
- Qt
|
- Qt
|
||||||
- C++
|
- CPlusPlus
|
||||||
- Open Source
|
- Open Source
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ date: 2016-12-01
|
||||||
draft: false
|
draft: false
|
||||||
layout: "project"
|
layout: "project"
|
||||||
projtags:
|
projtags:
|
||||||
- C++
|
- CPlusPlus
|
||||||
source: "https://git.sr.ht/~redstrate/graphite"
|
source: "https://git.sr.ht/~redstrate/graphite"
|
||||||
license: MIT
|
license: MIT
|
||||||
summary: "Game engine from 2017"
|
summary: "Game engine from 2017"
|
||||||
|
|
|
@ -4,7 +4,7 @@ date: 2023-03-27
|
||||||
draft: false
|
draft: false
|
||||||
layout: "project"
|
layout: "project"
|
||||||
projtags:
|
projtags:
|
||||||
- C++
|
- CPlusPlus
|
||||||
- Qt
|
- Qt
|
||||||
source: "https://git.sr.ht/~redstrate/redai"
|
source: "https://git.sr.ht/~redstrate/redai"
|
||||||
license: GPLv3
|
license: GPLv3
|
||||||
|
|
|
@ -4,7 +4,7 @@ date: 2016-02-01
|
||||||
draft: false
|
draft: false
|
||||||
layout: "project"
|
layout: "project"
|
||||||
projtags:
|
projtags:
|
||||||
- C++
|
- CPlusPlus
|
||||||
source: "https://git.sr.ht/~redstrate/shaderboy"
|
source: "https://git.sr.ht/~redstrate/shaderboy"
|
||||||
license: MIT
|
license: MIT
|
||||||
summary: "Allows you to view shadertoy shaders offline"
|
summary: "Allows you to view shadertoy shaders offline"
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
---
|
---
|
||||||
title: "Art Tags"
|
title: "Tags"
|
||||||
url: /art/tags/
|
url: /art/tags/
|
||||||
layout: listart
|
layout: listart
|
||||||
listtag: 'arttags'
|
listtag: 'arttags'
|
||||||
skipparent: true
|
skipparent: true
|
||||||
|
trueparent: "/art"
|
||||||
---
|
---
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
---
|
---
|
||||||
title: "Blog Series"
|
title: "Series"
|
||||||
url: /blog/series/
|
url: /blog/series/
|
||||||
layout: listart
|
layout: listart
|
||||||
listtag: 'series'
|
listtag: 'series'
|
||||||
skipparent: true
|
skipparent: true
|
||||||
|
trueparent: "/blog"
|
||||||
---
|
---
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
---
|
---
|
||||||
title: "Blog Tags"
|
title: "Tags"
|
||||||
url: /blog/tags/
|
url: /blog/tags/
|
||||||
layout: listart
|
layout: listart
|
||||||
listtag: 'tags'
|
listtag: 'tags'
|
||||||
skipparent: true
|
skipparent: true
|
||||||
aliases:
|
aliases:
|
||||||
- /tags
|
- /tags
|
||||||
|
trueparent: "/blog"
|
||||||
---
|
---
|
||||||
|
|
8
content/taxonomies/characters.md
Normal file
8
content/taxonomies/characters.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
title: "Characters"
|
||||||
|
url: /art/characters/
|
||||||
|
layout: listart
|
||||||
|
listtag: 'characters'
|
||||||
|
skipparent: true
|
||||||
|
trueparent: "/art"
|
||||||
|
---
|
|
@ -4,4 +4,5 @@ url: /software/tags/
|
||||||
layout: listart
|
layout: listart
|
||||||
listtag: 'projtags'
|
listtag: 'projtags'
|
||||||
skipparent: true
|
skipparent: true
|
||||||
|
trueparent: '/software'
|
||||||
---
|
---
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
{{ $month = int (index $split 3) }}
|
{{ $month = int (index $split 3) }}
|
||||||
{{ end }}
|
{{ 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 }}
|
{{ $full := printf "https://images.redstrate.com/art/%s.avif" $.Params.slug }}
|
||||||
{{ $jpeg := printf "https://images.redstrate.com/art/%s.jpg" $.Params.slug }}
|
{{ $jpeg := printf "https://images.redstrate.com/art/%s.jpg" $.Params.slug }}
|
||||||
|
|
||||||
|
|
|
@ -8,16 +8,6 @@
|
||||||
{{ $len := len .Ancestors }}
|
{{ $len := len .Ancestors }}
|
||||||
{{ $i := 0 }}
|
{{ $i := 0 }}
|
||||||
{{- range .Ancestors.Reverse }}
|
{{- range .Ancestors.Reverse }}
|
||||||
{{ if eq .Title "Arttags" }}
|
|
||||||
<a href="/art">Art</a>
|
|
||||||
<span> / </span>
|
|
||||||
<a href="/art/tags">Tags</a>
|
|
||||||
<span> / </span>
|
|
||||||
{{ else }}
|
|
||||||
{{ if eq .Title "Characters" }}
|
|
||||||
<a href="/art/characters">Characters</a>
|
|
||||||
<span> / </span>
|
|
||||||
{{ else }}
|
|
||||||
{{ $end := false }}
|
{{ $end := false }}
|
||||||
{{ if eq (add $i 1) $len }}
|
{{ if eq (add $i 1) $len }}
|
||||||
{{ $end = true }}
|
{{ $end = true }}
|
||||||
|
@ -26,6 +16,63 @@
|
||||||
{{ $needs_skip := $skip_next }}
|
{{ $needs_skip := $skip_next }}
|
||||||
|
|
||||||
{{ if not (and $needs_skip $end) }}
|
{{ if not (and $needs_skip $end) }}
|
||||||
|
<!-- Workaround for art tags having the wrong breadcrumb -->
|
||||||
|
{{ if eq .Title "Arttags" }}
|
||||||
|
<a href="/art">Art</a>
|
||||||
|
<span> / </span>
|
||||||
|
<a href="/art/tags">Tags</a>
|
||||||
|
<span> / </span>
|
||||||
|
{{ else }}
|
||||||
|
<!-- For project tags -->
|
||||||
|
{{ if eq .Title "Projtags" }}
|
||||||
|
<a href="/software">Software</a>
|
||||||
|
<span> / </span>
|
||||||
|
<a href="/software/tags">Tags</a>
|
||||||
|
<span> / </span>
|
||||||
|
{{ else }}
|
||||||
|
<!-- Workaround for blog tags having the wrong breadcrumb -->
|
||||||
|
{{ if and (eq .Title "Tags") (hasPrefix $.Path "tags/") }}
|
||||||
|
{{ if not (and $needs_skip $end) }}
|
||||||
|
<a href="/blog">Blog</a>
|
||||||
|
<span> / </span>
|
||||||
|
<a href="/blog/tags">Tags</a>
|
||||||
|
<span> / </span>
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
<!-- Same workaround for blog series -->
|
||||||
|
{{ if and (eq .Title "Series") (hasPrefix $.Path "series/") }}
|
||||||
|
{{ if not (and $needs_skip $end) }}
|
||||||
|
<a href="/blog">Blog</a>
|
||||||
|
<span> / </span>
|
||||||
|
<a href="/blog/series">Series</a>
|
||||||
|
<span> / </span>
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
<!-- Ditto for art characters -->
|
||||||
|
{{ if and (eq .Title "Characters") (hasPrefix $.Path "characters/") }}
|
||||||
|
<a href="/art">Art</a>
|
||||||
|
<span> / </span>
|
||||||
|
<a href="/art/characters">Characters</a>
|
||||||
|
<span> / </span>
|
||||||
|
{{ else }}
|
||||||
|
{{ if eq .Title "Characters" }}
|
||||||
|
<a href="/art/characters">Characters</a>
|
||||||
|
<span> / </span>
|
||||||
|
{{ else }}
|
||||||
|
|
||||||
|
{{ if not (and $needs_skip $end) }}
|
||||||
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
|
<span> / </span>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ if $.Params.trueparent }}
|
||||||
|
{{ with $.Site.GetPage ($.Params.trueparent) }}
|
||||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
<span> / </span>
|
<span> / </span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue