Cecil logo Cecil
What's on this page

Extend templates

Templates can be extended with custom functions and filters, or packaged as a reusable theme.

Functions and filters

You can add custom functions and custom filters with a Twig extension.

Theme

It’s easy to build a theme: create a folder <theme> with the following structure (like a website but without pages):

<my-site>
└─ themes
   └─ <theme>
      ├─ config.yml
      ├─ assets
      ├─ layouts
      ├─ static
      └─ translations

Then enable it with the theme configuration option.

The theme config.yml overrides the default configuration and is merged with the site configuration, which takes precedence, except for lists of values: the site values are added to the theme ones, and a theme value can only be removed with false (e.g. homepage: {atom: false}).