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
|
||||
languageCode: 'en-us'
|
||||
summarylength: 15
|
||||
disableKinds:
|
||||
- taxonomy
|
||||
|
||||
markup:
|
||||
tableOfContents:
|
||||
|
|
|
@ -5,7 +5,7 @@ draft: false
|
|||
tags:
|
||||
- KDE
|
||||
- Qt
|
||||
- C++
|
||||
- CPlusPlus
|
||||
- Open Source
|
||||
---
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
title: "Art Tags"
|
||||
title: "Tags"
|
||||
url: /art/tags/
|
||||
layout: listart
|
||||
listtag: 'arttags'
|
||||
skipparent: true
|
||||
trueparent: "/art"
|
||||
---
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
title: "Blog Series"
|
||||
title: "Series"
|
||||
url: /blog/series/
|
||||
layout: listart
|
||||
listtag: 'series'
|
||||
skipparent: true
|
||||
trueparent: "/blog"
|
||||
---
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
---
|
||||
title: "Blog Tags"
|
||||
title: "Tags"
|
||||
url: /blog/tags/
|
||||
layout: listart
|
||||
listtag: 'tags'
|
||||
skipparent: true
|
||||
aliases:
|
||||
- /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
|
||||
listtag: 'projtags'
|
||||
skipparent: true
|
||||
trueparent: '/software'
|
||||
---
|
||||
|
|
|
@ -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 }}
|
||||
|
||||
|
|
|
@ -8,16 +8,6 @@
|
|||
{{ $len := len .Ancestors }}
|
||||
{{ $i := 0 }}
|
||||
{{- 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 }}
|
||||
{{ if eq (add $i 1) $len }}
|
||||
{{ $end = true }}
|
||||
|
@ -26,6 +16,63 @@
|
|||
{{ $needs_skip := $skip_next }}
|
||||
|
||||
{{ 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>
|
||||
<span> / </span>
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Reference in a new issue