diff --git a/exampleSite/config.toml b/exampleSite/config.toml index e5e2d74..f2dfc27 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -74,6 +74,7 @@ DefaultContentLanguage = "en" # Default language fo # You can add more by yourself [taxonomies] tag = "tags" + series = "series" [markup] defaultMarkdownHandler = "goldmark" diff --git a/exampleSite/content/en/blog/configuration.md b/exampleSite/content/en/blog/configuration.md index dc76d37..148823e 100644 --- a/exampleSite/content/en/blog/configuration.md +++ b/exampleSite/content/en/blog/configuration.md @@ -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. diff --git a/layouts/blog/single.html b/layouts/blog/single.html index f5fadb7..877be4b 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -42,14 +42,17 @@ {{ end }} {{ end }} - {{ if .Params.tags }} - {{ $len := (len .Params.tags) }} -
- Tag{{ if gt $len 1 }}s{{ end }}: - {{ range $index, $tag := .Params.tags }} - {{ . }}{{ if ne (add $index 1) $len }},{{ end }} - {{ end }} -
+ {{ range $taxonomy_term, $taxonomy := .Params }} + {{ with $.Site.GetPage $taxonomy_term }} + {{ $len := (len $taxonomy) }} ++ {{ $taxonomy_term | title }}: + {{ range $key, $value := $taxonomy }} + + {{ $value }}{{ if ne (add $key 1) $len }},{{ end }} + {{ end }} +
+ {{ end }} {{ end }} @@ -58,4 +61,4 @@ {{ partial "comments.html" . }} -{{ end }} \ No newline at end of file +{{ end }}