Merge commit 'a6e635ca7d905d9ec3ffd708db2694f680b03aae'

This commit is contained in:
Bjørn Erik Pedersen
2024-08-09 15:17:43 +02:00
143 changed files with 3258 additions and 2109 deletions

View File

@@ -4,7 +4,7 @@
Before we can use a `Taxonomy` method, we need to capture a `Taxonomy` object.
## Capture a taxonomy object
## Capture a Taxonomy object
Consider this site configuration:
@@ -26,13 +26,13 @@ content/
└── _index.md
```
To capture the "genres" taxonomy object from within any template, use the [`Taxonomies`] method on a `Site` object.
To capture the "genres" `Taxonomy` object from within any template, use the [`Taxonomies`] method on a `Site` object.
```go-html-template
{{ $taxonomyObject := .Site.Taxonomies.genres }}
```
To capture the "genres" taxonomy object when rendering its page with a taxonomy template, use the [`Terms`] method on the page's [`Data`] object:
To capture the "genres" `Taxonomy` object when rendering its page with a taxonomy template, use the [`Terms`] method on the page's [`Data`] object:
{{< code file=layouts/_default/taxonomy.html >}}
{{ $taxonomyObject := .Data.Terms }}