The Example theme for Cecil is a minimal skeleton to start creating your own theme.
- Base layout with overridable blocks (
head_css,header,content,footer,scripts) - List layout with pagination
- Main menu navigation
- Built-in Cecil partials (
metatags,paginator) - Estimated reading time of pages, provided by the theme plugin
- Translatable (French translation included)
Cecil 9.25 or later (plugins support).
composer require cecil/theme-exampleOr download the latest archive and uncompress its content in
themes/example.
Add example in the theme section of your config.yml:
theme:
- exampleDefault values:
example:
color: '' # accent CSS color (e.g.: `#268bd2`)
reading_time: true # displays the estimated reading time of pagesThe theme is translated in French. You can add your own translations in translations/messages.<locale>.yml.
A theme can ship PHP extensions, registered by a single plugin declared in its config.yml:
extensions:
plugins:
ThemeExample: ThemeExample\Plugin| Class | Role |
|---|---|
ThemeExample\Plugin |
Registers the extensions of the theme |
ThemeExample\Twig\Extension |
example_reading_time filter (estimated reading time, in minutes) |
Classes live in extensions/ThemeExample/: the file path matches the namespace. Use your own namespace (e.g.: the name of your theme), not Cecil\ (reserved).
To ship more extensions (pages generators, output post-processors, build events subscribers…), see the plugin example.
Example is a free software distributed under the terms of the MIT license.