Below you find an explanation of the sections and settings in the site.yaml configuration file.
The settings in the site section will be available in all templates. Documents can override settings by using corresponding attributes. For example you could set a default author in the site section, that can be overridden in documents with a author attribute.
This section allows to define collections for categorizing content via corresponding attributes. The default site defines a tags collection.
In this section you can set Markdown and Jinja extensions to be used when the document body is converted to HTML and the page is rendered.
The languages section is optional and exists to enable additional features for multilingual sites. Please see I18N for more information.
To give a real world example, this site's configuration is shown below.
# General settings that will be available in templates.
site:
base_url: https://ramiro.org/logya/docs
author: Ramiro Gómez
name: Logya Documentation
# Settings that affect collections in the document index. Top-level keys of
# collections can be used as document attributes for grouping it in the
# corresponding collection.
collections:
tags:
path: tags
template: index.html
extensions:
jinja: # https://jinja.palletsprojects.com/extensions/
- 'jinja2.ext.do'
- 'jinja2.ext.loopcontrols'
- 'jinja2.ext.with_'
markdown: # https://python-markdown.github.io/extensions/
- 'attr_list'
- 'def_list'
- 'fenced_code'
- 'toc'