Use custom category, tag names if set
This commit is contained in:
4
exampleSite/content/categories/paige/_index.md
Normal file
4
exampleSite/content/categories/paige/_index.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
description: "Demonstration of a category."
|
||||||
|
title: "Paige"
|
||||||
|
---
|
4
exampleSite/content/tags/sections/_index.md
Normal file
4
exampleSite/content/tags/sections/_index.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
description: "Demonstration of a tag."
|
||||||
|
title: "Sections"
|
||||||
|
---
|
@@ -41,15 +41,21 @@
|
|||||||
{{ $terms := slice }}
|
{{ $terms := slice }}
|
||||||
|
|
||||||
{{ range $categories }}
|
{{ range $categories }}
|
||||||
{{ $terms = $terms | append (dict "name" . "url" (lower . | printf "categories/%v/" | relLangURL)) }}
|
{{ $terms = $terms | append (dict "name" . "url" (lower . | printf "categories/%v/" | relLangURL | string)) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ range $tags }}
|
{{ range $tags }}
|
||||||
{{ $terms = $terms | append (dict "name" . "url" (lower . | printf "tags/%v/" | relLangURL)) }}
|
{{ $terms = $terms | append (dict "name" . "url" (lower . | printf "tags/%v/" | relLangURL | string)) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ range sort $terms "name" }}
|
{{ range sort $terms "name" }}
|
||||||
<a class="badge paige-term text-bg-secondary text-decoration-none" href="{{ .url | safeURL }}">{{ .name }}</a>
|
{{ $name := .name }}
|
||||||
|
|
||||||
|
{{ with site.GetPage .url }}
|
||||||
|
{{ $name = .Title }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<a class="badge paige-term text-bg-secondary text-decoration-none" href="{{ .url | safeURL }}">{{ $name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@@ -64,15 +64,21 @@
|
|||||||
{{ $terms := slice }}
|
{{ $terms := slice }}
|
||||||
|
|
||||||
{{ range $categories }}
|
{{ range $categories }}
|
||||||
{{ $terms = $terms | append (dict "name" . "url" (lower . | printf "categories/%v/" | relLangURL)) }}
|
{{ $terms = $terms | append (dict "name" . "url" (lower . | printf "categories/%v/" | relLangURL | string)) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ range $tags }}
|
{{ range $tags }}
|
||||||
{{ $terms = $terms | append (dict "name" . "url" (lower . | printf "tags/%v/" | relLangURL)) }}
|
{{ $terms = $terms | append (dict "name" . "url" (lower . | printf "tags/%v/" | relLangURL | string)) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ range sort $terms "name" }}
|
{{ range sort $terms "name" }}
|
||||||
<a class="badge paige-term text-bg-secondary text-decoration-none" href="{{ .url | safeURL }}">{{ .name }}</a>
|
{{ $name := .name }}
|
||||||
|
|
||||||
|
{{ with site.GetPage .url }}
|
||||||
|
{{ $name = .Title }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<a class="badge paige-term text-bg-secondary text-decoration-none" href="{{ .url | safeURL }}">{{ $name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Reference in New Issue
Block a user