Merge branch 'thegreatluke-fix-236'

This commit is contained in:
Victoria Drake 2020-10-11 19:48:17 -04:00
commit d81ebc6c8e
3 changed files with 14 additions and 9 deletions

View file

@ -74,6 +74,7 @@ DefaultContentLanguage = "en" # Default language fo
# You can add more by yourself
[taxonomies]
tag = "tags"
series = "series"
[markup]
defaultMarkdownHandler = "goldmark"

View file

@ -2,6 +2,7 @@
title: "Theme Features"
date: 2020-07-25T02:04:06-05:00
tags: ["code"]
series: ["quickstart"]
---
Here are some helpful tips for setting up this theme.

View file

@ -42,15 +42,18 @@
{{ end }}
</div>
{{ end }}
{{ if .Params.tags }}
{{ $len := (len .Params.tags) }}
{{ range $taxonomy_term, $taxonomy := .Params }}
{{ with $.Site.GetPage $taxonomy_term }}
{{ $len := (len $taxonomy) }}
<p>
Tag{{ if gt $len 1 }}s{{ end }}:
{{ range $index, $tag := .Params.tags }}
<a href="{{ "tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>{{ if ne (add $index 1) $len }},{{ end }}
{{ $taxonomy_term | title }}:
{{ range $key, $value := $taxonomy }}
<a href="{{ (printf "/%s/" $taxonomy_term) | relLangURL }}{{ . | urlize }}">
{{ $value }}</a>{{ if ne (add $key 1) $len }},{{ end }}
{{ end }}
</p>
{{ end }}
{{ end }}
</div>
<!-- Begin blog post content -->
<div class="container markdown top-pad">