parent
e2f2f4f779
commit
3bedb42b0b
|
@ -18,7 +18,8 @@ Here are the current `config.toml` sections:
|
||||||
4. slugify
|
4. slugify
|
||||||
5. search
|
5. search
|
||||||
6. translations
|
6. translations
|
||||||
7. extra
|
7. languages
|
||||||
|
8. extra
|
||||||
|
|
||||||
**Only the `base_url` variable is mandatory**. Everything else is optional. All configuration variables
|
**Only the `base_url` variable is mandatory**. Everything else is optional. All configuration variables
|
||||||
used by Zola as well as their default values are listed below:
|
used by Zola as well as their default values are listed below:
|
||||||
|
@ -72,27 +73,17 @@ feed_filename = "atom.xml"
|
||||||
# files are always copied, regardless of this setting.
|
# files are always copied, regardless of this setting.
|
||||||
hard_link_static = false
|
hard_link_static = false
|
||||||
|
|
||||||
# The taxonomies to be rendered for the site and their configuration.
|
# The taxonomies to be rendered for the site and their configuration of the default languages
|
||||||
# Example:
|
# Example:
|
||||||
# taxonomies = [
|
# taxonomies = [
|
||||||
# {name = "tags", feed = true}, # each tag will have its own feed
|
# {name = "tags", feed = true}, # each tag will have its own feed
|
||||||
# {name = "tags", lang = "fr"}, # you can have taxonomies with the same name in multiple languages
|
# {name = "tags"}, # you can have taxonomies with the same name in multiple languages
|
||||||
# {name = "categories", paginate_by = 5}, # 5 items per page for a term
|
# {name = "categories", paginate_by = 5}, # 5 items per page for a term
|
||||||
# {name = "authors"}, # Basic definition: no feed or pagination
|
# {name = "authors"}, # Basic definition: no feed or pagination
|
||||||
# ]
|
# ]
|
||||||
#
|
#
|
||||||
taxonomies = []
|
taxonomies = []
|
||||||
|
|
||||||
# The additional languages for the site.
|
|
||||||
# Example:
|
|
||||||
# languages = [
|
|
||||||
# {code = "fr", feed = true}, # there will be a feed for French content
|
|
||||||
# {code = "fr", search = true}, # there will be a Search Index for French content
|
|
||||||
# {code = "it"}, # there won't be a feed for Italian content
|
|
||||||
# ]
|
|
||||||
#
|
|
||||||
languages = []
|
|
||||||
|
|
||||||
# A list of directories used to search for additional `.sublime-syntax` files.
|
# A list of directories used to search for additional `.sublime-syntax` files.
|
||||||
extra_syntaxes = []
|
extra_syntaxes = []
|
||||||
|
|
||||||
|
@ -159,20 +150,30 @@ include_content = true
|
||||||
# become too big to load on the site. Defaults to not being set.
|
# become too big to load on the site. Defaults to not being set.
|
||||||
# truncate_content_length = 100
|
# truncate_content_length = 100
|
||||||
|
|
||||||
# Optional translation object. Keys should be language codes.
|
# Optional translation object for the default language
|
||||||
# Optional translation object. The key if present should be a language code.
|
|
||||||
# Example:
|
# Example:
|
||||||
# default_language = "fr"
|
# default_language = "fr"
|
||||||
#
|
#
|
||||||
# [translations]
|
# [translations]
|
||||||
# [translations.fr]
|
|
||||||
# title = "Un titre"
|
# title = "Un titre"
|
||||||
#
|
#
|
||||||
# [translations.en]
|
|
||||||
# title = "A title"
|
|
||||||
#
|
|
||||||
[translations]
|
[translations]
|
||||||
|
|
||||||
|
# Additional languages definition
|
||||||
|
# You can define language specific config values and translations:
|
||||||
|
# title, description, generate_feed, feed_filename, taxonomies, build_search_index
|
||||||
|
# as well as its own search configuration and translations (see above for details on those)
|
||||||
|
[languages]
|
||||||
|
# For example
|
||||||
|
# [languages.fr]
|
||||||
|
# title = "Mon blog"
|
||||||
|
# generate_feed = true
|
||||||
|
# taxonomies = [
|
||||||
|
# {name = "auteurs"},
|
||||||
|
# {name = "tags"},
|
||||||
|
# ]
|
||||||
|
# build_search_index = false
|
||||||
|
|
||||||
# You can put any kind of data here. The data
|
# You can put any kind of data here. The data
|
||||||
# will be accessible in all templates
|
# will be accessible in all templates
|
||||||
# Example:
|
# Example:
|
||||||
|
|
|
@ -15,7 +15,7 @@ you can place `{{ __tera_context }}` in the template to print the whole context.
|
||||||
|
|
||||||
A few variables are available on all templates except feeds and the sitemap:
|
A few variables are available on all templates except feeds and the sitemap:
|
||||||
|
|
||||||
- `config`: the [configuration](@/documentation/getting-started/configuration.md) without any modifications
|
- `config`: the language aware [configuration](@/documentation/getting-started/configuration.md)
|
||||||
- `current_path`: the path (full URL without `base_url`) of the current page, always starting with a `/`
|
- `current_path`: the path (full URL without `base_url`) of the current page, always starting with a `/`
|
||||||
- `current_url`: the full URL for the current page
|
- `current_url`: the full URL for the current page
|
||||||
- `lang`: the language for the current page
|
- `lang`: the language for the current page
|
||||||
|
|
|
@ -19,8 +19,8 @@ taxonomies = [
|
||||||
[languages.fr]
|
[languages.fr]
|
||||||
generate_feed = true
|
generate_feed = true
|
||||||
taxonomies = [
|
taxonomies = [
|
||||||
{name = "auteurs", lang = "fr"},
|
{name = "auteurs"},
|
||||||
{name = "tags", lang = "fr"},
|
{name = "tags"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[languages.it]
|
[languages.it]
|
||||||
|
|
Loading…
Reference in a new issue