From c1cb3f081ccf329fcf7e74eb303277e286e0ee58 Mon Sep 17 00:00:00 2001 From: Shaform Date: Tue, 17 Jul 2018 16:11:27 +0800 Subject: [PATCH] Remove dead links for custom permalinks --- content/en/templates/taxonomy-templates.md | 66 +++++++++++++++------- 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/content/en/templates/taxonomy-templates.md b/content/en/templates/taxonomy-templates.md index 284500e00..d15a6f639 100644 --- a/content/en/templates/taxonomy-templates.md +++ b/content/en/templates/taxonomy-templates.md @@ -126,9 +126,13 @@ Taxonomies can be ordered by either alphabetical key or by the number of content ``` ``` @@ -137,9 +141,13 @@ Taxonomies can be ordered by either alphabetical key or by the number of content ``` ``` @@ -148,9 +156,13 @@ Taxonomies can be ordered by either alphabetical key or by the number of content ``` ``` @@ -224,7 +236,10 @@ Because we are leveraging the front matter system to define taxonomies for conte ``` ``` @@ -238,7 +253,12 @@ To list such taxonomies, use the following: ``` {{ if .Params.directors }} Director{{ if gt (len .Params.directors) 1 }}s{{ end }}: - {{ range $index, $director := .Params.directors }}{{ if gt $index 0 }}, {{ end }}{{ . }}{{ end }} + {{ range $index, $director := .Params.directors }} + {{- if gt $index 0 }}, {{ end -}} + {{ with $.Site.GetPage (printf "/directors/%s" $director) -}} + {{ $director }} + {{- end -}} + {{ end -}} {{ end }} ``` @@ -292,7 +312,9 @@ The following example displays all terms in a site's tags taxonomy: ``` ``` @@ -305,18 +327,20 @@ This example will list all taxonomies and their terms, as well as all the conten