What's on this page
Front matter
The front matter can contain custom variables applied to the current page.
It must be the first thing in the file and must be valid YAML.
Predefined variables
| Variable | Description | Default value | Example |
|---|---|---|---|
title |
Title | File name without extension, prefix and language suffix. | Post 1 |
layout |
Template | See Lookup rules. | 404 |
date |
Creation date | File modification date (PHP DateTime object). | 2019-04-15 |
section |
Section | Page's Section. | blog |
path |
Path | Page's path. | blog/post-1 |
slug |
Slug | Page's slug. | post-1 |
weight |
Sort order | File weight prefix, if any. | 10 |
language |
Language code | File language suffix, or the main language. | fr |
langref |
Translations reference | Page's path (without language). | blog/post-1 |
published |
Published or not | true. |
false |
draft |
Draft or not | false. |
true |
updated
The updated variable is used to define the last modification date of a page.
Example:
---
updated: 2026-02-02
---
menu
A page can be added to a menu.
The entry name is the page title and the URL is the page path.
The same page can be added to multiple menus, and each entry's position can be set with the weight key (lowest first). The name key can be used to override the default entry name per menu.
Examples:
---
menu: main
---
---
menu: [main, navigation] # same page in multiple menus
---
---
menu:
main:
weight: 10
navigation:
weight: 20
---
---
title: 'Our Expertise'
menu:
main:
weight: 15
footer:
weight: 15
name: "Expertise" # override the entry name in this menu
---
Taxonomy
Taxonomy allows you to connect, relate and classify your website’s content.
In Cecil, these terms are gathered within vocabularies.
Vocabularies are declared in the Configuration.
- Vocabulary
- A categorization of content (e.g.:
tags,categories, etc.). - Term
- A term is an item of a vocabulary (e.g.:
Development,PHP, etc.).
Example:
---
tags: ["Development", "PHP"]
---
Cecil then generates, for each vocabulary:
- a page listing its terms, e.g.:
/tags/ - a page per term listing its pages, e.g.:
/tags/development/and/tags/php/
See templates lookup rules and taxonomy variables to customize those pages.
Schedule
Schedules pages’ publication.
Example:
The page is published from 2023-02-07 (if the current date is >= 2023-02-07):
---
schedule:
publish: 2023-02-07
---
The page is published until 2022-04-28 (if the current date is < 2022-04-28, i.e. before midnight):
---
schedule:
expiry: 2022-04-28
---
Both can be combined: the page is published if the publish date is reached and the expiry date is not passed.
redirect
As indicated by its name, the redirect variable is used to redirect a page to a dedicated URL.
Example:
---
redirect: "https://arnaudligny.fr"
---
alias
An alias is a redirection to the current page.
Example:
---
title: "About"
alias:
- contact
---
In the previous example contact/ redirects to about/.
output
Defines the output format of the page.
Available formats are: html, atom, rss, json, xml, etc.
You can define one or more formats in an array.
It’s not required to define an output format, but if you do, it must be one of the available formats defined in the Configuration.
Example:
---
output: [html, atom]
---
uglyurl
Set uglyurl to true to publish the page as a file named after its path (e.g.: blog/post-1.html) instead of an index.html file in a folder (e.g.: blog/post-1/index.html).
Example:
---
uglyurl: true
---
external
A page with an external variable tries to fetch the content of the pointed resource, and uses it as the page body.
Example:
---
external: "https://raw.githubusercontent.com/Cecilapp/Cecil/main/README.md"
---
excluded
Set excluded to true to hide a page from list pages (e.g.: Home page, Section, Sitemap, etc.).
Example:
---
excluded: true
---