Cecil logo Cecil
What's on this page

Site options

These options define the main settings of the site: title, URL, description, menus, taxonomies, theme, metatags, etc.

title

Main title of the site.

title: "<site title>"

baseline

Short description (~ 20 characters).

baseline: "<baseline>"

baseurl

The base URL.

baseurl: <url>

Example:

baseurl: http://localhost:8000/

canonicalurl

If set to true the url() function will return the absolute URL (false by default).

canonicalurl: <true|false> # false by default

description

Site description (~ 250 characters).

description: "<description>"

Menus are used to create navigation links in templates.

A menu is a list of entries, each defined by a unique ID and properties (name, URL, weight).

menus:
  <name>:
    - id: <unique-id>   # unique identifier (required)
      name: "<name>"    # name displayed in templates
      url: <url>        # relative or absolute URL
      weight: <integer> # integer value used to sort entries (lighter first)

Example:

menus:
  main:
    - id: about
      name: "About"
      url: /about/
      weight: 1
  footer:
    - id: author
      name: The author
      url: https://arnaudligny.fr
      weight: 99

Override an entry

A page menu entry can be overridden: use the page ID as id.

The ID of a page menu entry doesn't include the language prefix (e.g.: docs for the fr/docs page): the same id targets the entry in every language.

Example:

menus:
  main:
    - id: index
      name: "My amazing homepage!"
      weight: 1

Disable an entry

A menu entry can be disabled with enabled: false.

Example:

menus:
  main:
    - id: about
      enabled: false

taxonomies

List of vocabularies, paired by plural and singular value.

taxonomies:
  <plural>: <singular>

Example:

taxonomies:
  categories: category
  tags: tag

Then you can use those vocabularies in your content’s front matter.

theme

The theme to use, or a list of themes.

theme: <theme> # theme name
# or
theme:
  - <theme1> # theme name
  - <theme2>

Examples:

theme: hyde
theme:
  - pwa
  - hyde

date

Date format and timezone.

date:
  format: <format>     # date format (optional, `F j, Y` by default)
  timezone: <timezone> # date timezone (optional, local time zone by default)

Example:

date:
  format: 'j F, Y'
  timezone: 'Europe/Paris'

metatags

metatags are SEO and social helpers that can be automatically injected in the <head>, with the template partials/metatags.html.twig.

This template adds the following meta tags:

  • Page title + Site title, or Site title + Site baseline
  • Page/Site description
  • Page/Site keywords
  • Page/Site author
  • Search engine crawler directives (robots)
  • Favicon links
  • Navigation links (first, previous, next, last)
  • Canonical URL
  • Alternate links (e.g.: RSS feed, other languages)
  • rel=me links
  • Open Graph
  • Facebook profile ID
  • Twitter/X Card
  • Fediverse tag
  • Dublin Core
  • Structured data (JSON-LD)

metatags options

Cecil uses page front matter to feed meta tags, and falls back to site options when needed.

title: "Page/Site title"              # used by title meta
description: "Page/Site description"  # used by description meta
tags: [tag1, tag2]                    # used by keywords meta
keywords: [keyword1, keyword2]        # obsolete in page front matter (use `tags`)
author:                               # used by author meta
  name: <name>                          # author name
  url: <url>                            # author URL
  email: <email>                        # author email
image: image.jpg                      # used by Open Graph and social networks cards
canonical:                            # used to override the generated canonical URL
  url: <URL>                            # absolute URL
  title: "<URL title>"                  # optional canonical title
social:                               # used by social networks meta
  twitter:                              # used by Twitter/X Card
    url: <URL>                            # used for `rel=me` link
    site: username                        # site username
    creator: username                     # page author username
  mastodon:                             # used by Mastodon meta
    url: <URL>                            # used for `rel=me` link
    creator: handle                       # page author account
  facebook:                             # used by Facebook meta
    url: <URL>                            # used for `rel=me` link
    id: 123456789                         # Facebook profile ID
    username: username                    # page author username

metatags configuration

metatags:
  title:                   # title options
    divider: " &middot; "    # string between page title and site title
    only: false              # displays page title only (`false` by default)
    pagination:              # pagination options
      shownumber: true         # displays page number in title (`true` by default)
      label: "Page %s"         # how to display page number (`Page %s` by default)
  robots: "index,follow"   # web crawlers directives (`index,follow` by default)
  favicon:                 # favicon options (set `favicon: false` to disable)
    image: favicon.png       # path to favicon image (`favicon.png` by default)
    sizes:                   # sizes by device
      "icon": [32, 57, 76, 96, 128, 192, 228]  # web browsers
      "shortcut icon": [128, 196]              # Android
      "apple-touch-icon": [120, 152, 180]      # iOS
  navigation: true         # includes previous and next links (`true` by default)
  image: true              # includes image (`true` by default)
  og: true                 # includes Open Graph meta tags (`true` by default)
  articles: "blog"         # articles' section(s): a section or a list of sections (`blog` by default)
  twitter: true            # includes Twitter/X Card meta tags (`true` by default)
  mastodon: true           # includes Mastodon meta tags (`true` by default)
  dc: false                # includes Dublin Core meta tags (`false` by default)
  data: false              # includes JSON-LD structured data (`false` by default), see below for options

Structured data

When enabled, structured data are added as a JSON-LD graph of linked entities (schema.org):

  • WebSite and its publisher (Organization or Person)
  • WebPage (CollectionPage for the homepage, sections and taxonomies pages), except for the 404 page
  • BreadcrumbList: home, ancestor sections (or vocabulary) and current page
  • BlogPosting for pages of the articles' section(s) (see metatags.articles)
  • VideoObject for pages with a video and an image (used as thumbnail)
  • ItemList of the main menu entries

metatags.data accepts true or a map of options:

metatags:
  data:
    enabled: true            # enables JSON-LD structured data (`true` if `data` is a map)
    article: BlogPosting     # schema.org type of articles (`BlogPosting` by default, e.g. `NewsArticle`)
    publisher:               # entity that publishes the site
      type: Organization       # `Organization` (default) or `Person` (personal site)
      name: <name>             # site title by default (site author name for a `Person`)
      logo: logo.png           # favicon image (`favicon.png`) by default
      url: <url>               # site URL by default
      sameAs: [<url>, <url>]   # `url` of `social` entries by default

The page front matter can override some options:

metatags:
  data:
    enabled: false           # disables structured data for this page
    type: AboutPage          # page type (e.g. `AboutPage`, `ContactPage`, `ProfilePage`, `FAQPage`)
    article: NewsArticle     # article type

debug

Enables the debug mode, used to display debug information like very verbose logs, Twig dump, Twig profiler, SCSS sourcemap, etc.

debug: true

There are two other ways to enable debug mode:

  1. Run a command with the -vvv option
  2. Set the CECIL_DEBUG environment variable to true