What's on this page
Output
Defines where and in what format pages are rendered.
output.dir
Directory where rendered pages’ files are saved (_site by default).
output:
dir: _site output.formats
List of output formats definition, which are used to render pages (e.g. HTML, Atom, RSS, JSON, XML, etc.).
output:
formats:
- name: <name> # name of the format, e.g.: `html` (required)
mediatype: <media type> # media type (MIME type), ie: 'text/html' (optional)
subpath: <sub path> # sub path, e.g.: `amp` in `path/amp/index.html` (optional)
filename: <file name> # file name, e.g.: `index` in `path/index.html` (optional)
extension: <extension> # file extension, e.g.: `html` in `path/index.html` (required)
exclude: [<variable>] # don’t apply this format to pages identified by listed variables, e.g.: `[redirect, paginated]` (optional) Those formats are used in the output.pagetypeformats configuration and in the output page variable.
Default formats
Cecil provides some default formats, which can be overridden in the configuration file: html (default), atom, rss, json, xml, txt, amp, js, webmanifest, xsl, jsonfeed, iframe, oembed.
output.pagetypeformats
It’s not required to set output variable for each page, as Cecil automatically applies the formats defined for each page type (homepage, page, section, vocabulary and term).
output:
pagetypeformats:
page: [<format>]
homepage: [<format>]
section: [<format>]
vocabulary: [<format>]
term: [<format>] Several formats can be defined for the one type of page. For example the section page type can be automatically rendered in HTML and Atom:
output:
pagetypeformats:
section: [html, atom] output example
output:
dir: _site
formats:
- name: html
mediatype: text/html
filename: index
extension: html
- name: atom
mediatype: application/xml
filename: atom
extension: xml
exclude: [redirect, paginated]
pagetypeformats:
page: [html]
homepage: [html, atom]
section: [html, atom]
vocabulary: [html]
term: [html, atom] Post process
You can extend Cecil capabilities with an Output post processor to modify the output files after they have been generated.