mirror of
https://github.com/gohugoio/hugo.git
synced 2024-07-05 08:42:12 +00:00
docs: Suggests the use of delimiter for taxonomy listing
as a shortcut suggested by @digitalcraftsman. See #2143
This commit is contained in:
parent
364686ecbb
commit
195a2b3845
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
aliases:
|
aliases:
|
||||||
- /indexes/displaying/
|
- /indexes/displaying/
|
||||||
lastmod: 2016-05-13
|
lastmod: 2016-06-29
|
||||||
date: 2013-07-01
|
date: 2013-07-01
|
||||||
linktitle: Displaying
|
linktitle: Displaying
|
||||||
menu:
|
menu:
|
||||||
|
@ -55,6 +55,10 @@ To list such taxonomy use the following:
|
||||||
{{ range $index, $director := .Params.directors }}{{ if gt $index 0 }}, {{ end }}<a href="directors/{{ . | urlize }}">{{ . }}</a>{{ end }}
|
{{ range $index, $director := .Params.directors }}{{ if gt $index 0 }}, {{ end }}<a href="directors/{{ . | urlize }}">{{ . }}</a>{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
Alternatively, you may use the [delimit]({{< relref "templates/functions.md#delimit" >}})
|
||||||
|
template function as a shortcut if the taxonomies should just be listed
|
||||||
|
with a separator. See {{< gh 2143 >}} on GitHub for discussion.
|
||||||
|
|
||||||
## 2. Listing content with the same taxonomy term
|
## 2. Listing content with the same taxonomy term
|
||||||
|
|
||||||
First, you may be asking why you would use this. If you are using a
|
First, you may be asking why you would use this. If you are using a
|
||||||
|
|
Loading…
Reference in a new issue