cecil / theme-docs
Cecil theme Docs
Package info
github.com/Cecilapp/theme-docs
Language:Twig
Type:cecil-theme
pkg:composer/cecil/theme-docs
Requires
- cecil/theme-installer: ^1.0||^2.0
Requires (Dev)
- aligny/tailwind-builder: ^1.2
Suggests
- cecil/theme-docsearch: Search with Algolia DocSearch
- cecil/theme-flexsearch: Client side search with FlexSearch, without external service
Provides
None
Conflicts
None
Replaces
None
- dev-main / 6.x-dev
- 6.0.0
- 5.0.0
- 4.0.0
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.1
- 3.2.0
- 3.1.1
- 3.1.0
- 3.0.2
- 3.0.1
- 3.0.0
- 2.42.6
- 2.42.5
- 2.42.4
- 2.42.3
- 2.42.2
- 2.42.1
- 2.42.0
- 2.41.5
- 2.41.4
- 2.41.3
- 2.41.2
- 2.41.1
- 2.41.0
- 2.40.4
- 2.40.3
- 2.40.2
- 2.40.1
- 2.40.0
- 2.39.1
- 2.39.0
- 2.38.0
- 2.37.3
- 2.37.2
- 2.37.1
- 2.37.0
- 2.36.3
- 2.36.2
- 2.36.1
- 2.36.0
- 2.35.4
- 2.35.3
- 2.35.2
- 2.35.1
- 2.35.0
- 2.34.1
- 2.34.0
- 2.33.0
- 2.32.2
- 2.32.1
- 2.32.0
- 2.31.1
- 2.31.0
- 2.30.1
- 2.29.6
- 2.29.5
- 2.29.4
- 2.29.3
- 2.29.2
- 2.29.1
- 2.29.0
- 2.28.1
- 2.28.0
- 2.27.1
- 2.27.0
- 2.26.0
- 2.25.4
- 2.25.3
- 2.25.2
- 2.25.1
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.1
- 2.22.0
- 2.21.1
- 2.21.0
- 2.20.2
- 2.20.1
- 2.20.0
- 2.19.0
- 2.18.11
- 2.18.10
- 2.18.9
- 2.18.8
- 2.18.7
- 2.18.6
- 2.18.5
- 2.18.4
- 2.18.3
- 2.18.2
- 2.18.1
- 2.18.0
- 2.17.1
- 2.17.0
- 2.16.0
- 2.15.16
- 2.15.15
- 2.15.14
- 2.15.13
- 2.15.12
- 2.15.11
- 2.15.10
- 2.15.9
- 2.15.8
- 2.15.7
- 2.15.6
- 2.15.5
- 2.15.4
- 2.15.3
- 2.15.2
- 2.15.1
- 2.15.0
- 2.14.2
- 2.14.1
- 2.14.0
- 2.13.3
- 2.13.2
- 2.13.1
- 2.13.0
- 2.12.2
- 2.12.1
- 2.12.0
- 2.11.1
- 2.11.0
- 2.10.4
- 2.10.3
- 2.10.2
- 2.10.1
- 2.10.0
- 2.9.0
- 2.8.1
- 2.8.0
- 2.7.1
- 2.7.0
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.1
- 2.6.0
- 2.5.1
- 2.5.0
- 2.4.1
- 2.4.0
- 2.3.1
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.9.7
- 1.9.6
- 1.9.5
- 1.9.4
- 1.9.3
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.3
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.0
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- dev-feat/blog-versions
- dev-refactor/review-follow-up
- dev-fix/review-improvements
This package is auto-updated.
Last update: 2026-10-20 22:25:59 UTC
README
Docs is a documentation theme for Cecil, designed to provide a modern and responsive interface for your project's documentation, powered by Tailwind CSS and Algolia DocSearch.
Features
- Auto-generated navigation sidebar (based on nested sections), with collapsible groups
- Search: Algolia DocSearch or FlexSearch integration
- Copy button on code blocks
- "Edit this page" link and "Last updated" date
- Previous/next navigation through nested sections
- Custom 404 page
- Ready for content localization (l10n)
- Templates internationalization (i18n)
- Mobile friendly
- Dark theme
- Blog posts templates, with tags, pagination and feed link
- Documentation versions selector
Installation
composer require cecil/theme-docs
Or download the latest archive and uncompress its content in
themes/docs.
Usage
Add docs in the theme section of the config.yml:
theme: - docs
Configuration
The navigation sidebar is generated automatically from the folders structure of
pages/docs/, based on nested sections:
each sub-folder containing an index.md file becomes a collapsible group, at
any depth. Ordering is based on pages weight (e.g. a 1- filename prefix or a
weight front matter variable).
Note
The 1- prefix is removed from file names only: use the weight front matter
variable in the index.md file of a sub-folder to order it (the prefix would
otherwise be kept in its URL).
Groups are open by default. Set collapsed: true in the front matter of a section
(index.md) to collapse it, or sidebar.collapsed: true in the configuration to
collapse all of them: the group of the current page is always open.
The updated front matter variable of a page is displayed as its "Last updated"
date (enable lastupdated to display the page date otherwise).
footer: Copyright © %author% github: url: https://github.com/<org>/<repo> # GitHub link in header repo: https://github.com/<org>/<repo> # "Edit this page" link branch: <main|master> path: pages # pages directory path in the repository (default: pages) sidebar: collapsed: false|true # collapse the navigation groups, except the current one (default: false) lastupdated: false|true # display the page date as "Last updated" date (default: false) language_cookie: <name> # cookie storing the language chosen with the selector, e.g. `nf_lang` for Netlify (default: false) inline_styles: true|false # inline the stylesheets in production: no extra request, but not cached by the browser across pages (default: true)
Versions
To publish several versions of the documentation (e.g. one deployment per
version), list them in the versions option: they are displayed in a selector,
next to the site title.
versions: - name: '2.x' url: https://docs.example.com/ - name: '1.x' url: https://v1.docs.example.com/ version: '2.x' # name of the current version (default: the first one)
Search
The search button is displayed in the header, with one of the following component themes (DocSearch takes precedence if both are enabled).
Algolia DocSearch
Install the DocSearch component theme,
add it after docs and provide your Algolia credentials:
composer require cecil/theme-docsearch
theme: - docs - docsearch docsearch: appId: <YOUR_APP_ID> indexName: <YOUR_INDEX_NAME> apiKey: <YOUR_SEARCH_API_KEY>
See the DocSearch component theme for other options.
Note
DocSearch used to be built into the theme: the docsearch configuration is
unchanged, but the docsearch component theme must now be installed.
FlexSearch
As an alternative to DocSearch (no external service), install the
FlexSearch component theme and add it after docs:
theme: - docs - flexsearch
Logo
The site title is displayed in the header, with an optional logo (an image of
the assets/ folder), single or one per color theme:
logo: logo.png # or logo: light: logo-light.png dark: logo-dark.png
Menus
The main menu is displayed in the header (and in the sidebar on mobile), the
optional footer menu in the footer:
menus: main: - id: docs name: Documentation url: /docs/ weight: 10 footer: - id: cecil name: Cecil url: https://cecil.app
Homepage blocks
The homepage is built from blocks, listed in its front matter (pages/index.md),
followed by its content:
--- title: Home blocks: - name: hero # site title and baseline description: A **Markdown** text. image: hero.svg # optional - name: cta # call to action button: # optional: first page of the documentation by default title: Get started url: /docs/ links: - title: GitHub url: https://github.com/<org>/<repo> - name: features features: - title: Feature 1 description: A **Markdown** text. ---
Notes
Notes (callouts) are written with Cecil's notes syntax,
with the info, tip, important, warning and caution types:
:::tip **Tip:** helpful advice for doing things better. :::
Blog
Posts of the blog section display their date, reading time and author(s):
author (or authors) front matter variable, as an object (name, title,
url, email, image) or as a key of data/authors.yml.
Posts can be tagged with the tags front matter variable: tags are linked to
their page (e.g. /tags/release/), and all of them are listed in /tags/.
--- title: My post tags: [release, blog] ---
The list of posts links to its feed, and can be paginated: pagination is
disabled by default, enable it in the front matter of the blog section
(pages/blog/index.md).
--- title: Blog pagination: enabled: true max: 5 # number of posts by page ---
Note
Enabling the pagination of a single section requires Cecil 9.21.0 or later.
Stylesheets
A template extending the theme layouts can load additional stylesheets with the
styles_extra variable, set outside of any block (a variable set in a block
is not visible in the parent template). They are loaded before the theme stylesheet:
{% extends 'docs/page.html.twig' %}
{% set styles_extra = ['https://cdn.example.com/lib.css', 'css/custom.css'] %}
The styles block outputs additional <head> tags, before the theme stylesheets.
Development
Install deps
composer install
Rebuild CSS
composer css:build
CSS is compiled with tailwind-builder,
which uses the Tailwind standalone binary (no Node.js required).
The compiled assets/styles.css is committed: the CI checks it is up to date with its sources.
Demo site
The demo/ folder contains a site using this theme (nested sections, notes,
code, Mermaid diagrams, blog, FlexSearch, French translation), to test changes locally with
Cecil:
php demo/link.php # links the repository as `demo/themes/docs` and installs FlexSearch (once)
cecil serve demo
License
Docs theme is a free software distributed under the terms of the MIT license.
