Config
This configuration file defines key settings for the entire site. The config file for Toucan is stored in the config.yml
file, inside the project’s root directory. This file is optional, and if it is not present, Toucan will use the default values.
Default values
The default values are as follows:
themes:
folder: "themes"
use: "default"
assets:
folder: "assets"
templates:
folder: "templates"
overrides:
folder: "overrides"
types:
folder: "types"
contents:
folder: "contents"
dateFormat: "yyyy-MM-dd HH:mm:ss"
assets:
folder: "assets"
home:
id: "home"
template: "pages.home"
notFound:
id: "404"
template: "pages.404"
rss:
output: rss.xml
transformers:
folder: "transformers"
pipelines:
# post:
# run:
# - name: example-pipeline
# isMarkdownResult: false
Themes section
This section defines the location of the theme related files and other theme related settings, such as the theme to use.
folder
- The location of the themes folder.
This value specifies the location of the themes folder inside the source folder.
use
- The theme to use.
This value specifies the folder name of the theme, inside the themes folder, to use.
assets.folder
- The name of the assets folder.
This value specifies the folder name of the assets location inside the theme folder.
templates.folder
- The name of the templates folder.
This value specifies the folder name of the Mustache templates location inside the theme folder.
overrides.folder
- The name of the template overrides folder.
This value specifies the folder name of the Mustache template overrides location inside the theme folder. If you place a file in this folder, it will override the default template for the corresponding file.
types.folder
- The name of the content types folder.
This value specifies the folder name of the content types location inside the theme folder. This folder is used to define custom content types for the website.
Contents section
This section defines the location of the content related files and other content related settings, such as the date format.
contents.folder
- The name of the contents folder.
This value specifies the folder name of the contents location inside the source folder.
contents.dateFormat
- The date format for the website.
Determines the format in which dates are displayed on the site.
Date format symbols
- yyyy: Year (e.g., 2023)
- MM: Month (e.g., 09 for September)
- dd: Day (e.g., 28)
- HH: Hour (e.g., 14 for 2 PM)
- mm: Minute (e.g., 05)
- ss: Second (e.g., 37)
Example
- “yyyy-MM-dd HH:mm:ss”
contents.assets.folder
- The name of the assets folder.
This value specifies the folder name of the assets location inside the contents folder.
contents.home.id
- The ID of the home page.
This value specifies the unique identifier for the home page.
contents.home.template
- The template for the home page.
This value specifies the Mustache template used to render the home page.
contents.notFound.id
- The ID of the not found page.
This value specifies the unique identifier for the 404 (not found) page.
contents.notFound.template
- The template for the not found page.
This value specifies the Mustache template used to render the 404 (not found) page.
contents.rss.output
- The output file for the RSS feed.
This value specifies the filename for the generated RSS feed.
Transformers section
This section defines the location of the content transformers and the pipelines for each content type.
transformers.location
- The location of the transformers files.
This value specifies the directory where the content transformer scripts are stored.
transformers.pipelines
- The pipelines for each content type.
This value defines the processing pipelines that will be applied to different types of content. The key is the content type identifier, and the value is a dictionary with the pipelines to run and an optional settings to disable the default markdown renderer, if needed.
Example
pipelines:
post:
run:
- name: example-pipeline
isMarkdownResult: false