Table of contents

Configuration

The website configuration is defined in a YAML file named config.yml, stored at the root (see an example):

<mywebsite>
└─ config.yml

Example

site:
    title: Cecil
    baseline: An easy and lightweight static website generator.
    baseurl: https://cecil.app/
    description: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    language: en

Website configuration

Configuration exposed to layouts is set under the site key.

Example:

site:
  key: "value"
  googleanalytics: "GA-123456"

title

Main title of the site.

baseline

Short description (~ 20 characters).

baseurl

Base URL, must end with a trailing slash (/).

Example: http://localhost:8000/.

description

Site description (~ 250 characters).

taxonomies

List of vocabularies, paired by plural and singular value.

Example: projects: project.

Could be disabled with disabled: true.

menu

Each menu entry must have the following items:

  • id: unique identifier.
  • name: name used in layouts.
  • url: relative or absolute URL.
  • weight: used to order entries.

A default menu (main) is created with home page and sections. A menu entry can be disabled with disabled: true.

Example:

site:
  menu:
    main:
      index:
        id: index
        name: Da home!
        url: /
        weight: 1
      about:
        id: about
        disabled: true
    secondary:
      narno:
        id: narno
        name: narno.org
        url: http://narno.org
        weight: 999

paginate

Pagination options:

  • max: maximum listed pages (integer).
  • path: path to paginated page (string). page by default.
  • disabled: enable or disable (boolean).
  • homepage: section pages listed on home page. section: blog by default.

date

Date format and timezone:

  • date: The format specifier is the same as supported by date.
  • timezone: The date timezone. ie: Europe/Paris.

Global configuration

content

  • dir: content (pages) directory.
  • ext: content files extensions.

frontmatter

  • format: front matter format. ie: yaml.

body

  • format: page body format. ie: md (for Markdown).

static

  • dir: static files directory.
  • exclude: list of files to exclude from copy.

layouts

  • dir: layouts directory.

output

  • dir: directory where rendered page are stored.
  • filename: index.html.

themes

  • dir: themes directory.

theme

If used, the name of the theme (sub-directory of themes).

drafts

Build website with drafts or not. false by default.

Default configuration

This is a default configuration. The local website configuration file owerride those keys if exists.

site:
  title: Cecil
  baseline: "A Cecil website"
  baseurl: "http://localhost:8000/"
  description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
  taxonomies:
    tags: tag
    categories: category
  paginate:
    max: 5
    path: page
  date:
    format: "j F Y"
    timezone: Europe/Paris
  fmpages:
    robotstxt:
      layout: robots.txt
      permalink: robots.txt
    sitemap:
      layout: sitemap.xml
      permalink: sitemap.xml
      changefreq: monthly
      priority: 0.5
    404:
      layout: 404.html
      permalink: 404.html
    rss:
      layout: rss.xml
      permalink: rss.xml
content:
  dir: content
  ext: [md, markdown, mdown, mkdn, mkd, text, txt]
frontmatter:
  format: yaml
body:
  format: md
static:
  dir: static
layouts:
  dir: layouts
  internal:
    redirect.html: ""
    robots.txt: ""
    sitemap.xml: ""
    googleanalytics.js: "includes/"
    rss.xml: ""
output:
  dir: _site
  filename: index.html
themes:
  dir: themes
generators:
  10: Cecil\Generator\Section
  20: Cecil\Generator\Taxonomy
  30: Cecil\Generator\Homepage
  40: Cecil\Generator\Pagination
  50: Cecil\Generator\Alias
  35: Cecil\Generator\ExternalBody
  36: Cecil\Generator\PagesFromConfig
Suggest a modification Next