Doc add a missing arg to get_taxonomy_url (#1139)

This feature is already exist, but not in the doc yet

Related #766
This commit is contained in:
Ken 2020-08-18 20:06:49 +09:00 committed by GitHub
parent 261a2eee01
commit d198ad64db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -158,12 +158,14 @@ Gets metadata for an image. Currently, the only supported keys are `width` and
Gets the permalink for the taxonomy item found.
```jinja2
{% set url = get_taxonomy_url(kind="categories", name=page.taxonomies.category) %}
{% set url = get_taxonomy_url(kind="categories", name=page.taxonomies.category, lang=page.lang) %}
```
`name` will almost always come from a variable but in case you want to do it manually,
the value should be the same as the one in the front matter, not the slugified version.
`lang` (optional) default to `config.default_language` in config.toml
### `get_taxonomy`
Gets the whole taxonomy of a specific kind.