From 81e8120a5a5646c19ce13f71645f5e71c4c59d99 Mon Sep 17 00:00:00 2001 From: Luke Rawlins Date: Wed, 23 Sep 2020 18:33:45 -0400 Subject: [PATCH 1/7] initial --- exampleSite/config.toml | 1 + exampleSite/content/en/blog/configuration.md | 1 + 2 files changed, 2 insertions(+) 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..ea588d1 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: ["stuff and things"] --- Here are some helpful tips for setting up this theme. From faf94a8cfaecf9b1af958ba6ac10362237b46a8a Mon Sep 17 00:00:00 2001 From: Luke Rawlins Date: Wed, 23 Sep 2020 20:05:01 -0400 Subject: [PATCH 2/7] Fix for issue 236 Added logic to layouts/blog/single.html that checks front matter to display other taxonomies. --- layouts/blog/single.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/layouts/blog/single.html b/layouts/blog/single.html index f5fadb7..4bb8e81 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -51,6 +51,20 @@ {{ end }}

{{ end }} + + {{ range $taxonomy_term, $taxonomy := .Params }} + {{ with $.Site.GetPage (printf "/%s" $taxonomy_term) }} +

+ {{ if (ne $taxonomy_term "tags") }} + {{ $taxonomy_term | title }}: + {{ range $key, $value := $taxonomy }} + {{ $value }} +

+ {{ end }} + {{ end }} + {{ end }} + {{ end }} +
@@ -58,4 +72,4 @@
{{ partial "comments.html" . }} -{{ end }} \ No newline at end of file +{{ end }} From 1ac7a27d76dd649ff97c0418ecb1fb35a35a4b35 Mon Sep 17 00:00:00 2001 From: Luke Rawlins Date: Wed, 23 Sep 2020 21:13:03 -0400 Subject: [PATCH 3/7] removed test taxonomies from example site --- exampleSite/config.toml | 1 - exampleSite/content/en/blog/configuration.md | 1 - 2 files changed, 2 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index f2dfc27..e5e2d74 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -74,7 +74,6 @@ 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 ea588d1..dc76d37 100644 --- a/exampleSite/content/en/blog/configuration.md +++ b/exampleSite/content/en/blog/configuration.md @@ -2,7 +2,6 @@ title: "Theme Features" date: 2020-07-25T02:04:06-05:00 tags: ["code"] -series: ["stuff and things"] --- Here are some helpful tips for setting up this theme. From 6a096fd3517f8635be048b2e324e7609a96c2648 Mon Sep 17 00:00:00 2001 From: Luke Rawlins Date: Fri, 2 Oct 2020 11:37:35 -0400 Subject: [PATCH 4/7] Removed lines that specifically displayed the Tags taxonomy. --- layouts/blog/single.html | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 4bb8e81..2a408d1 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -42,28 +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 }} -

- {{ end }} {{ range $taxonomy_term, $taxonomy := .Params }} {{ with $.Site.GetPage (printf "/%s" $taxonomy_term) }}

- {{ if (ne $taxonomy_term "tags") }} {{ $taxonomy_term | title }}: {{ range $key, $value := $taxonomy }} {{ $value }} + {{ end }}

- {{ end }} - {{ end }} {{ end }} - {{ end }} + {{ end }} From 5952da59b170ee50fce57f9a5ebb938b213297c2 Mon Sep 17 00:00:00 2001 From: Luke Rawlins Date: Fri, 2 Oct 2020 11:40:32 -0400 Subject: [PATCH 5/7] Removed unnecessary comments related to fix. --- layouts/blog/single.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 2a408d1..3aecef2 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -42,7 +42,6 @@ {{ end }} {{ end }} - {{ range $taxonomy_term, $taxonomy := .Params }} {{ with $.Site.GetPage (printf "/%s" $taxonomy_term) }}

@@ -53,7 +52,6 @@

{{ end }} {{ end }} -
From a90171fdb15bfaae3d2cdf1ead707e57219ec116 Mon Sep 17 00:00:00 2001 From: Luke Rawlins Date: Sat, 3 Oct 2020 18:43:48 -0400 Subject: [PATCH 6/7] Individual taxonomies now display properly as links and the urls are routed correctly to the proper taxonomy term. Fixes #236 --- layouts/blog/single.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 3aecef2..877be4b 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -43,11 +43,13 @@
{{ end }} {{ range $taxonomy_term, $taxonomy := .Params }} - {{ with $.Site.GetPage (printf "/%s" $taxonomy_term) }} -

+ {{ with $.Site.GetPage $taxonomy_term }} + {{ $len := (len $taxonomy) }} +

{{ $taxonomy_term | title }}: - {{ range $key, $value := $taxonomy }} - {{ $value }} + {{ range $key, $value := $taxonomy }} + + {{ $value }}{{ if ne (add $key 1) $len }},{{ end }} {{ end }}

{{ end }} From fae154e857436475fe83cb39efe1d0d62e81582c Mon Sep 17 00:00:00 2001 From: Victoria Drake Date: Sun, 11 Oct 2020 19:47:53 -0400 Subject: [PATCH 7/7] Add demo taxonomy to example post --- exampleSite/config.toml | 1 + exampleSite/content/en/blog/configuration.md | 1 + 2 files changed, 2 insertions(+) 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.