{
  "version": "https://jsonfeed.org/version/1.1",
  "title": "Cecil - Documentation",
  "home_page_url": "https://cloudflare.cecil.app/documentation/",
  "feed_url": "https://cloudflare.cecil.app/documentation/feed.json",
  "description": "Documentation of the Cecil static site generator.",
  "icon": "https://cloudflare.cecil.app/favicon.7ff4b89eec6dad139a7d2d6561543285.png",
  "favicon": "https://cloudflare.cecil.app/thumbnails/64x/favicon.7ff4b89eec6dad139a7d2d6561543285.png",
  "language": "en",
  "items": [
    {
      "id": "https://cloudflare.cecil.app/documentation/commands/new-extension/",
      "url": "https://cloudflare.cecil.app/documentation/commands/new-extension/",
      "title": "new:extension",
      "summary": "Create the skeleton of an extension: generator, Twig extension, post-processor, event subscriber or plugin.",
      "date_published": "2026-10-26T00:00:00+00:00",
      "date_modified": "2026-10-26T00:00:00+00:00","content_text": "new:extension\nCreates the skeleton of an extension class in the extensions directory, and displays the configuration to enable it.\nUsage\nDescription:\n  Creates a new extension\n\nUsage:\n  new:extension [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                       Use the given path as working directory\n\nOptions:\n  -t, --type=TYPE            Extension type (generator, twig, postprocessor, subscriber, plugin)\n      --name=NAME            Extension class name (e.g.: \"MyGenerator\")\n      --namespace=NAMESPACE  Root namespace of the extension (e.g.: \"MySite\")\n  -f, --force                Override the file if already exist\n  -h, --help                 Display help for the given command. When no command is given display help for the list command\n      --silent               Do not output any message\n  -q, --quiet                Only errors are displayed. All other output is suppressed\n  -V, --version              Display this application version\n      --ansi|--no-ansi       Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction       Do not ask any interactive question\n  -v|vv|vvv, --verbose       Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The new:extension command creates the skeleton of an extension class in the extensions directory,\n  and displays the configuration to enable it.\n  If you run this command without any options, it will ask you for the extension type, name and namespace.\n\n    cecil.phar new:extension\n    cecil.phar new:extension --type=generator --name=Database --namespace=MySite\n\n  Available types: generator, twig, postprocessor, subscriber and plugin.\n\n  To override an existing extension, run:\n\n    cecil.phar new:extension --force\nTypes\n\n\n\nType\nClass\nConfiguration\n\n\n\n\ngenerator\n&lt;namespace&gt;\\Generator\\&lt;name&gt; (page generator)\npages.generators\n\n\ntwig\n&lt;namespace&gt;\\Twig\\&lt;name&gt; (Twig extension)\nlayouts.extensions\n\n\npostprocessor\n&lt;namespace&gt;\\PostProcessor\\&lt;name&gt; (output post-processor)\noutput.postprocessors\n\n\nsubscriber\n&lt;namespace&gt;\\Subscriber\\&lt;name&gt; (build events subscriber)\nextensions.subscribers\n\n\nplugin\n&lt;namespace&gt;\\&lt;name&gt; (plugin)\nextensions.plugins\n\n\n\nThe class is created in extensions\/&lt;namespace path&gt;\/. The Cecil namespace is reserved and can't be used.",
      "content_html": "<h1>new:extension</h1>\n<p>Creates the skeleton of an <a href=\"../developers/1-extend.md\">extension</a> class in the <code translate=\"no\">extensions</code> directory, and displays the configuration to enable it.</p>\n<h2 id=\"usage\">Usage<a class=\"heading-anchor\" href=\"#usage\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">Description:\n  Creates a new extension\n\nUsage:\n  new:extension [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                       Use the given path as working directory\n\nOptions:\n  -t, --type=TYPE            Extension type (generator, twig, postprocessor, subscriber, plugin)\n      --name=NAME            Extension class name (e.g.: \"MyGenerator\")\n      --namespace=NAMESPACE  Root namespace of the extension (e.g.: \"MySite\")\n  -f, --force                Override the file if already exist\n  -h, --help                 Display help for the given command. When no command is given display help for the list command\n      --silent               Do not output any message\n  -q, --quiet                Only errors are displayed. All other output is suppressed\n  -V, --version              Display this application version\n      --ansi|--no-ansi       Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction       Do not ask any interactive question\n  -v|vv|vvv, --verbose       Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The new:extension command creates the skeleton of an extension class in the extensions directory,\n  and displays the configuration to enable it.\n  If you run this command without any options, it will ask you for the extension type, name and namespace.\n\n    cecil.phar new:extension\n    cecil.phar new:extension --type=generator --name=Database --namespace=MySite\n\n  Available types: generator, twig, postprocessor, subscriber and plugin.\n\n  To override an existing extension, run:\n\n    cecil.phar new:extension --force</code></pre>\n<h2 id=\"types\">Types<a class=\"heading-anchor\" href=\"#types\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<table>\n<thead>\n<tr>\n<th>Type</th>\n<th>Class</th>\n<th>Configuration</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">generator</code></td>\n<td><code translate=\"no\">&lt;namespace&gt;\\Generator\\&lt;name&gt;</code> (page generator)</td>\n<td><code translate=\"no\">pages.generators</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">twig</code></td>\n<td><code translate=\"no\">&lt;namespace&gt;\\Twig\\&lt;name&gt;</code> (Twig extension)</td>\n<td><code translate=\"no\">layouts.extensions</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">postprocessor</code></td>\n<td><code translate=\"no\">&lt;namespace&gt;\\PostProcessor\\&lt;name&gt;</code> (output post-processor)</td>\n<td><code translate=\"no\">output.postprocessors</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">subscriber</code></td>\n<td><code translate=\"no\">&lt;namespace&gt;\\Subscriber\\&lt;name&gt;</code> (build events subscriber)</td>\n<td><code translate=\"no\">extensions.subscribers</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">plugin</code></td>\n<td><code translate=\"no\">&lt;namespace&gt;\\&lt;name&gt;</code> (plugin)</td>\n<td><code translate=\"no\">extensions.plugins</code></td>\n</tr>\n</tbody>\n</table>\n<p>The class is created in <code translate=\"no\">extensions/&lt;namespace path&gt;/</code>. The <code translate=\"no\">Cecil</code> namespace is reserved and can't be used.</p>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/ai/agent-skills/",
      "url": "https://cloudflare.cecil.app/documentation/ai/agent-skills/",
      "title": "Agent skills",
      "summary": "Install the Cecil skills to help AI coding agents build sites and themes.",
      "date_published": "2026-10-22T00:00:00+00:00",
      "date_modified": "2026-10-27T00:00:00+00:00","content_text": "Agent skills\nCecil provides agent skills: instructions that AI coding agents (Claude Code, GitHub Copilot, Cursor, etc.) load to work with Cecil the right way, following its conventions.\n\n\n\nSkill\nUse it to\n\n\n\n\ncecil\nCreate, configure, build and deploy a site: content, front matter, templates, assets, configuration, etc.\n\n\ncecil-theme\nCreate, structure and package a theme (visual theme or component theme) for Composer.\n\n\n\nInstall\nInstall the skills in your project with npx skills, which detects your coding agents and adds the skills where they expect them:\nnpx skills add cecilapp\/cecil\nClaude Code plugin\nWith Claude Code, you can also install the skills as a plugin, from the Cecil marketplace:\n\/plugin marketplace add Cecilapp\/claude-plugins\n\/plugin install cecil@cecil\nThe plugin fetches only the skills from the Cecil repository and keeps them up to date. They are then also available as \/cecil:cecil and \/cecil:cecil-theme.\nUsage\nOnce installed, ask your agent to create, build, configure or deploy a Cecil site, or to create a theme: it uses the matching skill automatically.\nExamples of prompts:\n\n“Create a Cecil blog with an English and a French version.”\n“Add a projects section with a list of cards on the homepage.”\n“Turn the layouts of this site into a reusable Cecil theme.”\n\nSkills are updated with Cecil: reinstall them after upgrading Cecil to get the latest instructions (the Claude Code plugin is updated automatically).",
      "content_html": "<h1>Agent skills</h1>\n<p>Cecil provides <a href=\"https://agentskills.io\" target=\"_blank\" rel=\"noopener noreferrer\">agent skills</a>: instructions that AI coding agents (Claude Code, GitHub Copilot, Cursor, etc.) load to work with Cecil the right way, following its conventions.</p>\n<table>\n<thead>\n<tr>\n<th>Skill</th>\n<th>Use it to</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><a href=\"https://github.com/Cecilapp/Cecil/blob/main/skills/cecil/SKILL.md\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">cecil</code></a></td>\n<td>Create, configure, build and deploy a site: content, front matter, templates, assets, configuration, etc.</td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/Cecilapp/Cecil/blob/main/skills/cecil-theme/SKILL.md\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">cecil-theme</code></a></td>\n<td>Create, structure and package a theme (visual theme or component theme) for Composer.</td>\n</tr>\n</tbody>\n</table>\n<h2 id=\"install\">Install<a class=\"heading-anchor\" href=\"#install\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Install the skills in your project with <a href=\"https://www.skills.sh\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">npx skills</code></a>, which detects your coding agents and adds the skills where they expect them:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">npx skills add cecilapp/cecil</code></pre>\n<h3 id=\"claude-code-plugin\">Claude Code plugin<a class=\"heading-anchor\" href=\"#claude-code-plugin\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>With <a href=\"https://code.claude.com\" target=\"_blank\" rel=\"noopener noreferrer\">Claude Code</a>, you can also install the skills as a plugin, from the <a href=\"https://github.com/Cecilapp/claude-plugins\" target=\"_blank\" rel=\"noopener noreferrer\">Cecil marketplace</a>:</p>\n<pre data-lang=\"text\"><code class=\"language-text\" translate=\"no\">/plugin marketplace add Cecilapp/claude-plugins\n/plugin install cecil@cecil</code></pre>\n<p>The plugin fetches only the skills from the Cecil repository and keeps them up to date. They are then also available as <code translate=\"no\">/cecil:cecil</code> and <code translate=\"no\">/cecil:cecil-theme</code>.</p>\n<h2 id=\"usage\">Usage<a class=\"heading-anchor\" href=\"#usage\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Once installed, ask your agent to create, build, configure or deploy a Cecil site, or to create a theme: it uses the matching skill automatically.</p>\n<p><em>Examples of prompts:</em></p>\n<ul>\n<li>“Create a Cecil blog with an English and a French version.”</li>\n<li>“Add a <code translate=\"no\">projects</code> section with a list of cards on the homepage.”</li>\n<li>“Turn the layouts of this site into a reusable Cecil theme.”</li>\n</ul>\n<aside class=\"note note-tip\"><p>Skills are updated with Cecil: reinstall them after upgrading Cecil to get the latest instructions (the Claude Code plugin is updated automatically).</p></aside>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/ai/llms/",
      "url": "https://cloudflare.cecil.app/documentation/ai/llms/",
      "title": "Content for LLMs",
      "summary": "Render a llms.txt file and Markdown versions of your pages for language models.",
      "date_published": "2026-10-22T00:00:00+00:00",
      "date_modified": "2026-10-23T00:00:00+00:00","content_text": "Content for LLMs\nLanguage models read Markdown more easily than HTML. Cecil provides two output formats for them:\n\nllms: a llms.txt file, an index of the site;\nmarkdown: a Markdown version of each page.\n\nBoth are disabled by default.\nllms.txt\nSince version 8.114.0, the llms format renders the homepage as a llms.txt file at the root of the site. It contains:\n\nthe site title and description;\nthe links of the main menu (external URLs are ignored);\nthe top-level sections and their pages (sub-sections are nested), with their title and description.\n\nTo enable it, add the format to the homepage:\noutput:\n  pagetypeformats:\n    homepage:\n      llms: true\nWith the metatags template, the HTML homepage references the file with a &lt;link rel=\"describedby\" type=\"text\/markdown\"&gt; tag.\nHTTP headers\nYou can also advertise the file to crawlers and agents with HTTP headers, using the server.headers option:\nserver:\n  headers:\n    - path: \/*\n      headers:\n        # LLMs\n        - key: Link\n          value: '&lt;\/llms.txt&gt;; rel=\"llms-txt\"'\n        - key: X-Llms-Txt\n          value: \/llms.txt\nThese headers are only applied by the local preview server. To deploy them, use the Headers component theme: it generates a _headers file (supported by Netlify, statichost and Cloudflare Pages) including the headers defined in server.headers.\nExclude content\nTo exclude a page or a section (and its pages) from llms.txt, set llms: false in its front matter:\n---\ntitle: \"Legal notice\"\nllms: false\n---\nUnpublished and excluded sections are not listed.\nMarkdown pages\nThe markdown format renders a page as a Markdown file, next to its HTML version (e.g.: blog\/post-1.md for blog\/post-1\/index.html). The file contains the title and the body of the page; a section lists its pages.\nTo render all pages and sections in Markdown:\noutput:\n  pagetypeformats:\n    page:\n      markdown: true\n    section:\n      markdown: true\nOr for a single page, with the output variable:\n---\noutput: [html, markdown]\n---\nWith the metatags template, the HTML page references its Markdown version with a &lt;link rel=\"alternate\" type=\"text\/markdown\"&gt; tag. The links of llms.txt point to the Markdown version of the pages when it exists.\nPrevent indexing\nTo prevent search engines from indexing the Markdown pages (duplicate content of the HTML pages), add a X-Robots-Tag HTTP header with the server.headers option:\nserver:\n  headers:\n    # Markdown outputs\n    - path: \"\/*.md\"\n      headers:\n        - key: X-Robots-Tag\n          value: noindex\nAs for the llms.txt headers, use the Headers component theme to deploy it.\nTemplates\nTo customize these outputs, override the default templates in your layouts directory (see lookup rules):\n\nhome.llms.twig: the llms.txt file;\npage.markdown.twig, list.markdown.twig and home.markdown.twig: the Markdown pages.\n",
      "content_html": "<h1>Content for LLMs</h1>\n<p>Language models read Markdown more easily than HTML. Cecil provides two <a href=\"../configuration/8-output.md#default-formats\">output formats</a> for them:</p>\n<ul>\n<li><code translate=\"no\">llms</code>: a <a href=\"https://llmstxt.org\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">llms.txt</code></a> file, an index of the site;</li>\n<li><code translate=\"no\">markdown</code>: a Markdown version of each page.</li>\n</ul>\n<p>Both are disabled by default.</p>\n<h2 id=\"llms-txt\">llms.txt<a class=\"heading-anchor\" href=\"#llms-txt\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Since version <ins>8.114.0</ins>, the <code translate=\"no\">llms</code> format renders the homepage as a <code translate=\"no\">llms.txt</code> file at the root of the site. It contains:</p>\n<ul>\n<li>the site title and description;</li>\n<li>the links of the main menu (external URLs are ignored);</li>\n<li>the top-level sections and their pages (sub-sections are nested), with their title and description.</li>\n</ul>\n<p>To enable it, add the format to the homepage:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">output:</span>\n  <span class=\"hljs-attr\">pagetypeformats:</span>\n    <span class=\"hljs-attr\">homepage:</span>\n      <span class=\"hljs-attr\">llms:</span> <span class=\"hljs-literal\">true</span></code></pre>\n<p>With the <a href=\"../configuration/1-site.md#metatags\">metatags</a> template, the HTML homepage references the file with a <code translate=\"no\">&lt;link rel=\"describedby\" type=\"text/markdown\"&gt;</code> tag.</p>\n<h3 id=\"http-headers\">HTTP headers<a class=\"heading-anchor\" href=\"#http-headers\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>You can also advertise the file to crawlers and agents with HTTP headers, using the <a href=\"../configuration/10-server.md#serverheaders\"><code translate=\"no\">server.headers</code></a> option:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">server:</span>\n  <span class=\"hljs-attr\">headers:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">/*</span>\n      <span class=\"hljs-attr\">headers:</span>\n        <span class=\"hljs-comment\"># LLMs</span>\n        <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">key:</span> <span class=\"hljs-string\">Link</span>\n          <span class=\"hljs-attr\">value:</span> <span class=\"hljs-string\">'&lt;/llms.txt&gt;; rel=\"llms-txt\"'</span>\n        <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">key:</span> <span class=\"hljs-string\">X-Llms-Txt</span>\n          <span class=\"hljs-attr\">value:</span> <span class=\"hljs-string\">/llms.txt</span></code></pre>\n<p>These headers are only applied by the local preview server. To deploy them, use the <a href=\"https://github.com/Cecilapp/theme-headers\" target=\"_blank\" rel=\"noopener noreferrer\"><em>Headers</em> component theme</a>: it generates a <code translate=\"no\">_headers</code> file (supported by Netlify, statichost and Cloudflare Pages) including the headers defined in <code translate=\"no\">server.headers</code>.</p>\n<h3 id=\"exclude-content\">Exclude content<a class=\"heading-anchor\" href=\"#exclude-content\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>To exclude a page or a section (and its pages) from <code translate=\"no\">llms.txt</code>, set <code translate=\"no\">llms: false</code> in its front matter:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">\"Legal notice\"</span>\n<span class=\"hljs-attr\">llms:</span> <span class=\"hljs-literal\">false</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<p>Unpublished and <a href=\"../content/2-front-matter.md#excluded\">excluded</a> sections are not listed.</p>\n<h2 id=\"markdown-pages\">Markdown pages<a class=\"heading-anchor\" href=\"#markdown-pages\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The <code translate=\"no\">markdown</code> format renders a page as a Markdown file, next to its HTML version (e.g.: <code translate=\"no\">blog/post-1.md</code> for <code translate=\"no\">blog/post-1/index.html</code>). The file contains the title and the body of the page; a section lists its pages.</p>\n<p>To render all pages and sections in Markdown:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">output:</span>\n  <span class=\"hljs-attr\">pagetypeformats:</span>\n    <span class=\"hljs-attr\">page:</span>\n      <span class=\"hljs-attr\">markdown:</span> <span class=\"hljs-literal\">true</span>\n    <span class=\"hljs-attr\">section:</span>\n      <span class=\"hljs-attr\">markdown:</span> <span class=\"hljs-literal\">true</span></code></pre>\n<p>Or for a single page, with the <a href=\"../content/2-front-matter.md#output\"><code translate=\"no\">output</code></a> variable:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">output:</span> <span class=\"hljs-string\">[html,</span> <span class=\"hljs-string\">markdown]</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<p>With the <a href=\"../configuration/1-site.md#metatags\">metatags</a> template, the HTML page references its Markdown version with a <code translate=\"no\">&lt;link rel=\"alternate\" type=\"text/markdown\"&gt;</code> tag. The links of <code translate=\"no\">llms.txt</code> point to the Markdown version of the pages when it exists.</p>\n<h3 id=\"prevent-indexing\">Prevent indexing<a class=\"heading-anchor\" href=\"#prevent-indexing\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>To prevent search engines from indexing the Markdown pages (duplicate content of the HTML pages), add a <code translate=\"no\">X-Robots-Tag</code> HTTP header with the <a href=\"../configuration/10-server.md#serverheaders\"><code translate=\"no\">server.headers</code></a> option:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">server:</span>\n  <span class=\"hljs-attr\">headers:</span>\n    <span class=\"hljs-comment\"># Markdown outputs</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">\"/*.md\"</span>\n      <span class=\"hljs-attr\">headers:</span>\n        <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">key:</span> <span class=\"hljs-string\">X-Robots-Tag</span>\n          <span class=\"hljs-attr\">value:</span> <span class=\"hljs-string\">noindex</span></code></pre>\n<p>As for the <a href=\"#http-headers\"><code translate=\"no\">llms.txt</code> headers</a>, use the <a href=\"https://github.com/Cecilapp/theme-headers\" target=\"_blank\" rel=\"noopener noreferrer\"><em>Headers</em> component theme</a> to deploy it.</p>\n<h2 id=\"templates\">Templates<a class=\"heading-anchor\" href=\"#templates\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>To customize these outputs, override the default templates in your <code translate=\"no\">layouts</code> directory (see <a href=\"../templates/1-lookup-rules.md\">lookup rules</a>):</p>\n<ul>\n<li><code translate=\"no\">home.llms.twig</code>: the <code translate=\"no\">llms.txt</code> file;</li>\n<li><code translate=\"no\">page.markdown.twig</code>, <code translate=\"no\">list.markdown.twig</code> and <code translate=\"no\">home.markdown.twig</code>: the Markdown pages.</li>\n</ul>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/ai/crawlers/",
      "url": "https://cloudflare.cecil.app/documentation/ai/crawlers/",
      "title": "AI crawlers",
      "summary": "Control which AI crawlers can access your site with robots.txt.",
      "date_published": "2026-10-22T00:00:00+00:00",
      "date_modified": "2026-10-22T00:00:00+00:00","content_text": "AI crawlers\nCecil generates a robots.txt file that allows all crawlers. To block AI crawlers (or some of them), add your own rules by creating a page with the robots path:\npages\/robots.md\n---\nlayout: robots\noutput: txt\n---\nUser-agent: GPTBot\nDisallow: \/\n\nUser-agent: ClaudeBot\nDisallow: \/\n\nUser-agent: Google-Extended\nDisallow: \/\nThe body of the page is appended to the default rules (see default pages).\nrobots.txt rules are directives: well-behaved crawlers follow them, but they don’t prevent access to your content.",
      "content_html": "<h1>AI crawlers</h1>\n<p>Cecil generates a <code translate=\"no\">robots.txt</code> file that allows all crawlers. To block AI crawlers (or some of them), add your own rules by creating a page with the <code translate=\"no\">robots</code> path:</p>\n<p><em>pages/robots.md</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">layout:</span> <span class=\"hljs-string\">robots</span>\n<span class=\"hljs-attr\">output:</span> <span class=\"hljs-string\">txt</span>\n<span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">User-agent:</span> <span class=\"hljs-string\">GPTBot</span>\n<span class=\"hljs-attr\">Disallow:</span> <span class=\"hljs-string\">/</span>\n\n<span class=\"hljs-attr\">User-agent:</span> <span class=\"hljs-string\">ClaudeBot</span>\n<span class=\"hljs-attr\">Disallow:</span> <span class=\"hljs-string\">/</span>\n\n<span class=\"hljs-attr\">User-agent:</span> <span class=\"hljs-string\">Google-Extended</span>\n<span class=\"hljs-attr\">Disallow:</span> <span class=\"hljs-string\">/</span></code></pre>\n<p>The body of the page is appended to the default rules (see <a href=\"../configuration/4-pages.md#pages-default\">default pages</a>).</p>\n<aside class=\"note note-info\"><p><code translate=\"no\">robots.txt</code> rules are directives: well-behaved crawlers follow them, but they don’t prevent access to your content.</p></aside>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/getting-started/installation/",
      "url": "https://cloudflare.cecil.app/documentation/getting-started/installation/",
      "title": "Installation",
      "summary": "Requirements, installation methods (PHAR, standalone binary, package managers, Composer), update and troubleshooting.",
      "date_published": "2026-10-05T00:00:00+00:00",
      "date_modified": "2026-12-02T00:00:00+00:00","content_text": "Installation\nCecil is distributed as a single executable file, cecil.phar, which runs anywhere PHP is installed, and as standalone binaries that don't require PHP.\nRequirements\n\nPHP 8.3+ (tested with 8.3, 8.4, 8.5 and 8.6)\nPHP extensions: fileinfo, gd and mbstring\n\nCheck your PHP version and loaded extensions:\nphp -v\nphp -m\nOptional extensions\n\n\n\nExtension\nUsage\n\n\n\n\nintl\nDate localization for locales other than en (otherwise optional, improves performance).\n\n\ncurl\nChecking external links with the doctor:links command.\n\n\nimagick\nImage processing, preferred over GD when available.\n\n\nffi\nImage processing with libvips (requires Composer installation).\n\n\n\nDownload the PHAR\nDownload cecil.phar from your terminal:\ncurl -LO https:\/\/cecil.app\/cecil.phar\nThen run it with PHP:\nphp cecil.phar --version\nYou can also download a specific version or the preview version.\nStandalone binary\nIf PHP is not installed, download the standalone binary for your platform from the latest GitHub release. It embeds PHP and the required extensions.\n\n\n\nPlatform\nFile\n\n\n\n\nLinux x64\ncecil-linux-x64\n\n\nLinux ARM64\ncecil-linux-arm64\n\n\nmacOS Intel\ncecil-macos-x64\n\n\nmacOS Apple Silicon\ncecil-macos-arm64\n\n\nWindows x64\ncecil-windows-x64.exe\n\n\n\nFor example:\n\n  \n    Linux\n    curl -Lo cecil https:\/\/github.com\/Cecilapp\/Cecil\/releases\/latest\/download\/cecil-linux-x64\nchmod +x cecil\n.\/cecil --version\n  \n  \n    macOS\n    curl -Lo cecil https:\/\/github.com\/Cecilapp\/Cecil\/releases\/latest\/download\/cecil-macos-arm64\nchmod +x cecil\nxattr -d com.apple.quarantine cecil\n.\/cecil --version\nBinaries are not signed: the xattr command removes the quarantine attribute before the first run.\n  \n  \n    Windows\n    curl.exe -Lo cecil.exe https:\/\/github.com\/Cecilapp\/Cecil\/releases\/latest\/download\/cecil-windows-x64.exe\n.\\cecil.exe --version\n  \n\nSHA-256 checksums are available in the cecil-binaries.sha256 file of each release, and the build provenance can be verified with gh attestation verify cecil --repo Cecilapp\/Cecil.\nThe binary uses GD for image processing: Imagick and libvips are not available. The self-update command is not available either: download the binary again to update it.\nThe serve command relies on the PHP built-in web server, which the binary doesn't embed: it requires a local PHP executable. Without PHP, run the build command and serve the output directory with another web server.\nInstall globally\nInstalling Cecil globally allows you to run the cecil command from any directory, instead of php cecil.phar.\n\n  \n    Linux\n    By moving the PHAR into a directory of your PATH:\nsudo mv cecil.phar \/usr\/local\/bin\/cecil\nsudo chmod +x \/usr\/local\/bin\/cecil\n  \n  \n    macOS\n    With Homebrew:\nbrew install cecilapp\/tap\/cecil\n  \n  \n    Windows\n    With Scoop:\nscoop install https:\/\/cecil.app\/scoop\/cecil.json\nOr manually:\n\nMove cecil.phar to a dedicated directory, such as C:\\bin\nRename it from cecil.phar to cecil\nAppend ;C:\\bin to your PATH environment variable\nCreate a wrapping batch script next to it\n\n  \n  \n    PHIVE\n    With PHIVE (The PHAR Installation and Verification Environment):\nphive install cecil\n  \n  \n    Composer\n    With Composer:\ncomposer global require cecil\/cecil\nMake sure Composer's global binaries directory is in your PATH. Run composer global config bin-dir --absolute to get it.\nTo use Cecil as a dependency of a PHP project, see Library.\n  \n\nVerify the installation\ncecil --version\nOr, if Cecil is not installed globally:\nphp cecil.phar --version\nRun cecil list to display the available commands.\nUpdate\nUpdate Cecil to the latest version according to your installation method:\n\n  \n    PHAR\n    php cecil.phar self-update\n  \n  \n    Homebrew\n    brew upgrade cecilapp\/tap\/cecil\n  \n  \n    Scoop\n    scoop update cecil\n  \n  \n    PHIVE\n    phive update cecil\n  \n  \n    Composer\n    composer global update cecil\/cecil\n  \n\nThe standalone binary is updated by downloading it again.\nThe self-update command (alias selfupdate, PHAR only) also accepts the following options:\n\n--rollback: reverts to the previously installed version\n--stable: forces an update to the latest stable version\n--preview: forces an update to the latest unstable version\n\nThe changelog of each release is available on GitHub.\nTroubleshooting\ncommand not found: cecil\nThe installation directory is not in your PATH: add it, or run Cecil with php cecil.phar from the directory containing the PHAR.\nPHP version or extension error\nYour PHP CLI may differ from the one you expect (several versions installed): check it with php -v and php --ini, then enable missing extensions in the loaded php.ini file.\nDiagnose a website\nOnce a website is created, run the doctor command to diagnose its configuration.",
      "content_html": "<h1>Installation</h1>\n<p>Cecil is distributed as a single executable file, <code translate=\"no\">cecil.phar</code>, which runs anywhere PHP is installed, and as <a href=\"#standalone-binary\">standalone binaries</a> that don't require PHP.</p>\n<h2 id=\"requirements\">Requirements<a class=\"heading-anchor\" href=\"#requirements\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<ul>\n<li><a href=\"https://www.php.net/manual/install.php\" target=\"_blank\" rel=\"noopener noreferrer\">PHP</a> 8.3+ (tested with 8.3, 8.4, 8.5 and 8.6)</li>\n<li>PHP extensions: <code translate=\"no\">fileinfo</code>, <code translate=\"no\">gd</code> and <code translate=\"no\">mbstring</code></li>\n</ul>\n<p>Check your PHP version and loaded extensions:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php -v\nphp -m</code></pre>\n<h3 id=\"optional-extensions\">Optional extensions<a class=\"heading-anchor\" href=\"#optional-extensions\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<table>\n<thead>\n<tr>\n<th>Extension</th>\n<th>Usage</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><a href=\"https://www.php.net/manual/book.intl.php\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">intl</code></a></td>\n<td>Date <a href=\"../templates/5-localization.md\">localization</a> for locales other than <code translate=\"no\">en</code> (otherwise optional, improves performance).</td>\n</tr>\n<tr>\n<td><a href=\"https://www.php.net/manual/book.curl.php\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">curl</code></a></td>\n<td>Checking external links with the <a href=\"../commands/5-doctor.md\"><code translate=\"no\">doctor:links</code></a> command.</td>\n</tr>\n<tr>\n<td><a href=\"https://www.php.net/manual/book.imagick.php\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">imagick</code></a></td>\n<td>Image processing, preferred over GD when available.</td>\n</tr>\n<tr>\n<td><a href=\"https://www.php.net/manual/book.ffi.php\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">ffi</code></a></td>\n<td>Image processing with <a href=\"https://www.libvips.org/\" target=\"_blank\" rel=\"noopener noreferrer\">libvips</a> (requires <a href=\"#composer\">Composer installation</a>).</td>\n</tr>\n</tbody>\n</table>\n<h2 id=\"download-the-phar\">Download the PHAR<a class=\"heading-anchor\" href=\"#download-the-phar\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Download <code translate=\"no\">cecil.phar</code> from your terminal:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">curl -LO https://cecil.app/cecil.phar</code></pre>\n<p>Then run it with PHP:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar --version</code></pre>\n<aside class=\"note note-info\"><p>You can also download a <a href=\"https://cloudflare.cecil.app/download/\">specific version or the preview version</a>.</p></aside>\n<h2 id=\"standalone-binary\">Standalone binary<a class=\"heading-anchor\" href=\"#standalone-binary\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>If PHP is not installed, download the standalone binary for your platform from the <a href=\"https://github.com/Cecilapp/Cecil/releases/latest\" target=\"_blank\" rel=\"noopener noreferrer\">latest GitHub release</a>. It embeds PHP and the required extensions.</p>\n<table>\n<thead>\n<tr>\n<th>Platform</th>\n<th>File</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Linux x64</td>\n<td><code translate=\"no\">cecil-linux-x64</code></td>\n</tr>\n<tr>\n<td>Linux ARM64</td>\n<td><code translate=\"no\">cecil-linux-arm64</code></td>\n</tr>\n<tr>\n<td>macOS Intel</td>\n<td><code translate=\"no\">cecil-macos-x64</code></td>\n</tr>\n<tr>\n<td>macOS Apple Silicon</td>\n<td><code translate=\"no\">cecil-macos-arm64</code></td>\n</tr>\n<tr>\n<td>Windows x64</td>\n<td><code translate=\"no\">cecil-windows-x64.exe</code></td>\n</tr>\n</tbody>\n</table>\n<p>For example:</p>\n<div class=\"note note-tabs\" id=\"note-tabs-1\">\n  <section class=\"note-tab\" id=\"note-tabs-1-1\">\n    <h4 id=\"linux\">Linux</h4>\n    <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">curl -Lo cecil https://github.com/Cecilapp/Cecil/releases/latest/download/cecil-linux-x64\nchmod +x cecil\n./cecil --version</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-tabs-1-2\">\n    <h4 id=\"macos\">macOS</h4>\n    <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">curl -Lo cecil https://github.com/Cecilapp/Cecil/releases/latest/download/cecil-macos-arm64\nchmod +x cecil\nxattr -d com.apple.quarantine cecil\n./cecil --version</code></pre>\n<p>Binaries are not signed: the <code translate=\"no\">xattr</code> command removes the quarantine attribute before the first run.</p>\n  </section>\n  <section class=\"note-tab\" id=\"note-tabs-1-3\">\n    <h4 id=\"windows\">Windows</h4>\n    <pre data-lang=\"powershell\"><code class=\"language-powershell hljs powershell\" translate=\"no\">curl.exe <span class=\"hljs-literal\">-Lo</span> cecil.exe https://github.com/Cecilapp/Cecil/releases/latest/download/cecil<span class=\"hljs-literal\">-windows</span><span class=\"hljs-literal\">-x64</span>.exe\n.\\cecil.exe -<span class=\"hljs-literal\">-version</span></code></pre>\n  </section>\n</div>\n<aside class=\"note note-info\"><p>SHA-256 checksums are available in the <code translate=\"no\">cecil-binaries.sha256</code> file of each release, and the build provenance can be verified with <code translate=\"no\">gh attestation verify cecil --repo Cecilapp/Cecil</code>.</p></aside>\n<aside class=\"note note-important\"><p>The binary uses GD for image processing: Imagick and libvips are not available. The <code translate=\"no\">self-update</code> command is not available either: download the binary again to update it.</p>\n<p>The <code translate=\"no\">serve</code> command relies on the PHP built-in web server, which the binary doesn't embed: it requires a local PHP executable. Without PHP, run the <code translate=\"no\">build</code> command and serve the output directory with another web server.</p></aside>\n<h2 id=\"install-globally\">Install globally<a class=\"heading-anchor\" href=\"#install-globally\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Installing Cecil globally allows you to run the <code translate=\"no\">cecil</code> command from any directory, instead of <code translate=\"no\">php cecil.phar</code>.</p>\n<div class=\"note note-tabs\" id=\"note-tabs-2\">\n  <section class=\"note-tab\" id=\"note-tabs-2-1\">\n    <h4 id=\"linux-1\">Linux</h4>\n    <p>By moving the PHAR into a directory of your <code translate=\"no\">PATH</code>:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">sudo mv cecil.phar /usr/<span class=\"hljs-built_in\">local</span>/bin/cecil\nsudo chmod +x /usr/<span class=\"hljs-built_in\">local</span>/bin/cecil</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-tabs-2-2\">\n    <h4 id=\"macos-1\">macOS</h4>\n    <p>With <a href=\"https://brew.sh\" target=\"_blank\" rel=\"noopener noreferrer\">Homebrew</a>:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">brew install cecilapp/tap/cecil</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-tabs-2-3\">\n    <h4 id=\"windows-1\">Windows</h4>\n    <p>With <a href=\"https://scoop.sh\" target=\"_blank\" rel=\"noopener noreferrer\">Scoop</a>:</p>\n<pre data-lang=\"powershell\"><code class=\"language-powershell hljs powershell\" translate=\"no\">scoop install https://cecil.app/scoop/cecil.json</code></pre>\n<p>Or manually:</p>\n<ol>\n<li>Move <code translate=\"no\">cecil.phar</code> to a dedicated directory, such as <code translate=\"no\">C:\\bin</code></li>\n<li>Rename it from <code translate=\"no\">cecil.phar</code> to <code translate=\"no\">cecil</code></li>\n<li>Append <code translate=\"no\">;C:\\bin</code> to your <code translate=\"no\">PATH</code> environment variable</li>\n<li>Create a <a href=\"https://raw.githubusercontent.com/Cecilapp/Cecil/main/bin/cecil.bat\" target=\"_blank\" rel=\"noopener noreferrer\">wrapping batch script</a> next to it</li>\n</ol>\n  </section>\n  <section class=\"note-tab\" id=\"note-tabs-2-4\">\n    <h4 id=\"phive\">PHIVE</h4>\n    <p>With <a href=\"https://phar.io\" target=\"_blank\" rel=\"noopener noreferrer\">PHIVE</a> (The PHAR Installation and Verification Environment):</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">phive install cecil</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-tabs-2-5\">\n    <h4 id=\"composer\">Composer</h4>\n    <p>With <a href=\"https://getcomposer.org\" target=\"_blank\" rel=\"noopener noreferrer\">Composer</a>:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">composer global require cecil/cecil</code></pre>\n<aside class=\"note note-important\"><p>Make sure Composer's global binaries directory is in your <code translate=\"no\">PATH</code>. Run <code translate=\"no\">composer global config bin-dir --absolute</code> to get it.</p></aside>\n<aside class=\"note note-tip\"><p>To use Cecil as a dependency of a PHP project, see <a href=\"../developers/2-library.md\">Library</a>.</p></aside>\n  </section>\n</div>\n<h2 id=\"verify-the-installation\">Verify the installation<a class=\"heading-anchor\" href=\"#verify-the-installation\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">cecil --version</code></pre>\n<p>Or, if Cecil is not installed globally:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar --version</code></pre>\n<aside class=\"note note-info\"><p>Run <code translate=\"no\">cecil list</code> to display the <a href=\"../commands/index.md\">available commands</a>.</p></aside>\n<h2 id=\"update\">Update<a class=\"heading-anchor\" href=\"#update\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Update Cecil to the latest version according to your installation method:</p>\n<div class=\"note note-code-group\" id=\"note-code-group-3\">\n  <section class=\"note-tab\" id=\"note-code-group-3-1\">\n    <h4 id=\"phar\">PHAR</h4>\n    <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar self-update</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-code-group-3-2\">\n    <h4 id=\"homebrew\">Homebrew</h4>\n    <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">brew upgrade cecilapp/tap/cecil</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-code-group-3-3\">\n    <h4 id=\"scoop\">Scoop</h4>\n    <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">scoop update cecil</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-code-group-3-4\">\n    <h4 id=\"phive-1\">PHIVE</h4>\n    <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">phive update cecil</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-code-group-3-5\">\n    <h4 id=\"composer\">Composer</h4>\n    <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">composer global update cecil/cecil</code></pre>\n  </section>\n</div>\n<p>The <a href=\"#standalone-binary\">standalone binary</a> is updated by downloading it again.</p>\n<p>The <code translate=\"no\">self-update</code> command (alias <code translate=\"no\">selfupdate</code>, PHAR only) also accepts the following options:</p>\n<ul>\n<li><code translate=\"no\">--rollback</code>: reverts to the previously installed version</li>\n<li><code translate=\"no\">--stable</code>: forces an update to the latest stable version</li>\n<li><code translate=\"no\">--preview</code>: forces an update to the latest unstable version</li>\n</ul>\n<aside class=\"note note-info\"><p>The changelog of each release is available on <a href=\"https://github.com/Cecilapp/Cecil/releases\" target=\"_blank\" rel=\"noopener noreferrer\">GitHub</a>.</p></aside>\n<h2 id=\"troubleshooting\">Troubleshooting<a class=\"heading-anchor\" href=\"#troubleshooting\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<h3 id=\"command-not-found-cecil\"><code translate=\"no\">command not found: cecil</code><a class=\"heading-anchor\" href=\"#command-not-found-cecil\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>The installation directory is not in your <code translate=\"no\">PATH</code>: add it, or run Cecil with <code translate=\"no\">php cecil.phar</code> from the directory containing the PHAR.</p>\n<h3 id=\"php-version-or-extension-error\">PHP version or extension error<a class=\"heading-anchor\" href=\"#php-version-or-extension-error\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Your PHP CLI may differ from the one you expect (several versions installed): check it with <code translate=\"no\">php -v</code> and <code translate=\"no\">php --ini</code>, then enable missing extensions in the loaded <code translate=\"no\">php.ini</code> file.</p>\n<h3 id=\"diagnose-a-website\">Diagnose a website<a class=\"heading-anchor\" href=\"#diagnose-a-website\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Once a website is created, run the <a href=\"../commands/5-doctor.md\"><code translate=\"no\">doctor</code></a> command to diagnose its configuration.</p>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/developers/architecture/",
      "url": "https://cloudflare.cecil.app/documentation/developers/architecture/",
      "title": "Architecture",
      "summary": "Diagrams of the build pipeline and of the technical architecture, and key components.",
      "date_published": "2026-05-27T00:00:00+00:00",
      "date_modified": "2026-10-26T00:00:00+00:00","content_text": "Architecture\nThis page gives an overview of Cecil’s build pipeline, its technical architecture and its key components.\nBuild pipeline\nPipeline overview\ngraph LR\n    SRC[\"Sources\\n(pages, data, assets,\\nstatic, layouts, themes)\"]\n    CFG[\"Configuration\"]\n    EXTS[\"Extensions\\n(plugins, events)\"]\n    BUILDER[\"Builder\"]\n    LOAD[\"Load\\n(pages, data,\\nstatic files)\"]\n    CONVERT[\"Create &amp; convert\\n(pages, taxonomies)\"]\n    GENERATE[\"Generate\\n(generators, menus)\"]\n    RENDER[\"Render\\n(Twig)\"]\n    SAVE[\"Save &amp; optimize\\n(pages, assets,\\nstatic files)\"]\n    OUT[\"_site\/\"]\n\n    CFG --&gt; BUILDER\n    EXTS --&gt; BUILDER\n    SRC --&gt; LOAD\n    BUILDER --&gt; LOAD --&gt; CONVERT --&gt; GENERATE --&gt; RENDER --&gt; SAVE --&gt; OUT\nDetailed pipeline\ngraph TD\n    %% Entry\n    CLI[\"bin\/cecil\\n(CLI entry point)\"]\n    APP[\"Application\\n(Symfony Console)\"]\n    CMD[\"Commands\\nbuild \/ serve \/ doctor\\nnew:* \/ clear \/ cache:clear\\nshow:* \/ util:* \/ ...\"]\n\n    CLI --&gt; APP --&gt; CMD\n\n    %% Orchestrator\n    BUILDER[\"Builder\\n(Orchestrator)\"]\n    CONFIG[\"Configuration\\n(plugins &lt; default.php\\n&lt; themes &lt; cecil.yml\\n&lt; env vars + CLI options)\"]\n    CMD --&gt; BUILDER\n    CONFIG --&gt; BUILDER\n\n    %% Extensions\n    EXTN[\"Extensions\\n(Autoloader + Loader:\\nplugins, event subscribers,\\ngenerators, Twig extensions,\\npost-processors)\"]\n    EVENTS[\"Build events\\n(build.*, step.*, page.*)\"]\n    BUILDER --&gt; EXTN\n    EXTN -- \"plugins config\" --&gt; CONFIG\n    BUILDER -. \"dispatch\" .-&gt; EVENTS\n    EVENTS -. \"notify subscribers\" .-&gt; EXTN\n\n    %% Pipeline\n    subgraph PIPELINE[\"Build pipeline (steps)\"]\n        S1[\"1. Pages\/Load\\n(Finder → Markdown files)\"]\n        S2[\"2. Data\/Load\\n(data files)\"]\n        S3[\"3. StaticFiles\/Load\\n(if static.load is enabled)\"]\n        S4[\"4. Pages\/Create\\n(create Page objects)\"]\n        S5[\"5. Pages\/Convert\\n(front matter +\\nMarkdown → HTML)\"]\n        S6[\"6. Taxonomies\/Create\\n(create taxonomies)\"]\n        S7[\"7. Pages\/Generate\\n(generators)\"]\n        S8[\"8. Menus\/Create\\n(create menus)\"]\n        S9[\"9. StaticFiles\/Copy\\n(copy static files)\"]\n        S10[\"10. Pages\/Render\\n(Twig rendering)\"]\n        S11[\"11. Pages\/Save\\n(save pages)\"]\n        S12[\"12. Assets\/Save\\n(save assets)\"]\n        S13[\"13-16. Optimize\/Html, Css, Js, Images\\n(if optimization is enabled)\"]\n\n        S1 --&gt; S2 --&gt; S3 --&gt; S4 --&gt; S5 --&gt; S6 --&gt; S7 --&gt; S8 --&gt; S9 --&gt; S10 --&gt; S11 --&gt; S12 --&gt; S13\n    end\n\n    BUILDER --&gt; PIPELINE\n\n    %% Subsystems\n    CONV[\"Converter\\n(pages.converter, pages.body.parser:\\nParsedown + highlighter)\"]\n\n    subgraph COLLECTIONS[\"Collections\"]\n        PC[\"PagesCollection\\n(Page objects)\"]\n        TC[\"TaxonomiesCollection\\n(vocabularies\/terms)\"]\n        MC[\"MenusCollection\"]\n    end\n\n    subgraph GENERATORS[\"Generators (by priority)\"]\n        G1[\"DefaultPages\\n(index, 404, robots, sitemap, xsl)\"]\n        G3[\"ExternalBody\"]\n        G4[\"Section\"]\n        G5[\"Taxonomy\"]\n        G6[\"Homepage\"]\n        G7[\"Pagination\"]\n        G8[\"Alias\"]\n        G9[\"Redirect\"]\n        G10[\"Custom generators\\n(priority 100 by default)\"]\n        G1 --&gt; G3 --&gt; G4 --&gt; G5 --&gt; G6 --&gt; G7 --&gt; G8 --&gt; G9 --&gt; G10\n    end\n\n    subgraph RENDERER[\"Twig rendering\"]\n        TW[\"Twig engine\"]\n        EXT[\"Twig extensions\\n(Core, Content, Collection,\\nTranslation, Intl, Components\\n+ custom)\"]\n        PP[\"PostProcessors\\n(generator meta tag, excerpts, links\\n+ custom)\"]\n        TH[\"Themes \/ Layouts\"]\n        TW --&gt; EXT\n        TW --&gt; PP\n        TH --&gt; TW\n    end\n\n    subgraph ASSETS[\"Assets\"]\n        AL[\"Asset locator\"]\n        AC[\"Compiler\\n(SCSS → CSS)\"]\n        AI[\"Image processor\\n(resize, responsive, WebP, AVIF)\"]\n        AO[\"Optimizer\\n(CSS\/JS minification,\\nimage optimization)\"]\n    end\n\n    CACHE[\".cache\/\\n(assets, templates, translations)\"]\n\n    subgraph OUTPUT[\"Output (_site\/)\"]\n        HTML[\"pages (HTML, XML, JSON, etc.)\"]\n        CSS2[\"CSS\/JS assets\"]\n        IMG[\"images\"]\n        SF[\"static files\"]\n    end\n\n    S5 --&gt; CONV\n    S4 --&gt; PC\n    S6 --&gt; TC\n    S8 --&gt; MC\n    S7 --&gt; GENERATORS\n    GENERATORS --&gt; PC\n    S10 --&gt; RENDERER\n    EXTN --&gt; GENERATORS\n    EXTN --&gt; EXT\n    EXTN --&gt; PP\n    PIPELINE -. \"step.*, page.*\" .-&gt; EVENTS\n\n    PC --&gt; RENDERER\n    TC --&gt; RENDERER\n    MC --&gt; RENDERER\n    S2 -- \"site.data\" --&gt; RENDERER\n    S3 -- \"site.static\" --&gt; RENDERER\n\n    %% assets are created by the converter (Markdown images, links) and by templates (asset() function),\n    %% processed and stored in cache, then copied to the output\n    CONV --&gt; ASSETS\n    EXT --&gt; ASSETS\n    ASSETS --&gt; CACHE\n    CACHE --&gt; S12\n\n    RENDERER --&gt; S11\n    S11 --&gt; HTML\n    S12 --&gt; CSS2\n    S12 --&gt; IMG\n    S9 --&gt; SF\n    S13 -. \"optimize files in place\" .-&gt; OUTPUT\n\n    %% Inputs\n    subgraph INPUT[\"Sources\"]\n        MD[\"pages\/\\n(Markdown + front matter)\"]\n        DATA[\"data\/\\n(YAML, JSON, XML, CSV)\"]\n        STATIC[\"static\/\"]\n        ASSETSDIR[\"assets\/\"]\n        LAYOUTS[\"layouts\/\\n(Twig templates)\"]\n        TRANS[\"translations\/\"]\n        THEMES[\"themes\/\\n(config, layouts, assets,\\nstatic, data, translations,\\nextensions)\"]\n        EXTDIR[\"extensions\/\\n(PHP classes)\"]\n    end\n\n    MD --&gt; S1\n    DATA --&gt; S2\n    STATIC --&gt; S3\n    STATIC --&gt; S9\n    ASSETSDIR --&gt; AL\n    LAYOUTS --&gt; TH\n    TRANS --&gt; EXT\n    THEMES --&gt; CONFIG\n    THEMES --&gt; TH\n    THEMES --&gt; EXTN\n    EXTDIR --&gt; EXTN\nTechnical architecture\nThe diagrams below show how the code is organized in layers, from the command line to the file system, and which libraries each component relies on.\nArchitecture overview\ngraph TB\n    ENTRY[\"Entry points\\n(bin\/cecil, cecil.phar)\"]\n    CONSOLE[\"Console\\n(commands)\"]\n    DEV[\"Local server\\n(serve, live reload)\"]\n    CORE[\"Core\\n(Builder, Config, Steps,\\nCollections, Generators)\"]\n    EXTS[\"Extensions\\n(plugins, events)\"]\n    SERVICES[\"Services\\n(Converter, Renderer,\\nAssets, Cache, Doctor)\"]\n    LIBS[\"Libraries\\n(Symfony, Twig, Parsedown,\\nscssphp, Intervention Image, ...)\"]\n    FS[\"File system\\n(sources, .cache\/, _site\/)\"]\n\n    ENTRY --&gt; CONSOLE --&gt; CORE\n    CONSOLE --&gt; DEV --&gt; CORE\n    CORE &lt;--&gt; EXTS\n    CORE --&gt; SERVICES\n    CORE --&gt; FS\n    SERVICES --&gt; FS\n    SERVICES --&gt; LIBS\nDetailed architecture\ngraph TB\n    %% Distribution and entry points\n    subgraph ENTRY[\"Entry points\"]\n        BIN[\"bin\/cecil\\n(Composer)\"]\n        PHAR[\"cecil.phar\\n(Box, self-update)\"]\n    end\n\n    subgraph CONSOLE[\"Console layer (Symfony Console)\"]\n        APP[\"Application\"]\n        ENV[\".env\\n(phpdotenv)\"]\n        BUILD[\"build\"]\n        SERVE[\"serve\"]\n        DOCTOR[\"doctor:*\"]\n        OTHERS[\"new:* \/ show:* \/ clear \/ cache:clear \/ util:*\"]\n        APP --&gt; BUILD\n        APP --&gt; SERVE\n        APP --&gt; DOCTOR\n        APP --&gt; OTHERS\n        ENV --&gt; APP\n    end\n\n    BIN --&gt; APP\n    PHAR --&gt; APP\n\n    subgraph DEV[\"Local server (serve)\"]\n        PHPS[\"PHP built-in server\\n(.cecil\/router.php)\"]\n        WATCH[\"FileWatcher\\n(changes.flag)\"]\n        PROC[\"Build sub-process\\n(Symfony Process)\"]\n        LR[\"livereload.js\\n(Server-Sent Events)\"]\n        WATCH -- \"rebuild\" --&gt; PROC\n        WATCH -- \"notify\" --&gt; PHPS\n        PHPS --&gt; LR\n    end\n\n    SERVE --&gt; DEV\n\n    subgraph CORE[\"Core\"]\n        BUILDER[\"Builder\\n(steps orchestration, metrics)\"]\n        CFG[\"Config\\n(Merger, Deprecations,\\nnette\/schema)\"]\n        LOG[\"Logger\\n(PSR-3: Console, Progress, Print)\"]\n        STEPS[\"Steps\\n(StepInterface)\"]\n        COLL[\"Collections\\n(Page, Taxonomy, Menu)\"]\n        GEN[\"Generators\\n(GeneratorManager)\"]\n        BUILDER --&gt; CFG\n        BUILDER --&gt; LOG\n        BUILDER --&gt; STEPS\n        STEPS --&gt; COLL\n        STEPS --&gt; GEN\n    end\n\n    BUILD --&gt; BUILDER\n    PROC --&gt; BUILDER\n    OTHERS --&gt; BUILDER\n\n    subgraph EXTS[\"Extensions\"]\n        AUTO[\"Autoloader\\n(extensions\/, PSR-4,\\nextensions\/vendor\/)\"]\n        LOADER[\"Loader\\n(by name and priority,\\nextensions.strict)\"]\n        PLUG[\"Plugins\\n(Registry)\"]\n        EVT[\"Event dispatcher\\n(BuildEvents, subscribers)\"]\n        PLUG --&gt; LOADER\n    end\n\n    BUILDER --&gt; AUTO\n    BUILDER --&gt; PLUG\n    PLUG -- \"default config\" --&gt; CFG\n    BUILDER -- \"dispatch\" --&gt; EVT\n    STEPS -- \"dispatch\" --&gt; EVT\n    LOADER --&gt; GEN\n\n    subgraph SERVICES[\"Services\"]\n        CONV[\"Converter\\n(ConverterInterface, Parsedown Extra + TOC,\\nhighlight.php \/ Tempest)\"]\n        REND[\"Renderer\\n(Twig, Symfony Translation,\\nTwig Components)\"]\n        ASSET[\"Asset\\n(Locator, Compiler, Image, Optimizer)\"]\n        CACHE[\"Cache\\n(PSR-16, files)\"]\n        DOC[\"Doctor\\n(Site, Frontmatter, Links, SEO)\"]\n    end\n\n    STEPS --&gt; CONV\n    STEPS --&gt; REND\n    STEPS --&gt; ASSET\n    REND --&gt; ASSET\n    CONV --&gt; ASSET\n    ASSET --&gt; CACHE\n    REND --&gt; CACHE\n    DOCTOR --&gt; DOC\n    DOC --&gt; BUILDER\n    LOADER --&gt; REND\n\n    subgraph LIBS[\"Main libraries\"]\n        L1[\"Symfony\\n(Finder, Filesystem, Yaml, Serializer,\\nValidator, DomCrawler, EventDispatcher)\"]\n        L2[\"scssphp\"]\n        L3[\"Intervention Image\\n(GD, Imagick, libvips)\"]\n        L4[\"matthiasmullie\/minify\\nvoku\/html-min\"]\n        L5[\"spatie\/image-optimizer\\n(external binaries)\"]\n        L6[\"yosymfony\/toml\"]\n        L7[\"getID3, mp3info\\n(audio\/video metadata)\"]\n    end\n\n    CORE --&gt; L1\n    ASSET --&gt; L2\n    ASSET --&gt; L3\n    ASSET --&gt; L4\n    STEPS --&gt; L4\n    ASSET --&gt; L5\n    CONV --&gt; L6\n    ASSET --&gt; L7\n\n    subgraph FS[\"File system\"]\n        SRC[\"Sources\\n(pages\/, data\/, assets\/, static\/,\\nlayouts\/, translations\/, themes\/,\\nextensions\/)\"]\n        CACHEDIR[\".cache\/\"]\n        TMP[\".cecil\/\\n(router, live reload, metrics, logs)\"]\n        OUT[\"_site\/\"]\n    end\n\n    STEPS -- \"read\" --&gt; SRC\n    AUTO -- \"read\" --&gt; SRC\n    CACHE --&gt; CACHEDIR\n    STEPS -- \"write\" --&gt; OUT\n    PHPS -- \"serve\" --&gt; OUT\n    DEV --&gt; TMP\nKey components\n\n\n\nComponent\nRole\n\n\n\n\nBuilder\nCentral orchestrator that executes steps in sequence\n\n\nConfig\nMerges plugins, default, themes and project configuration (Config\\Merger), environment variables (CECIL_*) and CLI options, and reports deprecated options (Config\\Deprecations)\n\n\nSteps\nModular pipeline (16 steps), each with init() \/ canProcess() \/ process()\n\n\nCollections\nPages, Taxonomies, Menus: core data structures\n\n\nConverter\nParses the front matter (YAML, INI, TOML or JSON) and converts Markdown to HTML (Parsedown, code highlighting); replaceable with pages.converter and pages.body.parser\n\n\nGenerators\nCreate or update pages (default pages, sections, taxonomies, pagination, aliases, redirects, etc.)\n\n\nExtensions\nGenerators, Twig extensions, post-processors, event subscribers and plugins declared by name, loaded and validated by Extension\\Loader, autoloaded by Extension\\Autoloader\n\n\nEvents\nBuild events (Event\\BuildEvents) dispatched around the build, each step and each page lifecycle, to extend Cecil\n\n\nRenderer (Twig)\nApplies templates + extensions + post-processors\n\n\nAssets\nCreated from Markdown content and templates: compiles SCSS, minifies, resizes and converts images, fingerprints files\n\n\nCache\nStores processed assets, compiled templates and translations in .cache\/ to speed up subsequent builds\n\n\nDoctor\nDiagnoses the project: front matter, links, SEO, cache (doctor commands)\n\n\n",
      "content_html": "<h1>Architecture</h1>\n<p>This page gives an overview of Cecil’s build pipeline, its technical architecture and its key components.</p>\n<h2 id=\"build-pipeline\">Build pipeline<a class=\"heading-anchor\" href=\"#build-pipeline\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<h3 id=\"pipeline-overview\">Pipeline overview<a class=\"heading-anchor\" href=\"#pipeline-overview\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<pre data-lang=\"mermaid\"><code class=\"language-mermaid\" translate=\"no\">graph LR\n    SRC[\"Sources\\n(pages, data, assets,\\nstatic, layouts, themes)\"]\n    CFG[\"Configuration\"]\n    EXTS[\"Extensions\\n(plugins, events)\"]\n    BUILDER[\"Builder\"]\n    LOAD[\"Load\\n(pages, data,\\nstatic files)\"]\n    CONVERT[\"Create &amp; convert\\n(pages, taxonomies)\"]\n    GENERATE[\"Generate\\n(generators, menus)\"]\n    RENDER[\"Render\\n(Twig)\"]\n    SAVE[\"Save &amp; optimize\\n(pages, assets,\\nstatic files)\"]\n    OUT[\"_site/\"]\n\n    CFG --&gt; BUILDER\n    EXTS --&gt; BUILDER\n    SRC --&gt; LOAD\n    BUILDER --&gt; LOAD --&gt; CONVERT --&gt; GENERATE --&gt; RENDER --&gt; SAVE --&gt; OUT</code></pre>\n<h3 id=\"detailed-pipeline\">Detailed pipeline<a class=\"heading-anchor\" href=\"#detailed-pipeline\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<pre data-lang=\"mermaid\"><code class=\"language-mermaid\" translate=\"no\">graph TD\n    %% Entry\n    CLI[\"bin/cecil\\n(CLI entry point)\"]\n    APP[\"Application\\n(Symfony Console)\"]\n    CMD[\"Commands\\nbuild / serve / doctor\\nnew:* / clear / cache:clear\\nshow:* / util:* / ...\"]\n\n    CLI --&gt; APP --&gt; CMD\n\n    %% Orchestrator\n    BUILDER[\"Builder\\n(Orchestrator)\"]\n    CONFIG[\"Configuration\\n(plugins &lt; default.php\\n&lt; themes &lt; cecil.yml\\n&lt; env vars + CLI options)\"]\n    CMD --&gt; BUILDER\n    CONFIG --&gt; BUILDER\n\n    %% Extensions\n    EXTN[\"Extensions\\n(Autoloader + Loader:\\nplugins, event subscribers,\\ngenerators, Twig extensions,\\npost-processors)\"]\n    EVENTS[\"Build events\\n(build.*, step.*, page.*)\"]\n    BUILDER --&gt; EXTN\n    EXTN -- \"plugins config\" --&gt; CONFIG\n    BUILDER -. \"dispatch\" .-&gt; EVENTS\n    EVENTS -. \"notify subscribers\" .-&gt; EXTN\n\n    %% Pipeline\n    subgraph PIPELINE[\"Build pipeline (steps)\"]\n        S1[\"1. Pages/Load\\n(Finder → Markdown files)\"]\n        S2[\"2. Data/Load\\n(data files)\"]\n        S3[\"3. StaticFiles/Load\\n(if static.load is enabled)\"]\n        S4[\"4. Pages/Create\\n(create Page objects)\"]\n        S5[\"5. Pages/Convert\\n(front matter +\\nMarkdown → HTML)\"]\n        S6[\"6. Taxonomies/Create\\n(create taxonomies)\"]\n        S7[\"7. Pages/Generate\\n(generators)\"]\n        S8[\"8. Menus/Create\\n(create menus)\"]\n        S9[\"9. StaticFiles/Copy\\n(copy static files)\"]\n        S10[\"10. Pages/Render\\n(Twig rendering)\"]\n        S11[\"11. Pages/Save\\n(save pages)\"]\n        S12[\"12. Assets/Save\\n(save assets)\"]\n        S13[\"13-16. Optimize/Html, Css, Js, Images\\n(if optimization is enabled)\"]\n\n        S1 --&gt; S2 --&gt; S3 --&gt; S4 --&gt; S5 --&gt; S6 --&gt; S7 --&gt; S8 --&gt; S9 --&gt; S10 --&gt; S11 --&gt; S12 --&gt; S13\n    end\n\n    BUILDER --&gt; PIPELINE\n\n    %% Subsystems\n    CONV[\"Converter\\n(pages.converter, pages.body.parser:\\nParsedown + highlighter)\"]\n\n    subgraph COLLECTIONS[\"Collections\"]\n        PC[\"PagesCollection\\n(Page objects)\"]\n        TC[\"TaxonomiesCollection\\n(vocabularies/terms)\"]\n        MC[\"MenusCollection\"]\n    end\n\n    subgraph GENERATORS[\"Generators (by priority)\"]\n        G1[\"DefaultPages\\n(index, 404, robots, sitemap, xsl)\"]\n        G3[\"ExternalBody\"]\n        G4[\"Section\"]\n        G5[\"Taxonomy\"]\n        G6[\"Homepage\"]\n        G7[\"Pagination\"]\n        G8[\"Alias\"]\n        G9[\"Redirect\"]\n        G10[\"Custom generators\\n(priority 100 by default)\"]\n        G1 --&gt; G3 --&gt; G4 --&gt; G5 --&gt; G6 --&gt; G7 --&gt; G8 --&gt; G9 --&gt; G10\n    end\n\n    subgraph RENDERER[\"Twig rendering\"]\n        TW[\"Twig engine\"]\n        EXT[\"Twig extensions\\n(Core, Content, Collection,\\nTranslation, Intl, Components\\n+ custom)\"]\n        PP[\"PostProcessors\\n(generator meta tag, excerpts, links\\n+ custom)\"]\n        TH[\"Themes / Layouts\"]\n        TW --&gt; EXT\n        TW --&gt; PP\n        TH --&gt; TW\n    end\n\n    subgraph ASSETS[\"Assets\"]\n        AL[\"Asset locator\"]\n        AC[\"Compiler\\n(SCSS → CSS)\"]\n        AI[\"Image processor\\n(resize, responsive, WebP, AVIF)\"]\n        AO[\"Optimizer\\n(CSS/JS minification,\\nimage optimization)\"]\n    end\n\n    CACHE[\".cache/\\n(assets, templates, translations)\"]\n\n    subgraph OUTPUT[\"Output (_site/)\"]\n        HTML[\"pages (HTML, XML, JSON, etc.)\"]\n        CSS2[\"CSS/JS assets\"]\n        IMG[\"images\"]\n        SF[\"static files\"]\n    end\n\n    S5 --&gt; CONV\n    S4 --&gt; PC\n    S6 --&gt; TC\n    S8 --&gt; MC\n    S7 --&gt; GENERATORS\n    GENERATORS --&gt; PC\n    S10 --&gt; RENDERER\n    EXTN --&gt; GENERATORS\n    EXTN --&gt; EXT\n    EXTN --&gt; PP\n    PIPELINE -. \"step.*, page.*\" .-&gt; EVENTS\n\n    PC --&gt; RENDERER\n    TC --&gt; RENDERER\n    MC --&gt; RENDERER\n    S2 -- \"site.data\" --&gt; RENDERER\n    S3 -- \"site.static\" --&gt; RENDERER\n\n    %% assets are created by the converter (Markdown images, links) and by templates (asset() function),\n    %% processed and stored in cache, then copied to the output\n    CONV --&gt; ASSETS\n    EXT --&gt; ASSETS\n    ASSETS --&gt; CACHE\n    CACHE --&gt; S12\n\n    RENDERER --&gt; S11\n    S11 --&gt; HTML\n    S12 --&gt; CSS2\n    S12 --&gt; IMG\n    S9 --&gt; SF\n    S13 -. \"optimize files in place\" .-&gt; OUTPUT\n\n    %% Inputs\n    subgraph INPUT[\"Sources\"]\n        MD[\"pages/\\n(Markdown + front matter)\"]\n        DATA[\"data/\\n(YAML, JSON, XML, CSV)\"]\n        STATIC[\"static/\"]\n        ASSETSDIR[\"assets/\"]\n        LAYOUTS[\"layouts/\\n(Twig templates)\"]\n        TRANS[\"translations/\"]\n        THEMES[\"themes/\\n(config, layouts, assets,\\nstatic, data, translations,\\nextensions)\"]\n        EXTDIR[\"extensions/\\n(PHP classes)\"]\n    end\n\n    MD --&gt; S1\n    DATA --&gt; S2\n    STATIC --&gt; S3\n    STATIC --&gt; S9\n    ASSETSDIR --&gt; AL\n    LAYOUTS --&gt; TH\n    TRANS --&gt; EXT\n    THEMES --&gt; CONFIG\n    THEMES --&gt; TH\n    THEMES --&gt; EXTN\n    EXTDIR --&gt; EXTN</code></pre>\n<h2 id=\"technical-architecture\">Technical architecture<a class=\"heading-anchor\" href=\"#technical-architecture\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The diagrams below show how the code is organized in layers, from the command line to the file system, and which libraries each component relies on.</p>\n<h3 id=\"architecture-overview\">Architecture overview<a class=\"heading-anchor\" href=\"#architecture-overview\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<pre data-lang=\"mermaid\"><code class=\"language-mermaid\" translate=\"no\">graph TB\n    ENTRY[\"Entry points\\n(bin/cecil, cecil.phar)\"]\n    CONSOLE[\"Console\\n(commands)\"]\n    DEV[\"Local server\\n(serve, live reload)\"]\n    CORE[\"Core\\n(Builder, Config, Steps,\\nCollections, Generators)\"]\n    EXTS[\"Extensions\\n(plugins, events)\"]\n    SERVICES[\"Services\\n(Converter, Renderer,\\nAssets, Cache, Doctor)\"]\n    LIBS[\"Libraries\\n(Symfony, Twig, Parsedown,\\nscssphp, Intervention Image, ...)\"]\n    FS[\"File system\\n(sources, .cache/, _site/)\"]\n\n    ENTRY --&gt; CONSOLE --&gt; CORE\n    CONSOLE --&gt; DEV --&gt; CORE\n    CORE &lt;--&gt; EXTS\n    CORE --&gt; SERVICES\n    CORE --&gt; FS\n    SERVICES --&gt; FS\n    SERVICES --&gt; LIBS</code></pre>\n<h3 id=\"detailed-architecture\">Detailed architecture<a class=\"heading-anchor\" href=\"#detailed-architecture\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<pre data-lang=\"mermaid\"><code class=\"language-mermaid\" translate=\"no\">graph TB\n    %% Distribution and entry points\n    subgraph ENTRY[\"Entry points\"]\n        BIN[\"bin/cecil\\n(Composer)\"]\n        PHAR[\"cecil.phar\\n(Box, self-update)\"]\n    end\n\n    subgraph CONSOLE[\"Console layer (Symfony Console)\"]\n        APP[\"Application\"]\n        ENV[\".env\\n(phpdotenv)\"]\n        BUILD[\"build\"]\n        SERVE[\"serve\"]\n        DOCTOR[\"doctor:*\"]\n        OTHERS[\"new:* / show:* / clear / cache:clear / util:*\"]\n        APP --&gt; BUILD\n        APP --&gt; SERVE\n        APP --&gt; DOCTOR\n        APP --&gt; OTHERS\n        ENV --&gt; APP\n    end\n\n    BIN --&gt; APP\n    PHAR --&gt; APP\n\n    subgraph DEV[\"Local server (serve)\"]\n        PHPS[\"PHP built-in server\\n(.cecil/router.php)\"]\n        WATCH[\"FileWatcher\\n(changes.flag)\"]\n        PROC[\"Build sub-process\\n(Symfony Process)\"]\n        LR[\"livereload.js\\n(Server-Sent Events)\"]\n        WATCH -- \"rebuild\" --&gt; PROC\n        WATCH -- \"notify\" --&gt; PHPS\n        PHPS --&gt; LR\n    end\n\n    SERVE --&gt; DEV\n\n    subgraph CORE[\"Core\"]\n        BUILDER[\"Builder\\n(steps orchestration, metrics)\"]\n        CFG[\"Config\\n(Merger, Deprecations,\\nnette/schema)\"]\n        LOG[\"Logger\\n(PSR-3: Console, Progress, Print)\"]\n        STEPS[\"Steps\\n(StepInterface)\"]\n        COLL[\"Collections\\n(Page, Taxonomy, Menu)\"]\n        GEN[\"Generators\\n(GeneratorManager)\"]\n        BUILDER --&gt; CFG\n        BUILDER --&gt; LOG\n        BUILDER --&gt; STEPS\n        STEPS --&gt; COLL\n        STEPS --&gt; GEN\n    end\n\n    BUILD --&gt; BUILDER\n    PROC --&gt; BUILDER\n    OTHERS --&gt; BUILDER\n\n    subgraph EXTS[\"Extensions\"]\n        AUTO[\"Autoloader\\n(extensions/, PSR-4,\\nextensions/vendor/)\"]\n        LOADER[\"Loader\\n(by name and priority,\\nextensions.strict)\"]\n        PLUG[\"Plugins\\n(Registry)\"]\n        EVT[\"Event dispatcher\\n(BuildEvents, subscribers)\"]\n        PLUG --&gt; LOADER\n    end\n\n    BUILDER --&gt; AUTO\n    BUILDER --&gt; PLUG\n    PLUG -- \"default config\" --&gt; CFG\n    BUILDER -- \"dispatch\" --&gt; EVT\n    STEPS -- \"dispatch\" --&gt; EVT\n    LOADER --&gt; GEN\n\n    subgraph SERVICES[\"Services\"]\n        CONV[\"Converter\\n(ConverterInterface, Parsedown Extra + TOC,\\nhighlight.php / Tempest)\"]\n        REND[\"Renderer\\n(Twig, Symfony Translation,\\nTwig Components)\"]\n        ASSET[\"Asset\\n(Locator, Compiler, Image, Optimizer)\"]\n        CACHE[\"Cache\\n(PSR-16, files)\"]\n        DOC[\"Doctor\\n(Site, Frontmatter, Links, SEO)\"]\n    end\n\n    STEPS --&gt; CONV\n    STEPS --&gt; REND\n    STEPS --&gt; ASSET\n    REND --&gt; ASSET\n    CONV --&gt; ASSET\n    ASSET --&gt; CACHE\n    REND --&gt; CACHE\n    DOCTOR --&gt; DOC\n    DOC --&gt; BUILDER\n    LOADER --&gt; REND\n\n    subgraph LIBS[\"Main libraries\"]\n        L1[\"Symfony\\n(Finder, Filesystem, Yaml, Serializer,\\nValidator, DomCrawler, EventDispatcher)\"]\n        L2[\"scssphp\"]\n        L3[\"Intervention Image\\n(GD, Imagick, libvips)\"]\n        L4[\"matthiasmullie/minify\\nvoku/html-min\"]\n        L5[\"spatie/image-optimizer\\n(external binaries)\"]\n        L6[\"yosymfony/toml\"]\n        L7[\"getID3, mp3info\\n(audio/video metadata)\"]\n    end\n\n    CORE --&gt; L1\n    ASSET --&gt; L2\n    ASSET --&gt; L3\n    ASSET --&gt; L4\n    STEPS --&gt; L4\n    ASSET --&gt; L5\n    CONV --&gt; L6\n    ASSET --&gt; L7\n\n    subgraph FS[\"File system\"]\n        SRC[\"Sources\\n(pages/, data/, assets/, static/,\\nlayouts/, translations/, themes/,\\nextensions/)\"]\n        CACHEDIR[\".cache/\"]\n        TMP[\".cecil/\\n(router, live reload, metrics, logs)\"]\n        OUT[\"_site/\"]\n    end\n\n    STEPS -- \"read\" --&gt; SRC\n    AUTO -- \"read\" --&gt; SRC\n    CACHE --&gt; CACHEDIR\n    STEPS -- \"write\" --&gt; OUT\n    PHPS -- \"serve\" --&gt; OUT\n    DEV --&gt; TMP</code></pre>\n<h2 id=\"key-components\">Key components<a class=\"heading-anchor\" href=\"#key-components\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<table>\n<thead>\n<tr>\n<th>Component</th>\n<th>Role</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Builder</strong></td>\n<td>Central orchestrator that executes steps in sequence</td>\n</tr>\n<tr>\n<td><strong>Config</strong></td>\n<td>Merges plugins, default, themes and project configuration (<code translate=\"no\">Config\\Merger</code>), environment variables (<code translate=\"no\">CECIL_*</code>) and CLI options, and reports deprecated options (<code translate=\"no\">Config\\Deprecations</code>)</td>\n</tr>\n<tr>\n<td><strong>Steps</strong></td>\n<td>Modular pipeline (16 steps), each with <code translate=\"no\">init()</code> / <code translate=\"no\">canProcess()</code> / <code translate=\"no\">process()</code></td>\n</tr>\n<tr>\n<td><strong>Collections</strong></td>\n<td>Pages, Taxonomies, Menus: core data structures</td>\n</tr>\n<tr>\n<td><strong>Converter</strong></td>\n<td>Parses the front matter (YAML, INI, TOML or JSON) and converts Markdown to HTML (Parsedown, code highlighting); replaceable with <code translate=\"no\">pages.converter</code> and <code translate=\"no\">pages.body.parser</code></td>\n</tr>\n<tr>\n<td><strong>Generators</strong></td>\n<td>Create or update pages (default pages, sections, taxonomies, pagination, aliases, redirects, etc.)</td>\n</tr>\n<tr>\n<td><strong>Extensions</strong></td>\n<td>Generators, Twig extensions, post-processors, event subscribers and plugins declared by name, loaded and validated by <code translate=\"no\">Extension\\Loader</code>, autoloaded by <code translate=\"no\">Extension\\Autoloader</code></td>\n</tr>\n<tr>\n<td><strong>Events</strong></td>\n<td>Build events (<code translate=\"no\">Event\\BuildEvents</code>) dispatched around the build, each step and each page lifecycle, to <a href=\"1-extend.md#build-events\">extend Cecil</a></td>\n</tr>\n<tr>\n<td><strong>Renderer (Twig)</strong></td>\n<td>Applies templates + extensions + post-processors</td>\n</tr>\n<tr>\n<td><strong>Assets</strong></td>\n<td>Created from Markdown content and templates: compiles SCSS, minifies, resizes and converts images, fingerprints files</td>\n</tr>\n<tr>\n<td><strong>Cache</strong></td>\n<td>Stores processed assets, compiled templates and translations in <code translate=\"no\">.cache/</code> to speed up subsequent builds</td>\n</tr>\n<tr>\n<td><strong>Doctor</strong></td>\n<td>Diagnoses the project: front matter, links, SEO, cache (<code translate=\"no\">doctor</code> commands)</td>\n</tr>\n</tbody>\n</table>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/developers/library/",
      "url": "https://cloudflare.cecil.app/documentation/developers/library/",
      "title": "Library",
      "summary": "Use Cecil as a PHP library: install it with Composer, then build, convert Markdown and diagnose programmatically.",
      "date_published": "2023-12-13T00:00:00+00:00",
      "date_modified": "2026-10-30T00:00:00+00:00","content_text": "Library\nCecil provides a simple PHP API to build your website.\nYou can read the API documentation for more details.\nInstallation\ncomposer require cecil\/cecil\nlibvips support\nTo process images with libvips (optional), install the libvips driver in your project:\ncomposer require intervention\/image-driver-vips\nThis driver requires libvips installed on your system and the PHP FFI extension enabled.\nCecil uses Imagick when available, otherwise libvips (if installed), otherwise GD.\nUsage\nBuild\nBuild a new website with a custom configuration:\n&lt;?php\n\nrequire_once 'vendor\/autoload.php';\n\nuse Cecil\\Builder;\n\n$config = [\n    'title'   =&gt; \"My website\",\n    'baseurl' =&gt; 'https:\/\/domain.tld\/',\n];\n\nBuilder::create($config)\n    -&gt;setSourceDir(__DIR__)      \/\/ directory of the website sources (current directory by default)\n    -&gt;setDestinationDir(__DIR__) \/\/ where the output directory (`_site`) is created (source directory by default)\n    -&gt;build([]);\n\nexec('php -S localhost:8000 -t _site'); \/\/ preview locally\nBuilder::create() accepts a PHP array or a Cecil\\Config instance, and optionally a PSR-3 logger.\nThe build() method accepts an array of options:\n\n\n\nOption\nDescription\nDefault\n\n\n\n\ndrafts\nIncludes drafts.\nfalse\n\n\ndry-run\nBuilds without saving files.\nfalse\n\n\npage\nBuilds a specific page.\n''\n\n\nrender-subset\nRenders a named subset of pages.\n''\n\n\n\nThese options match the build command options.\nMarkdown\nConvert Markdown to HTML like Cecil does (Markdown parser of the site, pages.body configuration, notes, code highlighting), without building the website: e.g. to preview a page while it is edited.\n&lt;?php\n\nrequire_once 'vendor\/autoload.php';\n\nuse Cecil\\Builder;\nuse Cecil\\Converter\\ParserFactory;\n\n$builder = Builder::create(require 'config.php')-&gt;setSourceDir(__DIR__);\n\n$parser = ParserFactory::create($builder, [\n    'language'  =&gt; 'en',\n    'assets'    =&gt; false,\n    'asset_url' =&gt; fn (string $path): string =&gt; 'http:\/\/localhost:8000' . $path,\n]);\n\necho $parser-&gt;text(file_get_contents('pages\/index.md'));\nThe Markdown parser options:\n\n\n\nOption\nDescription\nDefault\n\n\n\n\nlanguage\nLanguage of the content.\nnull\n\n\nselectors\nHeadings of the table of contents.\npages.body.toc\n\n\nassets\nProcesses the files of the body (images, video and audio) as assets (located, resized, converted, copied): with false, they are kept as they are.\ntrue\n\n\nasset_url\nWith assets set to false, a callable returning the URL of a local file from its path in the body.\nnull\n\n\n\nWithout processing the files as assets, a missing image does not throw an exception, nothing is written to the cache, and remote images are not downloaded.\nDiagnostics\nYou can also run doctor checks through dedicated domain services, without using CLI commands:\n\nCecil\\Doctor\\SiteDoctor::diagnose(): configuration and environment\nCecil\\Doctor\\FrontmatterDoctor::diagnose(): front matter of pages\nCecil\\Doctor\\SeoDoctor::audit(): SEO of rendered pages (runs a dry-run build)\nCecil\\Doctor\\LinksDoctor::audit(): internal and external links\n\n&lt;?php\n\nrequire_once 'vendor\/autoload.php';\n\nuse Cecil\\Builder;\nuse Cecil\\Doctor\\SeoDoctor;\nuse Cecil\\Doctor\\SiteDoctor;\n\n$builder = Builder::create(require 'config.php')\n    -&gt;setSourceDir(__DIR__)\n    -&gt;setDestinationDir(__DIR__);\n\n$siteDoctor = new SiteDoctor();\n$diagnosis = $siteDoctor-&gt;diagnose($builder, __DIR__, ['cecil.yml']);\n\n$seoDoctor = new SeoDoctor();\n$seoAudit = $seoDoctor-&gt;audit($builder, [\n    'page' =&gt; '',\n    'include_generated' =&gt; false,\n]);\n\nvar_dump($diagnosis['errors'], $seoAudit['summary']);",
      "content_html": "<h1>Library</h1>\n<p>Cecil provides a simple PHP API to build your website.</p>\n<p>You can read the <a href=\"https://cloudflare.cecil.app/documentation/library/api/namespaces/cecil.html\">API documentation</a> for more details.</p>\n<h2 id=\"installation\">Installation<a class=\"heading-anchor\" href=\"#installation\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">composer require cecil/cecil</code></pre>\n<h3 id=\"libvips-support\">libvips support<a class=\"heading-anchor\" href=\"#libvips-support\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>To process images with <a href=\"https://www.libvips.org/\" target=\"_blank\" rel=\"noopener noreferrer\">libvips</a> (optional), install the libvips driver in your project:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">composer require intervention/image-driver-vips</code></pre>\n<aside class=\"note note-important\"><p>This driver requires <a href=\"https://www.libvips.org/install.html\" target=\"_blank\" rel=\"noopener noreferrer\">libvips</a> installed on your system and the PHP <a href=\"https://www.php.net/manual/book.ffi.php\" target=\"_blank\" rel=\"noopener noreferrer\">FFI</a> extension enabled.</p>\n<p>Cecil uses <a href=\"https://www.php.net/manual/book.imagick.php\" target=\"_blank\" rel=\"noopener noreferrer\">Imagick</a> when available, otherwise libvips (if installed), otherwise <a href=\"https://www.php.net/manual/book.image.php\" target=\"_blank\" rel=\"noopener noreferrer\">GD</a>.</p></aside>\n<h2 id=\"usage\">Usage<a class=\"heading-anchor\" href=\"#usage\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<h3 id=\"build\">Build<a class=\"heading-anchor\" href=\"#build\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Build a new website with a custom configuration:</p>\n<pre data-lang=\"php\"><code class=\"language-php hljs php\" translate=\"no\"><span class=\"hljs-meta\">&lt;?php</span>\n\n<span class=\"hljs-keyword\">require_once</span> <span class=\"hljs-string\">'vendor/autoload.php'</span>;\n\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Builder</span>;\n\n$config = [\n    <span class=\"hljs-string\">'title'</span>   =&gt; <span class=\"hljs-string\">\"My website\"</span>,\n    <span class=\"hljs-string\">'baseurl'</span> =&gt; <span class=\"hljs-string\">'https://domain.tld/'</span>,\n];\n\nBuilder::create($config)\n    -&gt;setSourceDir(<span class=\"hljs-keyword\">__DIR__</span>)      <span class=\"hljs-comment\">// directory of the website sources (current directory by default)</span>\n    -&gt;setDestinationDir(<span class=\"hljs-keyword\">__DIR__</span>) <span class=\"hljs-comment\">// where the output directory (`_site`) is created (source directory by default)</span>\n    -&gt;build([]);\n\nexec(<span class=\"hljs-string\">'php -S localhost:8000 -t _site'</span>); <span class=\"hljs-comment\">// preview locally</span></code></pre>\n<aside class=\"note note-info\"><p><code translate=\"no\">Builder::create()</code> accepts a PHP <code translate=\"no\">array</code> or a <a href=\"https://github.com/Cecilapp/Cecil/blob/main/src/Config.php\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">Cecil\\Config</code></a> instance, and optionally a <a href=\"https://www.php-fig.org/psr/psr-3/\" target=\"_blank\" rel=\"noopener noreferrer\">PSR-3</a> logger.</p></aside>\n<p>The <code translate=\"no\">build()</code> method accepts an array of options:</p>\n<table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Description</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">drafts</code></td>\n<td>Includes drafts.</td>\n<td><code translate=\"no\">false</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">dry-run</code></td>\n<td>Builds without saving files.</td>\n<td><code translate=\"no\">false</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page</code></td>\n<td>Builds a specific page.</td>\n<td><code translate=\"no\">''</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">render-subset</code></td>\n<td>Renders a named subset of pages.</td>\n<td><code translate=\"no\">''</code></td>\n</tr>\n</tbody>\n</table>\n<p>These options match the <a href=\"../commands/4-build.md\"><code translate=\"no\">build</code></a> command options.</p>\n<h3 id=\"markdown\">Markdown<a class=\"heading-anchor\" href=\"#markdown\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Convert Markdown to HTML like Cecil does (Markdown parser of the site, <a href=\"../configuration/4-pages.md#pages-body\"><code translate=\"no\">pages.body</code></a> configuration, notes, code highlighting), without building the website: e.g. to preview a page while it is edited.</p>\n<pre data-lang=\"php\"><code class=\"language-php hljs php\" translate=\"no\"><span class=\"hljs-meta\">&lt;?php</span>\n\n<span class=\"hljs-keyword\">require_once</span> <span class=\"hljs-string\">'vendor/autoload.php'</span>;\n\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Builder</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Converter</span>\\<span class=\"hljs-title\">ParserFactory</span>;\n\n$builder = Builder::create(<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">'config.php'</span>)-&gt;setSourceDir(<span class=\"hljs-keyword\">__DIR__</span>);\n\n$parser = ParserFactory::create($builder, [\n    <span class=\"hljs-string\">'language'</span>  =&gt; <span class=\"hljs-string\">'en'</span>,\n    <span class=\"hljs-string\">'assets'</span>    =&gt; <span class=\"hljs-keyword\">false</span>,\n    <span class=\"hljs-string\">'asset_url'</span> =&gt; fn (string $path): string =&gt; <span class=\"hljs-string\">'http://localhost:8000'</span> . $path,\n]);\n\n<span class=\"hljs-keyword\">echo</span> $parser-&gt;text(file_get_contents(<span class=\"hljs-string\">'pages/index.md'</span>));</code></pre>\n<p>The Markdown parser options:</p>\n<table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Description</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">language</code></td>\n<td>Language of the content.</td>\n<td><code translate=\"no\">null</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">selectors</code></td>\n<td>Headings of the table of contents.</td>\n<td><code translate=\"no\">pages.body.toc</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">assets</code></td>\n<td>Processes the files of the body (images, video and audio) as assets (located, resized, converted, copied): with <code translate=\"no\">false</code>, they are kept as they are.</td>\n<td><code translate=\"no\">true</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">asset_url</code></td>\n<td>With <code translate=\"no\">assets</code> set to <code translate=\"no\">false</code>, a callable returning the URL of a local file from its path in the body.</td>\n<td><code translate=\"no\">null</code></td>\n</tr>\n</tbody>\n</table>\n<aside class=\"note note-tip\"><p>Without processing the files as assets, a missing image does not throw an exception, nothing is written to the cache, and remote images are not downloaded.</p></aside>\n<h3 id=\"diagnostics\">Diagnostics<a class=\"heading-anchor\" href=\"#diagnostics\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>You can also run doctor checks through dedicated domain services, without using CLI commands:</p>\n<ul>\n<li><code translate=\"no\">Cecil\\Doctor\\SiteDoctor::diagnose()</code>: configuration and environment</li>\n<li><code translate=\"no\">Cecil\\Doctor\\FrontmatterDoctor::diagnose()</code>: front matter of pages</li>\n<li><code translate=\"no\">Cecil\\Doctor\\SeoDoctor::audit()</code>: SEO of rendered pages (runs a dry-run build)</li>\n<li><code translate=\"no\">Cecil\\Doctor\\LinksDoctor::audit()</code>: internal and external links</li>\n</ul>\n<pre data-lang=\"php\"><code class=\"language-php hljs php\" translate=\"no\"><span class=\"hljs-meta\">&lt;?php</span>\n\n<span class=\"hljs-keyword\">require_once</span> <span class=\"hljs-string\">'vendor/autoload.php'</span>;\n\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Builder</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Doctor</span>\\<span class=\"hljs-title\">SeoDoctor</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Doctor</span>\\<span class=\"hljs-title\">SiteDoctor</span>;\n\n$builder = Builder::create(<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">'config.php'</span>)\n    -&gt;setSourceDir(<span class=\"hljs-keyword\">__DIR__</span>)\n    -&gt;setDestinationDir(<span class=\"hljs-keyword\">__DIR__</span>);\n\n$siteDoctor = <span class=\"hljs-keyword\">new</span> SiteDoctor();\n$diagnosis = $siteDoctor-&gt;diagnose($builder, <span class=\"hljs-keyword\">__DIR__</span>, [<span class=\"hljs-string\">'cecil.yml'</span>]);\n\n$seoDoctor = <span class=\"hljs-keyword\">new</span> SeoDoctor();\n$seoAudit = $seoDoctor-&gt;audit($builder, [\n    <span class=\"hljs-string\">'page'</span> =&gt; <span class=\"hljs-string\">''</span>,\n    <span class=\"hljs-string\">'include_generated'</span> =&gt; <span class=\"hljs-keyword\">false</span>,\n]);\n\nvar_dump($diagnosis[<span class=\"hljs-string\">'errors'</span>], $seoAudit[<span class=\"hljs-string\">'summary'</span>]);</code></pre>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/assets/cdn-providers/",
      "url": "https://cloudflare.cecil.app/documentation/assets/cdn-providers/",
      "title": "CDN providers",
      "summary": "Configuration examples of image CDN providers (Cloudinary, Cloudimage, TwicPics, imgix, Netlify Image CDN).",
      "date_published": "2023-10-23T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "CDN providers\nConfiguration examples for image CDN providers (see the assets.images.cdn option).\nSVG images are sent to the CDN only if the provider supports them and svg: true is set; remote images are handled unless remote: false is set.\nCloudinary\nhttps:\/\/cloudinary.com\nassets:\n  images:\n    cdn:\n      enabled: true\n      account: 'xxxx'\n      url: 'https:\/\/res.cloudinary.com\/%account%\/image\/fetch\/c_limit,w_%width%,q_%quality%,f_%format%,d_default\/%image_url%'\nCloudimage\nhttps:\/\/www.cloudimage.io\nassets:\n  images:\n    cdn:\n      enabled: true\n      account: 'xxxx'\n      url: 'https:\/\/%account%.cloudimg.io\/%image_url%?w=%width%&amp;q=%quality%&amp;force_format=%format%'\nTwicPics\nhttps:\/\/www.twicpics.com\nassets:\n  images:\n    cdn:\n      enabled: true\n      account: 'xxxx'\n      canonical: false\n      remote: false\n      url: 'https:\/\/%account%.twic.pics\/%image_url%?twic=v1\/resize=%width%\/quality=%quality%\/output=%format%'\nIn the TwicPics dashboard, set the Source URL to your website baseurl.\nimgix\nhttps:\/\/imgix.com\nassets:\n  images:\n    cdn:\n      enabled: true\n      account: 'xxxx'\n      canonical: false\n      remote: false\n      url: 'https:\/\/%account%.imgix.net\/%image_url%?w=%width%&amp;q=%quality%&amp;fm=%format%'\nIn the imgix dashboard, set the Base URL of the source to your website baseurl.\nNetlify Image CDN\nhttps:\/\/docs.netlify.com\/image-cdn\/overview\/\nassets:\n  images:\n    cdn:\n      enabled: true\n      canonical: false\n      url: '\/.netlify\/images?url=%image_url%&amp;w=%width%&amp;fm=%format%'\nRun locally\n\n  \n    \n      Setup Netlify CLI\n      npm install netlify-cli -g\nnetlify link\nnetlify.toml:\n[dev]\n  targetPort = 8000\n    \n    \n      Run local server\n      php cecil.phar serve &amp; netlify dev\nOn Windows, run php cecil.phar serve and netlify dev in two separate terminals.\nOpen http:\/\/localhost:8888\n    \n  \n",
      "content_html": "<h1>CDN providers</h1>\n<p>Configuration examples for image CDN providers (see the <a href=\"../configuration/6-assets.md#assets-images-cdn\"><code translate=\"no\">assets.images.cdn</code></a> option).</p>\n<aside class=\"note note-tip\"><p>SVG images are sent to the CDN only if the provider supports them and <code translate=\"no\">svg: true</code> is set; remote images are handled unless <code translate=\"no\">remote: false</code> is set.</p></aside>\n<h2 id=\"cloudinary\">Cloudinary<a class=\"heading-anchor\" href=\"#cloudinary\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p><a href=\"https://cloudinary.com\" target=\"_blank\" rel=\"noopener noreferrer\">https://cloudinary.com</a></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">images:</span>\n    <span class=\"hljs-attr\">cdn:</span>\n      <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">account:</span> <span class=\"hljs-string\">'xxxx'</span>\n      <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">'https://res.cloudinary.com/%account%/image/fetch/c_limit,w_%width%,q_%quality%,f_%format%,d_default/%image_url%'</span></code></pre>\n<h2 id=\"cloudimage\">Cloudimage<a class=\"heading-anchor\" href=\"#cloudimage\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p><a href=\"https://www.cloudimage.io\" target=\"_blank\" rel=\"noopener noreferrer\">https://www.cloudimage.io</a></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">images:</span>\n    <span class=\"hljs-attr\">cdn:</span>\n      <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">account:</span> <span class=\"hljs-string\">'xxxx'</span>\n      <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">'https://%account%.cloudimg.io/%image_url%?w=%width%&amp;q=%quality%&amp;force_format=%format%'</span></code></pre>\n<h2 id=\"twicpics\">TwicPics<a class=\"heading-anchor\" href=\"#twicpics\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p><a href=\"https://www.twicpics.com\" target=\"_blank\" rel=\"noopener noreferrer\">https://www.twicpics.com</a></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">images:</span>\n    <span class=\"hljs-attr\">cdn:</span>\n      <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">account:</span> <span class=\"hljs-string\">'xxxx'</span>\n      <span class=\"hljs-attr\">canonical:</span> <span class=\"hljs-literal\">false</span>\n      <span class=\"hljs-attr\">remote:</span> <span class=\"hljs-literal\">false</span>\n      <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">'https://%account%.twic.pics/%image_url%?twic=v1/resize=%width%/quality=%quality%/output=%format%'</span></code></pre>\n<p>In the TwicPics dashboard, set the <strong>Source URL</strong> to your website <code translate=\"no\">baseurl</code>.</p>\n<h2 id=\"imgix\">imgix<a class=\"heading-anchor\" href=\"#imgix\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p><a href=\"https://imgix.com\" target=\"_blank\" rel=\"noopener noreferrer\">https://imgix.com</a></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">images:</span>\n    <span class=\"hljs-attr\">cdn:</span>\n      <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">account:</span> <span class=\"hljs-string\">'xxxx'</span>\n      <span class=\"hljs-attr\">canonical:</span> <span class=\"hljs-literal\">false</span>\n      <span class=\"hljs-attr\">remote:</span> <span class=\"hljs-literal\">false</span>\n      <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">'https://%account%.imgix.net/%image_url%?w=%width%&amp;q=%quality%&amp;fm=%format%'</span></code></pre>\n<p>In the imgix dashboard, set the <strong>Base URL</strong> of the source to your website <code translate=\"no\">baseurl</code>.</p>\n<h2 id=\"netlify-image-cdn\">Netlify Image CDN<a class=\"heading-anchor\" href=\"#netlify-image-cdn\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p><a href=\"https://docs.netlify.com/image-cdn/overview/\" target=\"_blank\" rel=\"noopener noreferrer\">https://docs.netlify.com/image-cdn/overview/</a></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">images:</span>\n    <span class=\"hljs-attr\">cdn:</span>\n      <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">canonical:</span> <span class=\"hljs-literal\">false</span>\n      <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">'/.netlify/images?url=%image_url%&amp;w=%width%&amp;fm=%format%'</span></code></pre>\n<h3 id=\"run-locally\">Run locally<a class=\"heading-anchor\" href=\"#run-locally\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<div class=\"note note-steps\" id=\"note-steps-1\">\n  <ol class=\"note-steps-list\">\n    <li class=\"note-step\">\n      <h4 id=\"setup-netlify-cli\">Setup Netlify CLI</h4>\n      <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">npm install netlify-cli -g\nnetlify link</code></pre>\n<p><code translate=\"no\">netlify.toml</code>:</p>\n<pre data-lang=\"toml\"><code class=\"language-toml hljs ini\" translate=\"no\"><span class=\"hljs-section\">[dev]</span>\n  targetPort = 8000</code></pre>\n    </li>\n    <li class=\"note-step\">\n      <h4 id=\"run-local-server\">Run local server</h4>\n      <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar serve &amp; netlify dev</code></pre>\n<p>On Windows, run <code translate=\"no\">php cecil.phar serve</code> and <code translate=\"no\">netlify dev</code> in two separate terminals.</p>\n<p>Open <a href=\"http://localhost:8888\" target=\"_blank\" rel=\"noopener noreferrer\">http://localhost:8888</a></p>\n    </li>\n  </ol>\n</div>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/developers/extend/",
      "url": "https://cloudflare.cecil.app/documentation/developers/extend/",
      "title": "Extend Cecil",
      "summary": "Create custom page generators, add Twig extensions, post-process output files and listen to build events.",
      "date_published": "2023-04-17T00:00:00+00:00",
      "date_modified": "2026-10-30T00:00:00+00:00","content_text": "Extend Cecil\nBecause Cecil is written in PHP, it's easy to extend its capabilities.\nUse the new:extension command to create the skeleton of an extension: cecil new:extension --type=generator --name=Database --namespace=MySite.\nAutoloading\nCustom classes are autoloaded from the extensions directory of your site (or of a theme), the file path matching the namespace: the class MySite\\Generator\\MyGenerator is loaded from extensions\/MySite\/Generator\/MyGenerator.php.\nTo use another layout, declare PSR-4 mappings, relative to the site (or theme) directory:\nextensions:\n  autoload:\n    'MySite\\': src\/ # `MySite\\Generator\\MyGenerator` is loaded from `src\/Generator\/MyGenerator.php`\nIf your extensions depend on third-party libraries, install them with Composer in the extensions directory (composer require &lt;package&gt; --working-dir=extensions): extensions\/vendor\/autoload.php is loaded automatically, even with the Cecil phar. Libraries already provided by Cecil are not overridden.\nUse your own namespace (e.g.: MySite\\ or the name of your theme): the Cecil\\ namespace is reserved, and using it for custom classes is deprecated.\nConfiguration\nPage generators, Twig extensions, output post-processors, build events subscribers and plugins are declared the same way, as a map indexed by name:\n&lt;key&gt;:\n  &lt;name&gt;: &lt;class&gt;                                         # default priority (100)\n  &lt;name&gt;: { class: &lt;class&gt;, priority: &lt;int&gt; }             # explicit priority\n  &lt;name&gt;: false                                           # disabled\n\nExtensions run in ascending order of their priority; without a priority, they run after the built-in ones (priority 100), in their declaration order.\nA built-in extension can be disabled (Redirect: false) or moved (Section: { priority: 45 }) by its name.\nAn extension that cannot be loaded (unknown class, wrong interface, invalid option) is skipped and the error is logged. To fail the build instead, enable the strict mode (false only logs the error, without the Cecil 10 warning):\n\nextensions:\n  strict: true\nIndexing extensions by priority (e.g.: 35: MySite\\Generator\\Database) or by position (a list) is deprecated: it is still supported, with a warning, but will not be in Cecil 10. Use Database: { class: MySite\\Generator\\Database, priority: 35 } instead.\nIn Cecil 10, the strict mode will be enabled by default.\nPage generators\nA generator helps you create pages without Markdown files (for example, with data from an API or a database) or alter existing pages.\nCreate a new PHP class extending Cecil\\Generator\\AbstractGenerator, and add it to the pages.generators list.\nBuilt-in generators use the priorities 10 to 90: choose the priority of your generator depending on the pages it needs (e.g.: after Section to access sections pages).\nA generator adds pages to $this-&gt;generatedPages (a page with the ID of an existing page replaces it), and can remove existing pages with $this-&gt;removePage('&lt;page-id&gt;').\nExample:\n\/extensions\/MySite\/Generator\/DummyPage.php\n&lt;?php\nnamespace MySite\\Generator;\n\nuse Cecil\\Collection\\Page\\Page;\nuse Cecil\\Collection\\Page\\Type;\nuse Cecil\\Generator\\AbstractGenerator;\nuse Cecil\\Generator\\GeneratorInterface;\n\nclass DummyPage extends AbstractGenerator implements GeneratorInterface\n{\n    public function generate(): void\n    {\n        \/\/ create a new page $page, then add it to the site collection\n        $page = (new Page('my-page'))\n            -&gt;setType(Type::PAGE)\n            -&gt;setPath('mypage')\n            -&gt;setBodyHtml('&lt;p&gt;My page body&lt;\/p&gt;')\n            -&gt;setVariable('language', 'en')\n            -&gt;setVariable('title', 'My page')\n            -&gt;setVariable('date', new \\DateTime())\n            -&gt;setVariable('menu', ['main' =&gt; ['weight' =&gt; 99]]);\n        $this-&gt;generatedPages-&gt;add($page);\n    }\n}\n\/extensions\/MySite\/Generator\/Database.php\n&lt;?php\nnamespace MySite\\Generator;\n\nuse Cecil\\Collection\\Page\\Page;\nuse Cecil\\Collection\\Page\\Type;\nuse Cecil\\Generator\\AbstractGenerator;\nuse Cecil\\Generator\\GeneratorInterface;\n\nclass Database extends AbstractGenerator implements GeneratorInterface\n{\n    public function generate(): void\n    {\n        \/\/ create pages from a SQLite database\n        $db = new \\SQLite3('database.sqlite');\n        $statement = $db-&gt;prepare('SELECT * FROM blog');\n        $result = $statement-&gt;execute();\n        while ($row = $result-&gt;fetchArray(\\SQLITE3_ASSOC)) {\n            $page = (new Page($row['page-id']))\n                -&gt;setType(Type::PAGE)\n                -&gt;setPath($row['path'])\n                -&gt;setBodyHtml($row['html'])\n                -&gt;setVariable('title', $row['title'])\n                -&gt;setVariable('date', $row['date']);\n            $this-&gt;generatedPages-&gt;add($page);\n        }\n        $result-&gt;finalize();\n        $db-&gt;close();\n    }\n}\nconfiguration\npages:\n  generators:\n    DummyPage: MySite\\Generator\\DummyPage\n    Database: { class: MySite\\Generator\\Database, priority: 35 }\nTwig extension\nYou can add custom functions and filters:\n\ncreate a Twig extension\nadd the PHP file in the extensions directory (see Autoloading)\nadd it to the layouts.extensions configuration\n\nThe extension constructor receives the Cecil\\Builder instance, which gives access to the configuration and the site content.\nExample:\n\/extensions\/MySite\/Twig\/MyTwigExtension.php\n&lt;?php\nnamespace MySite\\Twig;\n\nclass MyTwigExtension extends \\Twig\\Extension\\AbstractExtension\n{\n    public function getFilters(): array\n    {\n        \/\/ add a new filter named 'md5'\n        return [\n            new \\Twig\\TwigFilter('md5', 'md5'),\n        ];\n    }\n}\nconfiguration\nlayouts:\n  extensions:\n    MyExtension: MySite\\Twig\\MyTwigExtension\nOutput post-processors\nYou can post-process the rendered output of pages.\nCreate a new PHP class extending Cecil\\Renderer\\PostProcessor\\AbstractPostProcessor, and add it to the output.postprocessors list.\nBuilt-in post-processors (GeneratorMetaTag, HtmlExcerpt and MarkdownLink) use the priorities 10 to 30, so they run first by default.\nExample:\n\/extensions\/MySite\/PostProcessor\/MyProcessor.php\n&lt;?php\nnamespace MySite\\PostProcessor;\n\nuse Cecil\\Collection\\Page\\Page;\nuse Cecil\\Renderer\\PostProcessor\\AbstractPostProcessor;\n\nclass MyProcessor extends AbstractPostProcessor\n{\n    public function process(Page $page, string $output, string $format): string\n    {\n        \/\/ add a meta tag to the head of the HTML output\n        if ($format == 'html') {\n            if (!preg_match('\/&lt;meta name=\"test\".*\/i', $output)) {\n                $meta = '&lt;meta name=\"test\" content=\"Test\"&gt;';\n                $output = preg_replace_callback('\/([[:blank:]]*)(&lt;\\\/head&gt;)\/i', function ($matches) use ($meta) {\n                    return str_repeat($matches[1] ?: ' ', 2) . $meta . \"\\n\" . $matches[1] . $matches[2];\n                }, $output);\n            }\n        }\n\n        return $output;\n    }\n}\nconfiguration\noutput:\n  postprocessors:\n    MyProcessor: MySite\\PostProcessor\\MyProcessor\nMarkdown converter\nThe front matter and the Markdown body of pages are converted by the class defined in pages.converter. It is also used by the markdown_to_html filter and for external pages (the toc filter uses the Markdown parser directly).\nTo change the conversion, create a PHP class implementing Cecil\\Converter\\ConverterInterface (its constructor receives the Cecil\\Builder instance), or extending the default Cecil\\Converter\\Converter class.\nExample:\n\/extensions\/MySite\/Converter.php\n&lt;?php\nnamespace MySite;\n\nclass Converter extends \\Cecil\\Converter\\Converter\n{\n    public function convertBody(string $string, ?string $language = null): string\n    {\n        \/\/ replaces `[[page-id]]` with a link, before the default conversion\n        $string = preg_replace('\/\\[\\[([a-z0-9-\\\/]+)\\]\\]\/', '[$1]($1.md)', $string);\n\n        return parent::convertBody($string, $language);\n    }\n}\nconfiguration\npages:\n  converter: MySite\\Converter\nMarkdown parser\nTo add your own Markdown syntax, replace the Markdown parser used by the default converter (and by the markdown_to_html and toc filters) with the pages.body.parser option.\nCreate a PHP class extending Cecil\\Converter\\Parsedown, based on Parsedown (1.x) and Parsedown Extra, and register your syntax with its extension mechanism: a marker character in $this-&gt;InlineTypes (or $this-&gt;BlockTypes) refers to an inline&lt;Type&gt;() method (or block&lt;Type&gt;(), block&lt;Type&gt;Continue() and block&lt;Type&gt;Complete() methods).\nA custom parser relies on Parsedown internals: it may need to be updated when Cecil upgrades Parsedown.\nThe parser can also be created outside of a build (see Library): pass the options to the parent constructor, and do not rely on the state of a build (e.g. the pages collection).\nExample:\n\/extensions\/MySite\/Parsedown.php\n&lt;?php\nnamespace MySite;\n\nuse Cecil\\Builder;\n\nclass Parsedown extends \\Cecil\\Converter\\Parsedown\n{\n    public function __construct(Builder $builder, ?array $options = null)\n    {\n        parent::__construct($builder, $options);\n        \/\/ `==text==` → `&lt;mark&gt;text&lt;\/mark&gt;`\n        $this-&gt;InlineTypes['='][] = 'Mark';\n        $this-&gt;inlineMarkerList .= '=';\n    }\n\n    protected function inlineMark($Excerpt)\n    {\n        if (preg_match('\/^==(?=\\S)(.+?)(?&lt;=\\S)==\/', $Excerpt['text'], $matches)) {\n            return [\n                'extent'  =&gt; \\strlen($matches[0]),\n                'element' =&gt; ['name' =&gt; 'mark', 'text' =&gt; $matches[1], 'handler' =&gt; 'line'],\n            ];\n        }\n\n        return null;\n    }\n}\nconfiguration\npages:\n  body:\n    parser: MySite\\Parsedown\nBuild events\nEvents are dispatched during the build: listen to them to run your own code before or after the build, each step, or at each step of the life cycle of a page (e.g.: to create a search index, notify a service, or modify the output of pages).\n\n\n\nEvent\nConstant\nWhen\nEvent class\n\n\n\n\nbuild.start\nBuildEvents::BUILD_START\nbefore the first step\nBuildEvent\n\n\nbuild.finished\nBuildEvents::BUILD_FINISHED\nafter the last step\nBuildEvent\n\n\nstep.pre\nBuildEvents::STEP_PRE\nbefore each step\nStepEvent\n\n\nstep.post\nBuildEvents::STEP_POST\nafter each step\nStepEvent\n\n\npage.created\nBuildEvents::PAGE_CREATED\nafter a page is created from a content file\nPageEvent\n\n\npage.converted\nBuildEvents::PAGE_CONVERTED\nafter a published page is converted (front matter and body)\nPageEvent\n\n\npage.rendered\nBuildEvents::PAGE_RENDERED\nafter a page is rendered in a format (after post-processors)\nPageRenderedEvent\n\n\npage.saved\nBuildEvents::PAGE_SAVED\nafter a rendered page is saved to a file\nPageSavedEvent\n\n\n\nEvery event gives access to the build context (getBuilder()) and options (getOptions()); StepEvent adds getStep(), PageEvent adds getPage(), PageRenderedEvent adds getFormat(), getOutput() and setOutput(), PageSavedEvent adds getFormat() and getPathname().\nCreate an event subscriber extending Cecil\\Event\\AbstractSubscriber (which gives access to $this-&gt;builder and $this-&gt;config), and add it to the extensions.subscribers list.\nExample:\n\/extensions\/MySite\/SearchIndex.php\n&lt;?php\nnamespace MySite;\n\nuse Cecil\\Event\\AbstractSubscriber;\nuse Cecil\\Event\\BuildEvent;\nuse Cecil\\Event\\BuildEvents;\nuse Cecil\\Event\\PageEvent;\n\nclass SearchIndex extends AbstractSubscriber\n{\n    private array $index = [];\n\n    public static function getSubscribedEvents(): array\n    {\n        return [\n            BuildEvents::PAGE_CONVERTED =&gt; 'onPageConverted',\n            BuildEvents::BUILD_FINISHED =&gt; 'onBuildFinished',\n        ];\n    }\n\n    public function onPageConverted(PageEvent $event): void\n    {\n        $page = $event-&gt;getPage();\n        $this-&gt;index[] = ['title' =&gt; $page-&gt;getVariable('title'), 'path' =&gt; $page-&gt;getPath()];\n    }\n\n    public function onBuildFinished(BuildEvent $event): void\n    {\n        if ($event-&gt;getOptions()['dry-run']) {\n            return;\n        }\n        file_put_contents($this-&gt;config-&gt;getOutputPath() . '\/search.json', json_encode($this-&gt;index));\n    }\n}\nconfiguration\nextensions:\n  subscribers:\n    SearchIndex: MySite\\SearchIndex\nWhen using Cecil as a PHP library, listeners can also be added directly to the dispatcher before the build: $builder-&gt;getEventDispatcher()-&gt;addListener(BuildEvents::PAGE_SAVED, $callable).\nPlugins\nA plugin is a single entry point that registers a set of extensions: generators, Twig extensions, post-processors, event subscribers and listeners, and default configuration. It's the recommended way to ship extensions with a theme: enabling the theme enables its plugin, with no other configuration.\nCreate a PHP class extending Cecil\\Plugin\\AbstractPlugin (which gives access to $this-&gt;builder and $this-&gt;config), and add it to the extensions.plugins list.\nExample:\n\/themes\/example\/extensions\/Example\/ExamplePlugin.php\n&lt;?php\nnamespace Example;\n\nuse Cecil\\Event\\BuildEvents;\nuse Cecil\\Plugin\\AbstractPlugin;\nuse Cecil\\Plugin\\Registry;\n\nclass ExamplePlugin extends AbstractPlugin\n{\n    public function register(Registry $registry): void\n    {\n        $registry\n            -&gt;config(['example' =&gt; ['feed' =&gt; ['limit' =&gt; 10]]]) \/\/ default options\n            -&gt;twigExtension(Twig\\ExampleExtension::class)\n            -&gt;generator(Generator\\Feed::class, priority: 35)\n            -&gt;postProcessor(PostProcessor\\Minify::class)\n            -&gt;subscriber(SearchIndex::class)\n            -&gt;listen(BuildEvents::BUILD_FINISHED, fn () =&gt; $this-&gt;builder-&gt;getLogger()-&gt;notice('Example is ready'));\n    }\n}\n\/themes\/example\/config.yml\nextensions:\n  plugins:\n    Example: Example\\ExamplePlugin\nExtensions registered by a plugin are named after their short class name (e.g.: Feed), unless a name is given, and use the default priority (100) unless a priority is given. The plugin configuration has the lowest precedence: the site (and themes) configuration can override its options, and disable (Feed: false) or move (Feed: { priority: 45 }) its extensions by name.",
      "content_html": "<h1>Extend Cecil</h1>\n<p>Because Cecil is written in PHP, it's easy to extend its capabilities.</p>\n<aside class=\"note note-tip\"><p>Use the <a href=\"../commands/6-new-extension.md\"><code translate=\"no\">new:extension</code></a> command to create the skeleton of an extension: <code translate=\"no\">cecil new:extension --type=generator --name=Database --namespace=MySite</code>.</p></aside>\n<h2 id=\"autoloading\">Autoloading<a class=\"heading-anchor\" href=\"#autoloading\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Custom classes are autoloaded from the <code translate=\"no\">extensions</code> directory of your site (or of a theme), the file path matching the namespace: the class <code translate=\"no\">MySite\\Generator\\MyGenerator</code> is loaded from <code translate=\"no\">extensions/MySite/Generator/MyGenerator.php</code>.</p>\n<p>To use another layout, declare <a href=\"https://www.php-fig.org/psr/psr-4/\" target=\"_blank\" rel=\"noopener noreferrer\">PSR-4</a> mappings, relative to the site (or theme) directory:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">extensions:</span>\n  <span class=\"hljs-attr\">autoload:</span>\n    <span class=\"hljs-string\">'MySite\\': src/ # `MySite\\Generator\\MyGenerator` is loaded from `src/Generator/MyGenerator.php`</span></code></pre>\n<p>If your extensions depend on third-party libraries, install them with <a href=\"https://getcomposer.org\" target=\"_blank\" rel=\"noopener noreferrer\">Composer</a> in the <code translate=\"no\">extensions</code> directory (<code translate=\"no\">composer require &lt;package&gt; --working-dir=extensions</code>): <code translate=\"no\">extensions/vendor/autoload.php</code> is loaded automatically, even with the Cecil phar. Libraries already provided by Cecil are not overridden.</p>\n<aside class=\"note note-important\"><p>Use your own namespace (e.g.: <code translate=\"no\">MySite\\</code> or the name of your theme): the <code translate=\"no\">Cecil\\</code> namespace is reserved, and using it for custom classes is deprecated.</p></aside>\n<h2 id=\"configuration\">Configuration<a class=\"heading-anchor\" href=\"#configuration\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Page generators, Twig extensions, output post-processors, <a href=\"#build-events\">build events</a> subscribers and <a href=\"#plugins\">plugins</a> are declared the same way, as a map indexed by name:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-string\">&lt;key&gt;:</span>\n  <span class=\"hljs-string\">&lt;name&gt;:</span> <span class=\"hljs-string\">&lt;class&gt;</span>                                         <span class=\"hljs-comment\"># default priority (100)</span>\n  <span class=\"hljs-string\">&lt;name&gt;:</span> <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">class:</span> <span class=\"hljs-string\">&lt;class&gt;,</span> <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-string\">&lt;int&gt;</span> <span class=\"hljs-string\">}</span>             <span class=\"hljs-comment\"># explicit priority</span>\n  <span class=\"hljs-string\">&lt;name&gt;:</span> <span class=\"hljs-literal\">false</span>                                           <span class=\"hljs-comment\"># disabled</span></code></pre>\n<ul>\n<li>Extensions run in ascending order of their priority; without a priority, they run after the built-in ones (priority <code translate=\"no\">100</code>), in their declaration order.</li>\n<li>A built-in extension can be disabled (<code translate=\"no\">Redirect: false</code>) or moved (<code translate=\"no\">Section: { priority: 45 }</code>) by its name.</li>\n<li>An extension that cannot be loaded (unknown class, wrong interface, invalid option) is skipped and the error is logged. To fail the build instead, enable the strict mode (<code translate=\"no\">false</code> only logs the error, without the Cecil 10 warning):</li>\n</ul>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">extensions:</span>\n  <span class=\"hljs-attr\">strict:</span> <span class=\"hljs-literal\">true</span></code></pre>\n<aside class=\"note note-important\"><p>Indexing extensions by priority (e.g.: <code translate=\"no\">35: MySite\\Generator\\Database</code>) or by position (a list) is deprecated: it is still supported, with a warning, but will not be in Cecil 10. Use <code translate=\"no\">Database: { class: MySite\\Generator\\Database, priority: 35 }</code> instead.</p>\n<p>In Cecil 10, the strict mode will be enabled by default.</p></aside>\n<h2 id=\"page-generators\">Page generators<a class=\"heading-anchor\" href=\"#page-generators\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>A generator helps you create pages without Markdown files (for example, with data from an API or a database) or alter existing pages.</p>\n<p>Create a new PHP class extending <code translate=\"no\">Cecil\\Generator\\AbstractGenerator</code>, and add it to the <a href=\"../configuration/4-pages.md#pages-generators\"><code translate=\"no\">pages.generators</code></a> list.</p>\n<p>Built-in generators use the priorities <code translate=\"no\">10</code> to <code translate=\"no\">90</code>: choose the priority of your generator depending on the pages it needs (e.g.: after <code translate=\"no\">Section</code> to access sections pages).</p>\n<p>A generator adds pages to <code translate=\"no\">$this-&gt;generatedPages</code> (a page with the ID of an existing page replaces it), and can remove existing pages with <code translate=\"no\">$this-&gt;removePage('&lt;page-id&gt;')</code>.</p>\n<p><strong>Example:</strong></p>\n<p><em>/extensions/MySite/Generator/DummyPage.php</em></p>\n<pre data-lang=\"php\"><code class=\"language-php hljs php\" translate=\"no\"><span class=\"hljs-meta\">&lt;?php</span>\n<span class=\"hljs-keyword\">namespace</span> <span class=\"hljs-title\">MySite</span>\\<span class=\"hljs-title\">Generator</span>;\n\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Collection</span>\\<span class=\"hljs-title\">Page</span>\\<span class=\"hljs-title\">Page</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Collection</span>\\<span class=\"hljs-title\">Page</span>\\<span class=\"hljs-title\">Type</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Generator</span>\\<span class=\"hljs-title\">AbstractGenerator</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Generator</span>\\<span class=\"hljs-title\">GeneratorInterface</span>;\n\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">DummyPage</span> <span class=\"hljs-keyword\">extends</span> <span class=\"hljs-title\">AbstractGenerator</span> <span class=\"hljs-keyword\">implements</span> <span class=\"hljs-title\">GeneratorInterface</span>\n</span>{\n    <span class=\"hljs-keyword\">public</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span> <span class=\"hljs-title\">generate</span><span class=\"hljs-params\">()</span>: <span class=\"hljs-title\">void</span>\n    </span>{\n        <span class=\"hljs-comment\">// create a new page $page, then add it to the site collection</span>\n        $page = (<span class=\"hljs-keyword\">new</span> Page(<span class=\"hljs-string\">'my-page'</span>))\n            -&gt;setType(Type::PAGE)\n            -&gt;setPath(<span class=\"hljs-string\">'mypage'</span>)\n            -&gt;setBodyHtml(<span class=\"hljs-string\">'&lt;p&gt;My page body&lt;/p&gt;'</span>)\n            -&gt;setVariable(<span class=\"hljs-string\">'language'</span>, <span class=\"hljs-string\">'en'</span>)\n            -&gt;setVariable(<span class=\"hljs-string\">'title'</span>, <span class=\"hljs-string\">'My page'</span>)\n            -&gt;setVariable(<span class=\"hljs-string\">'date'</span>, <span class=\"hljs-keyword\">new</span> \\DateTime())\n            -&gt;setVariable(<span class=\"hljs-string\">'menu'</span>, [<span class=\"hljs-string\">'main'</span> =&gt; [<span class=\"hljs-string\">'weight'</span> =&gt; <span class=\"hljs-number\">99</span>]]);\n        <span class=\"hljs-keyword\">$this</span>-&gt;generatedPages-&gt;add($page);\n    }\n}</code></pre>\n<p><em>/extensions/MySite/Generator/Database.php</em></p>\n<pre data-lang=\"php\"><code class=\"language-php hljs php\" translate=\"no\"><span class=\"hljs-meta\">&lt;?php</span>\n<span class=\"hljs-keyword\">namespace</span> <span class=\"hljs-title\">MySite</span>\\<span class=\"hljs-title\">Generator</span>;\n\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Collection</span>\\<span class=\"hljs-title\">Page</span>\\<span class=\"hljs-title\">Page</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Collection</span>\\<span class=\"hljs-title\">Page</span>\\<span class=\"hljs-title\">Type</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Generator</span>\\<span class=\"hljs-title\">AbstractGenerator</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Generator</span>\\<span class=\"hljs-title\">GeneratorInterface</span>;\n\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">Database</span> <span class=\"hljs-keyword\">extends</span> <span class=\"hljs-title\">AbstractGenerator</span> <span class=\"hljs-keyword\">implements</span> <span class=\"hljs-title\">GeneratorInterface</span>\n</span>{\n    <span class=\"hljs-keyword\">public</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span> <span class=\"hljs-title\">generate</span><span class=\"hljs-params\">()</span>: <span class=\"hljs-title\">void</span>\n    </span>{\n        <span class=\"hljs-comment\">// create pages from a SQLite database</span>\n        $db = <span class=\"hljs-keyword\">new</span> \\SQLite3(<span class=\"hljs-string\">'database.sqlite'</span>);\n        $statement = $db-&gt;prepare(<span class=\"hljs-string\">'SELECT * FROM blog'</span>);\n        $result = $statement-&gt;execute();\n        <span class=\"hljs-keyword\">while</span> ($row = $result-&gt;fetchArray(\\SQLITE3_ASSOC)) {\n            $page = (<span class=\"hljs-keyword\">new</span> Page($row[<span class=\"hljs-string\">'page-id'</span>]))\n                -&gt;setType(Type::PAGE)\n                -&gt;setPath($row[<span class=\"hljs-string\">'path'</span>])\n                -&gt;setBodyHtml($row[<span class=\"hljs-string\">'html'</span>])\n                -&gt;setVariable(<span class=\"hljs-string\">'title'</span>, $row[<span class=\"hljs-string\">'title'</span>])\n                -&gt;setVariable(<span class=\"hljs-string\">'date'</span>, $row[<span class=\"hljs-string\">'date'</span>]);\n            <span class=\"hljs-keyword\">$this</span>-&gt;generatedPages-&gt;add($page);\n        }\n        $result-&gt;finalize();\n        $db-&gt;close();\n    }\n}</code></pre>\n<p><em>configuration</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">generators:</span>\n    <span class=\"hljs-attr\">DummyPage:</span> <span class=\"hljs-string\">MySite\\Generator\\DummyPage</span>\n    <span class=\"hljs-attr\">Database:</span> <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">class:</span> <span class=\"hljs-string\">MySite\\Generator\\Database,</span> <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-number\">35</span> <span class=\"hljs-string\">}</span></code></pre>\n<h2 id=\"twig-extension\">Twig extension<a class=\"heading-anchor\" href=\"#twig-extension\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>You can add custom <a href=\"../templates/reference/1-functions.md\">functions</a> and <a href=\"../templates/reference/3-filters.md\">filters</a>:</p>\n<ol>\n<li><a href=\"https://twig.symfony.com/doc/advanced.html#creating-an-extension\" target=\"_blank\" rel=\"noopener noreferrer\">create a Twig extension</a></li>\n<li>add the PHP file in the <code translate=\"no\">extensions</code> directory (see <a href=\"#autoloading\">Autoloading</a>)</li>\n<li>add it to the <a href=\"../configuration/7-layouts.md#layouts-extensions\"><code translate=\"no\">layouts.extensions</code></a> configuration</li>\n</ol>\n<p>The extension constructor receives the <code translate=\"no\">Cecil\\Builder</code> instance, which gives access to the configuration and the site content.</p>\n<p><strong>Example:</strong></p>\n<p><em>/extensions/MySite/Twig/MyTwigExtension.php</em></p>\n<pre data-lang=\"php\"><code class=\"language-php hljs php\" translate=\"no\"><span class=\"hljs-meta\">&lt;?php</span>\n<span class=\"hljs-keyword\">namespace</span> <span class=\"hljs-title\">MySite</span>\\<span class=\"hljs-title\">Twig</span>;\n\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">MyTwigExtension</span> <span class=\"hljs-keyword\">extends</span> \\<span class=\"hljs-title\">Twig</span>\\<span class=\"hljs-title\">Extension</span>\\<span class=\"hljs-title\">AbstractExtension</span>\n</span>{\n    <span class=\"hljs-keyword\">public</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span> <span class=\"hljs-title\">getFilters</span><span class=\"hljs-params\">()</span>: <span class=\"hljs-title\">array</span>\n    </span>{\n        <span class=\"hljs-comment\">// add a new filter named 'md5'</span>\n        <span class=\"hljs-keyword\">return</span> [\n            <span class=\"hljs-keyword\">new</span> \\Twig\\TwigFilter(<span class=\"hljs-string\">'md5'</span>, <span class=\"hljs-string\">'md5'</span>),\n        ];\n    }\n}</code></pre>\n<p><em>configuration</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">layouts:</span>\n  <span class=\"hljs-attr\">extensions:</span>\n    <span class=\"hljs-attr\">MyExtension:</span> <span class=\"hljs-string\">MySite\\Twig\\MyTwigExtension</span></code></pre>\n<h2 id=\"output-post-processors\">Output post-processors<a class=\"heading-anchor\" href=\"#output-post-processors\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>You can post-process the rendered output of pages.</p>\n<p>Create a new PHP class extending <code translate=\"no\">Cecil\\Renderer\\PostProcessor\\AbstractPostProcessor</code>, and add it to the <a href=\"../configuration/8-output.md#output-postprocessors\"><code translate=\"no\">output.postprocessors</code></a> list.</p>\n<p>Built-in post-processors (<code translate=\"no\">GeneratorMetaTag</code>, <code translate=\"no\">HtmlExcerpt</code> and <code translate=\"no\">MarkdownLink</code>) use the priorities <code translate=\"no\">10</code> to <code translate=\"no\">30</code>, so they run first by default.</p>\n<p><strong>Example:</strong></p>\n<p><em>/extensions/MySite/PostProcessor/MyProcessor.php</em></p>\n<pre data-lang=\"php\"><code class=\"language-php hljs php\" translate=\"no\"><span class=\"hljs-meta\">&lt;?php</span>\n<span class=\"hljs-keyword\">namespace</span> <span class=\"hljs-title\">MySite</span>\\<span class=\"hljs-title\">PostProcessor</span>;\n\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Collection</span>\\<span class=\"hljs-title\">Page</span>\\<span class=\"hljs-title\">Page</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Renderer</span>\\<span class=\"hljs-title\">PostProcessor</span>\\<span class=\"hljs-title\">AbstractPostProcessor</span>;\n\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">MyProcessor</span> <span class=\"hljs-keyword\">extends</span> <span class=\"hljs-title\">AbstractPostProcessor</span>\n</span>{\n    <span class=\"hljs-keyword\">public</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span> <span class=\"hljs-title\">process</span><span class=\"hljs-params\">(Page $page, string $output, string $format)</span>: <span class=\"hljs-title\">string</span>\n    </span>{\n        <span class=\"hljs-comment\">// add a meta tag to the head of the HTML output</span>\n        <span class=\"hljs-keyword\">if</span> ($format == <span class=\"hljs-string\">'html'</span>) {\n            <span class=\"hljs-keyword\">if</span> (!preg_match(<span class=\"hljs-string\">'/&lt;meta name=\"test\".*/i'</span>, $output)) {\n                $meta = <span class=\"hljs-string\">'&lt;meta name=\"test\" content=\"Test\"&gt;'</span>;\n                $output = preg_replace_callback(<span class=\"hljs-string\">'/([[:blank:]]*)(&lt;\\/head&gt;)/i'</span>, <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span> <span class=\"hljs-params\">($matches)</span> <span class=\"hljs-title\">use</span> <span class=\"hljs-params\">($meta)</span> </span>{\n                    <span class=\"hljs-keyword\">return</span> str_repeat($matches[<span class=\"hljs-number\">1</span>] ?: <span class=\"hljs-string\">' '</span>, <span class=\"hljs-number\">2</span>) . $meta . <span class=\"hljs-string\">\"\\n\"</span> . $matches[<span class=\"hljs-number\">1</span>] . $matches[<span class=\"hljs-number\">2</span>];\n                }, $output);\n            }\n        }\n\n        <span class=\"hljs-keyword\">return</span> $output;\n    }\n}</code></pre>\n<p><em>configuration</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">output:</span>\n  <span class=\"hljs-attr\">postprocessors:</span>\n    <span class=\"hljs-attr\">MyProcessor:</span> <span class=\"hljs-string\">MySite\\PostProcessor\\MyProcessor</span></code></pre>\n<h2 id=\"markdown-converter\">Markdown converter<a class=\"heading-anchor\" href=\"#markdown-converter\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The front matter and the Markdown body of pages are converted by the class defined in <a href=\"../configuration/4-pages.md#pages-converter\"><code translate=\"no\">pages.converter</code></a>. It is also used by the <code translate=\"no\">markdown_to_html</code> filter and for external pages (the <code translate=\"no\">toc</code> filter uses the <a href=\"#markdown-parser\">Markdown parser</a> directly).</p>\n<p>To change the conversion, create a PHP class implementing <code translate=\"no\">Cecil\\Converter\\ConverterInterface</code> (its constructor receives the <code translate=\"no\">Cecil\\Builder</code> instance), or extending the default <code translate=\"no\">Cecil\\Converter\\Converter</code> class.</p>\n<p><strong>Example:</strong></p>\n<p><em>/extensions/MySite/Converter.php</em></p>\n<pre data-lang=\"php\"><code class=\"language-php hljs php\" translate=\"no\"><span class=\"hljs-meta\">&lt;?php</span>\n<span class=\"hljs-keyword\">namespace</span> <span class=\"hljs-title\">MySite</span>;\n\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">Converter</span> <span class=\"hljs-keyword\">extends</span> \\<span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Converter</span>\\<span class=\"hljs-title\">Converter</span>\n</span>{\n    <span class=\"hljs-keyword\">public</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span> <span class=\"hljs-title\">convertBody</span><span class=\"hljs-params\">(string $string, ?string $language = null)</span>: <span class=\"hljs-title\">string</span>\n    </span>{\n        <span class=\"hljs-comment\">// replaces `[[page-id]]` with a link, before the default conversion</span>\n        $string = preg_replace(<span class=\"hljs-string\">'/\\[\\[([a-z0-9-\\/]+)\\]\\]/'</span>, <span class=\"hljs-string\">'[$1]($1.md)'</span>, $string);\n\n        <span class=\"hljs-keyword\">return</span> <span class=\"hljs-keyword\">parent</span>::convertBody($string, $language);\n    }\n}</code></pre>\n<p><em>configuration</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">converter:</span> <span class=\"hljs-string\">MySite\\Converter</span></code></pre>\n<h2 id=\"markdown-parser\">Markdown parser<a class=\"heading-anchor\" href=\"#markdown-parser\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>To add your own Markdown syntax, replace the Markdown parser used by the default converter (and by the <code translate=\"no\">markdown_to_html</code> and <code translate=\"no\">toc</code> filters) with the <a href=\"../configuration/4-pages.md#pages-body-parser\"><code translate=\"no\">pages.body.parser</code></a> option.</p>\n<p>Create a PHP class extending <code translate=\"no\">Cecil\\Converter\\Parsedown</code>, based on <a href=\"https://github.com/erusev/parsedown\" target=\"_blank\" rel=\"noopener noreferrer\">Parsedown</a> (1.x) and <a href=\"https://github.com/erusev/parsedown-extra\" target=\"_blank\" rel=\"noopener noreferrer\">Parsedown Extra</a>, and register your syntax with its extension mechanism: a marker character in <code translate=\"no\">$this-&gt;InlineTypes</code> (or <code translate=\"no\">$this-&gt;BlockTypes</code>) refers to an <code translate=\"no\">inline&lt;Type&gt;()</code> method (or <code translate=\"no\">block&lt;Type&gt;()</code>, <code translate=\"no\">block&lt;Type&gt;Continue()</code> and <code translate=\"no\">block&lt;Type&gt;Complete()</code> methods).</p>\n<aside class=\"note note-warning\"><p>A custom parser relies on Parsedown internals: it may need to be updated when Cecil upgrades Parsedown.</p></aside>\n<p>The parser can also be created outside of a build (see <a href=\"2-library.md#markdown\">Library</a>): pass the options to the parent constructor, and do not rely on the state of a build (e.g. the pages collection).</p>\n<p><strong>Example:</strong></p>\n<p><em>/extensions/MySite/Parsedown.php</em></p>\n<pre data-lang=\"php\"><code class=\"language-php hljs php\" translate=\"no\"><span class=\"hljs-meta\">&lt;?php</span>\n<span class=\"hljs-keyword\">namespace</span> <span class=\"hljs-title\">MySite</span>;\n\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Builder</span>;\n\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">Parsedown</span> <span class=\"hljs-keyword\">extends</span> \\<span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Converter</span>\\<span class=\"hljs-title\">Parsedown</span>\n</span>{\n    <span class=\"hljs-keyword\">public</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span> <span class=\"hljs-title\">__construct</span><span class=\"hljs-params\">(Builder $builder, ?array $options = null)</span>\n    </span>{\n        <span class=\"hljs-keyword\">parent</span>::__construct($builder, $options);\n        <span class=\"hljs-comment\">// `==text==` → `&lt;mark&gt;text&lt;/mark&gt;`</span>\n        <span class=\"hljs-keyword\">$this</span>-&gt;InlineTypes[<span class=\"hljs-string\">'='</span>][] = <span class=\"hljs-string\">'Mark'</span>;\n        <span class=\"hljs-keyword\">$this</span>-&gt;inlineMarkerList .= <span class=\"hljs-string\">'='</span>;\n    }\n\n    <span class=\"hljs-keyword\">protected</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span> <span class=\"hljs-title\">inlineMark</span><span class=\"hljs-params\">($Excerpt)</span>\n    </span>{\n        <span class=\"hljs-keyword\">if</span> (preg_match(<span class=\"hljs-string\">'/^==(?=\\S)(.+?)(?&lt;=\\S)==/'</span>, $Excerpt[<span class=\"hljs-string\">'text'</span>], $matches)) {\n            <span class=\"hljs-keyword\">return</span> [\n                <span class=\"hljs-string\">'extent'</span>  =&gt; \\strlen($matches[<span class=\"hljs-number\">0</span>]),\n                <span class=\"hljs-string\">'element'</span> =&gt; [<span class=\"hljs-string\">'name'</span> =&gt; <span class=\"hljs-string\">'mark'</span>, <span class=\"hljs-string\">'text'</span> =&gt; $matches[<span class=\"hljs-number\">1</span>], <span class=\"hljs-string\">'handler'</span> =&gt; <span class=\"hljs-string\">'line'</span>],\n            ];\n        }\n\n        <span class=\"hljs-keyword\">return</span> <span class=\"hljs-keyword\">null</span>;\n    }\n}</code></pre>\n<p><em>configuration</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">body:</span>\n    <span class=\"hljs-attr\">parser:</span> <span class=\"hljs-string\">MySite\\Parsedown</span></code></pre>\n<h2 id=\"build-events\">Build events<a class=\"heading-anchor\" href=\"#build-events\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Events are dispatched during the build: listen to them to run your own code before or after the build, each step, or at each step of the life cycle of a page (e.g.: to create a search index, notify a service, or modify the output of pages).</p>\n<table>\n<thead>\n<tr>\n<th>Event</th>\n<th>Constant</th>\n<th>When</th>\n<th>Event class</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">build.start</code></td>\n<td><code translate=\"no\">BuildEvents::BUILD_START</code></td>\n<td>before the first step</td>\n<td><code translate=\"no\">BuildEvent</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">build.finished</code></td>\n<td><code translate=\"no\">BuildEvents::BUILD_FINISHED</code></td>\n<td>after the last step</td>\n<td><code translate=\"no\">BuildEvent</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">step.pre</code></td>\n<td><code translate=\"no\">BuildEvents::STEP_PRE</code></td>\n<td>before each step</td>\n<td><code translate=\"no\">StepEvent</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">step.post</code></td>\n<td><code translate=\"no\">BuildEvents::STEP_POST</code></td>\n<td>after each step</td>\n<td><code translate=\"no\">StepEvent</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.created</code></td>\n<td><code translate=\"no\">BuildEvents::PAGE_CREATED</code></td>\n<td>after a page is created from a content file</td>\n<td><code translate=\"no\">PageEvent</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.converted</code></td>\n<td><code translate=\"no\">BuildEvents::PAGE_CONVERTED</code></td>\n<td>after a published page is converted (front matter and body)</td>\n<td><code translate=\"no\">PageEvent</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.rendered</code></td>\n<td><code translate=\"no\">BuildEvents::PAGE_RENDERED</code></td>\n<td>after a page is rendered in a format (after post-processors)</td>\n<td><code translate=\"no\">PageRenderedEvent</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.saved</code></td>\n<td><code translate=\"no\">BuildEvents::PAGE_SAVED</code></td>\n<td>after a rendered page is saved to a file</td>\n<td><code translate=\"no\">PageSavedEvent</code></td>\n</tr>\n</tbody>\n</table>\n<p>Every event gives access to the build context (<code translate=\"no\">getBuilder()</code>) and options (<code translate=\"no\">getOptions()</code>); <code translate=\"no\">StepEvent</code> adds <code translate=\"no\">getStep()</code>, <code translate=\"no\">PageEvent</code> adds <code translate=\"no\">getPage()</code>, <code translate=\"no\">PageRenderedEvent</code> adds <code translate=\"no\">getFormat()</code>, <code translate=\"no\">getOutput()</code> and <code translate=\"no\">setOutput()</code>, <code translate=\"no\">PageSavedEvent</code> adds <code translate=\"no\">getFormat()</code> and <code translate=\"no\">getPathname()</code>.</p>\n<p>Create an <a href=\"https://symfony.com/doc/current/components/event_dispatcher.html#using-event-subscribers\" target=\"_blank\" rel=\"noopener noreferrer\">event subscriber</a> extending <code translate=\"no\">Cecil\\Event\\AbstractSubscriber</code> (which gives access to <code translate=\"no\">$this-&gt;builder</code> and <code translate=\"no\">$this-&gt;config</code>), and add it to the <code translate=\"no\">extensions.subscribers</code> list.</p>\n<p><strong>Example:</strong></p>\n<p><em>/extensions/MySite/SearchIndex.php</em></p>\n<pre data-lang=\"php\"><code class=\"language-php hljs php\" translate=\"no\"><span class=\"hljs-meta\">&lt;?php</span>\n<span class=\"hljs-keyword\">namespace</span> <span class=\"hljs-title\">MySite</span>;\n\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Event</span>\\<span class=\"hljs-title\">AbstractSubscriber</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Event</span>\\<span class=\"hljs-title\">BuildEvent</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Event</span>\\<span class=\"hljs-title\">BuildEvents</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Event</span>\\<span class=\"hljs-title\">PageEvent</span>;\n\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">SearchIndex</span> <span class=\"hljs-keyword\">extends</span> <span class=\"hljs-title\">AbstractSubscriber</span>\n</span>{\n    <span class=\"hljs-keyword\">private</span> <span class=\"hljs-keyword\">array</span> $index = [];\n\n    <span class=\"hljs-keyword\">public</span> <span class=\"hljs-keyword\">static</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span> <span class=\"hljs-title\">getSubscribedEvents</span><span class=\"hljs-params\">()</span>: <span class=\"hljs-title\">array</span>\n    </span>{\n        <span class=\"hljs-keyword\">return</span> [\n            BuildEvents::PAGE_CONVERTED =&gt; <span class=\"hljs-string\">'onPageConverted'</span>,\n            BuildEvents::BUILD_FINISHED =&gt; <span class=\"hljs-string\">'onBuildFinished'</span>,\n        ];\n    }\n\n    <span class=\"hljs-keyword\">public</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span> <span class=\"hljs-title\">onPageConverted</span><span class=\"hljs-params\">(PageEvent $event)</span>: <span class=\"hljs-title\">void</span>\n    </span>{\n        $page = $event-&gt;getPage();\n        <span class=\"hljs-keyword\">$this</span>-&gt;index[] = [<span class=\"hljs-string\">'title'</span> =&gt; $page-&gt;getVariable(<span class=\"hljs-string\">'title'</span>), <span class=\"hljs-string\">'path'</span> =&gt; $page-&gt;getPath()];\n    }\n\n    <span class=\"hljs-keyword\">public</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span> <span class=\"hljs-title\">onBuildFinished</span><span class=\"hljs-params\">(BuildEvent $event)</span>: <span class=\"hljs-title\">void</span>\n    </span>{\n        <span class=\"hljs-keyword\">if</span> ($event-&gt;getOptions()[<span class=\"hljs-string\">'dry-run'</span>]) {\n            <span class=\"hljs-keyword\">return</span>;\n        }\n        file_put_contents(<span class=\"hljs-keyword\">$this</span>-&gt;config-&gt;getOutputPath() . <span class=\"hljs-string\">'/search.json'</span>, json_encode(<span class=\"hljs-keyword\">$this</span>-&gt;index));\n    }\n}</code></pre>\n<p><em>configuration</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">extensions:</span>\n  <span class=\"hljs-attr\">subscribers:</span>\n    <span class=\"hljs-attr\">SearchIndex:</span> <span class=\"hljs-string\">MySite\\SearchIndex</span></code></pre>\n<aside class=\"note note-tip\"><p>When using Cecil as a <a href=\"2-library.md\">PHP library</a>, listeners can also be added directly to the dispatcher before the build: <code translate=\"no\">$builder-&gt;getEventDispatcher()-&gt;addListener(BuildEvents::PAGE_SAVED, $callable)</code>.</p></aside>\n<h2 id=\"plugins\">Plugins<a class=\"heading-anchor\" href=\"#plugins\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>A plugin is a single entry point that registers a set of extensions: generators, Twig extensions, post-processors, event subscribers and listeners, and default configuration. It's the recommended way to ship extensions with a theme: enabling the theme enables its plugin, with no other configuration.</p>\n<p>Create a PHP class extending <code translate=\"no\">Cecil\\Plugin\\AbstractPlugin</code> (which gives access to <code translate=\"no\">$this-&gt;builder</code> and <code translate=\"no\">$this-&gt;config</code>), and add it to the <code translate=\"no\">extensions.plugins</code> list.</p>\n<p><strong>Example:</strong></p>\n<p><em>/themes/example/extensions/Example/ExamplePlugin.php</em></p>\n<pre data-lang=\"php\"><code class=\"language-php hljs php\" translate=\"no\"><span class=\"hljs-meta\">&lt;?php</span>\n<span class=\"hljs-keyword\">namespace</span> <span class=\"hljs-title\">Example</span>;\n\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Event</span>\\<span class=\"hljs-title\">BuildEvents</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Plugin</span>\\<span class=\"hljs-title\">AbstractPlugin</span>;\n<span class=\"hljs-keyword\">use</span> <span class=\"hljs-title\">Cecil</span>\\<span class=\"hljs-title\">Plugin</span>\\<span class=\"hljs-title\">Registry</span>;\n\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">ExamplePlugin</span> <span class=\"hljs-keyword\">extends</span> <span class=\"hljs-title\">AbstractPlugin</span>\n</span>{\n    <span class=\"hljs-keyword\">public</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span> <span class=\"hljs-title\">register</span><span class=\"hljs-params\">(Registry $registry)</span>: <span class=\"hljs-title\">void</span>\n    </span>{\n        $registry\n            -&gt;config([<span class=\"hljs-string\">'example'</span> =&gt; [<span class=\"hljs-string\">'feed'</span> =&gt; [<span class=\"hljs-string\">'limit'</span> =&gt; <span class=\"hljs-number\">10</span>]]]) <span class=\"hljs-comment\">// default options</span>\n            -&gt;twigExtension(Twig\\ExampleExtension::class)\n            -&gt;generator(Generator\\Feed::class, priority: <span class=\"hljs-number\">35</span>)\n            -&gt;postProcessor(PostProcessor\\Minify::class)\n            -&gt;subscriber(SearchIndex::class)\n            -&gt;listen(BuildEvents::BUILD_FINISHED, fn () =&gt; <span class=\"hljs-keyword\">$this</span>-&gt;builder-&gt;getLogger()-&gt;notice(<span class=\"hljs-string\">'Example is ready'</span>));\n    }\n}</code></pre>\n<p><em>/themes/example/config.yml</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">extensions:</span>\n  <span class=\"hljs-attr\">plugins:</span>\n    <span class=\"hljs-attr\">Example:</span> <span class=\"hljs-string\">Example\\ExamplePlugin</span></code></pre>\n<p>Extensions registered by a plugin are named after their short class name (e.g.: <code translate=\"no\">Feed</code>), unless a <code translate=\"no\">name</code> is given, and use the default priority (<code translate=\"no\">100</code>) unless a <code translate=\"no\">priority</code> is given. The plugin configuration has the lowest precedence: the site (and themes) configuration can override its options, and disable (<code translate=\"no\">Feed: false</code>) or move (<code translate=\"no\">Feed: { priority: 45 }</code>) its extensions by name.</p>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/assets/images/",
      "url": "https://cloudflare.cecil.app/documentation/assets/images/",
      "title": "Images",
      "summary": "Resize, crop and convert images, generate responsive images and placeholders.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-20T00:00:00+00:00","content_text": "Images\nCecil provides Twig functions and filters to resize, crop and convert images, and to generate responsive images and placeholders.\nimage_srcset\nBuilds the HTML img srcset (responsive) attribute of an image asset.\n{{ image_srcset(asset) }}\nExample:\n{% set asset = asset(image_path) %}\n&lt;img src=\"{{ url(asset) }}\" width=\"{{ asset.width }}\" height=\"{{ asset.height }}\" alt=\"\" class=\"asset\" srcset=\"{{ image_srcset(asset) }}\" sizes=\"{{ image_sizes('asset') }}\"&gt;\nimage_sizes\nReturns the HTML img sizes attribute based on a CSS class name (see assets.images.responsive.sizes).\nIt should be used in conjunction with the image_srcset function (see the example above).\n{{ image_sizes('class') }}\nimage_from_website\nBuilds the HTML img element from a website URL by extracting its illustration image.\nReturns null if no image is found.\n{{ image_from_website('url', {attributes}, {options}) }}\nCandidates are searched in the page HTML in the following order; the first one that can be downloaded as an image is used:\n\nOpen Graph: og:image:secure_url, og:image, og:image:url\nTwitter: twitter:image, twitter:image:src\n&lt;link rel=\"image_src\"&gt;\nMicrodata: itemprop=\"image\"\nJSON-LD: image property\nFirst &lt;img&gt; of &lt;article&gt;, &lt;main&gt; or &lt;body&gt;\n&lt;link rel=\"apple-touch-icon\"&gt;\n&lt;link rel=\"icon\"&gt;\n\nRelative URLs are resolved against &lt;base href&gt; or the page URL.\nThe resolved image URL and the downloaded image are cached (see cache.assets.remote.ttl).\nOptions:\n\nfallback: image path (or URL) used if no image is found\nother image options (e.g.: responsive, formats)\n\nExamples:\n{{ image_from_website('https:\/\/example.com\/page-with-image.html') }}\n\n{# with a fallback image #}\n{{ image_from_website('https:\/\/example.com\/', {alt: 'Illustration'}, {fallback: 'images\/default.png'}) }}\nresize\nResizes an image to a specified width (in pixels) and\/or height (in pixels).\n\nIf only the width is specified, the height is calculated to preserve the aspect ratio\nIf only the height is specified, the width is calculated to preserve the aspect ratio\nIf both width and height are specified, the image is resized to fit within the given dimensions, then cropped and centered if necessary\nIf remove_animation is true, any animation in the image (e.g.: GIF) is removed\n\n{{ asset(image_path)|resize(width: width, height: height, remove_animation: bool) }}\nThe original file is not altered: the resized version is saved at \/thumbnails\/&lt;width&gt;x&lt;height&gt;\/&lt;path&gt; (prefixed by assets.target if set).\nICO files are supported: the largest icon is resized and saved as a single icon ICO file (PNG compressed). Icons stored as BMP with a color depth other than 24 or 32 bits require the Imagick PHP extension: otherwise, the original ICO file is kept and a warning is logged.\nExamples:\n{{ asset(page.image)|resize(300) }}\n{# equivalent to: #}\n{{ asset(page.image)|resize(width: 300) }}\n{# resizes to 200px height, width auto-calculated to preserve aspect ratio #}\n{{ asset(page.image)|resize(height: 200) }}\n{# resizes to 300px width and 200px height, and crops if necessary #}\n{{ asset(page.image)|resize(300, 200) }}\n{# removes any animation from the image #}\n{{ asset(page.image)|resize(width: 1200, height: 630, remove_animation: true) }}\ncover\nResizes an image to a specified width and height, cropping it if necessary.\nThe cover filter is deprecated since version 8.77 and will be removed in future versions. Use the resize filter instead, with both width and height parameters.\n{{ asset(image_path)|cover(width, height) }}\nExample:\n{{ asset(page.image)|cover(1200, 630) }}\nmaskable\nAdds padding, as a percentage of the image size (20 by default), to an image to make it maskable.\n{{ asset(image_path)|maskable(padding) }}\nExample:\n{{ asset('icon.png')|maskable }}\nwebp\nConverts an image to WebP format, with an optional quality (default: assets.images.quality).\n{{ asset(image_path)|webp(quality) }}\nExample:\n&lt;picture&gt;\n    &lt;source type=\"image\/webp\" srcset=\"{{ asset(image_path)|webp }}\"&gt;\n    &lt;img src=\"{{ url(asset(image_path)) }}\" width=\"{{ asset(image_path).width }}\" height=\"{{ asset(image_path).height }}\" alt=\"\"&gt;\n&lt;\/picture&gt;\navif\nConverts an image to AVIF format, with an optional quality (default: assets.images.quality).\n{{ asset(image_path)|avif(quality) }}\nExample:\n&lt;picture&gt;\n    &lt;source type=\"image\/avif\" srcset=\"{{ asset(image_path)|avif(60) }}\"&gt;\n    &lt;img src=\"{{ url(asset(image_path)) }}\" width=\"{{ asset(image_path).width }}\" height=\"{{ asset(image_path).height }}\" alt=\"\"&gt;\n&lt;\/picture&gt;\nWebP and AVIF support depends on the image driver available (Imagick, libvips or GD). The html function skips alternative formats (formats option) not supported by the driver.\nlqip\nReturns a Low Quality Image Placeholder (100 px wide, blurred) as data URL.\n{{ asset(image_path)|lqip }}\ndominant_color\nReturns the dominant color of an image, as a CSS color value (e.g. rgb(120 85 60)).\n{{ asset(image_path)|dominant_color }}",
      "content_html": "<h1>Images</h1>\n<p>Cecil provides Twig functions and filters to resize, crop and convert images, and to generate responsive images and placeholders.</p>\n<h2 id=\"image-srcset\">image_srcset<a class=\"heading-anchor\" href=\"#image-srcset\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Builds the HTML img <code translate=\"no\">srcset</code> (responsive) attribute of an image asset.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ image_srcset(asset) }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> asset = asset(image_path) %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(asset) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">width</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ asset.width }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">height</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ asset.height }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">alt</span>=<span class=\"hljs-string\">\"\"</span> <span class=\"hljs-attr\">class</span>=<span class=\"hljs-string\">\"asset\"</span> <span class=\"hljs-attr\">srcset</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ image_srcset(asset) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">sizes</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ image_sizes('asset') }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span></code></pre>\n<h2 id=\"image-sizes\">image_sizes<a class=\"heading-anchor\" href=\"#image-sizes\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Returns the HTML img <code translate=\"no\">sizes</code> attribute based on a CSS class name (see <a href=\"../configuration/6-assets.md#assets-images\"><code translate=\"no\">assets.images.responsive.sizes</code></a>).</p>\n<p>It should be used in conjunction with the <a href=\"#image-srcset\"><code translate=\"no\">image_srcset</code></a> function (see the example above).</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ image_sizes('class') }}</span></code></pre>\n<h2 id=\"image-from-website\">image_from_website<a class=\"heading-anchor\" href=\"#image-from-website\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Builds the HTML img element from a website URL by extracting its illustration image.\nReturns <code translate=\"no\">null</code> if no image is found.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ image_from_website('url', {attributes}, {options}) }}</span></code></pre>\n<p>Candidates are searched in the page HTML in the following order; the first one that can be downloaded as an image is used:</p>\n<ol>\n<li>Open Graph: <code translate=\"no\">og:image:secure_url</code>, <code translate=\"no\">og:image</code>, <code translate=\"no\">og:image:url</code></li>\n<li>Twitter: <code translate=\"no\">twitter:image</code>, <code translate=\"no\">twitter:image:src</code></li>\n<li><code translate=\"no\">&lt;link rel=\"image_src\"&gt;</code></li>\n<li>Microdata: <code translate=\"no\">itemprop=\"image\"</code></li>\n<li>JSON-LD: <code translate=\"no\">image</code> property</li>\n<li>First <code translate=\"no\">&lt;img&gt;</code> of <code translate=\"no\">&lt;article&gt;</code>, <code translate=\"no\">&lt;main&gt;</code> or <code translate=\"no\">&lt;body&gt;</code></li>\n<li><code translate=\"no\">&lt;link rel=\"apple-touch-icon\"&gt;</code></li>\n<li><code translate=\"no\">&lt;link rel=\"icon\"&gt;</code></li>\n</ol>\n<p>Relative URLs are resolved against <code translate=\"no\">&lt;base href&gt;</code> or the page URL.</p>\n<p>The resolved image URL and the downloaded image are cached (see <a href=\"../configuration/9-cache.md#cache-assets-remote-ttl\"><code translate=\"no\">cache.assets.remote.ttl</code></a>).</p>\n<p>Options:</p>\n<ul>\n<li><code translate=\"no\">fallback</code>: image path (or URL) used if no image is found</li>\n<li>other <a href=\"../templates/reference/1-functions.md#html\"><code translate=\"no\">image</code></a> options (e.g.: <code translate=\"no\">responsive</code>, <code translate=\"no\">formats</code>)</li>\n</ul>\n<p><em>Examples:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ image_from_website('https://example.com/page-with-image.html') }}</span><span class=\"xml\">\n\n</span><span class=\"hljs-comment\">{# with a fallback image #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ image_from_website('https://example.com/', {alt: 'Illustration'}, {fallback: 'images/default.png'}) }}</span></code></pre>\n<h2 id=\"resize\">resize<a class=\"heading-anchor\" href=\"#resize\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Resizes an image to a specified width (in pixels) and/or height (in pixels).</p>\n<ul>\n<li>If only the width is specified, the height is calculated to preserve the aspect ratio</li>\n<li>If only the height is specified, the width is calculated to preserve the aspect ratio</li>\n<li>If both width and height are specified, the image is resized to fit within the given dimensions, then cropped and centered if necessary</li>\n<li>If <code translate=\"no\">remove_animation</code> is <code translate=\"no\">true</code>, any animation in the image (e.g.: GIF) is removed</li>\n</ul>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset(image_path)|resize(width: width, height: height, remove_animation: bool) }}</span></code></pre>\n<aside class=\"note note-info\"><p>The original file is not altered: the resized version is saved at <code translate=\"no\">/thumbnails/&lt;width&gt;x&lt;height&gt;/&lt;path&gt;</code> (prefixed by <a href=\"../configuration/6-assets.md#assets-target\"><code translate=\"no\">assets.target</code></a> if set).</p></aside>\n<aside class=\"note note-tip\"><p>ICO files are supported: the largest icon is resized and saved as a single icon ICO file (PNG compressed). Icons stored as BMP with a color depth other than 24 or 32 bits require the <a href=\"https://www.php.net/manual/book.imagick.php\" target=\"_blank\" rel=\"noopener noreferrer\">Imagick</a> PHP extension: otherwise, the original ICO file is kept and a warning is logged.</p></aside>\n<p><em>Examples:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset(page.image)|resize(300) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# equivalent to: #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ asset(page.image)|resize(width: 300) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# resizes to 200px height, width auto-calculated to preserve aspect ratio #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ asset(page.image)|resize(height: 200) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# resizes to 300px width and 200px height, and crops if necessary #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ asset(page.image)|resize(300, 200) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# removes any animation from the image #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ asset(page.image)|resize(width: 1200, height: 630, remove_animation: true) }}</span></code></pre>\n<h2 id=\"cover\">cover<a class=\"heading-anchor\" href=\"#cover\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Resizes an image to a specified width and height, cropping it if necessary.</p>\n<aside class=\"note note-warning\"><p>The <code translate=\"no\">cover</code> filter is deprecated since version <ins>8.77</ins> and will be removed in future versions. Use the <a href=\"#resize\"><code translate=\"no\">resize</code></a> filter instead, with both width and height parameters.</p></aside>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset(image_path)|cover(width, height) }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset(page.image)|cover(1200, 630) }}</span></code></pre>\n<h2 id=\"maskable\">maskable<a class=\"heading-anchor\" href=\"#maskable\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Adds padding, as a percentage of the image size (<code translate=\"no\">20</code> by default), to an image to make it maskable.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset(image_path)|maskable(padding) }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset('icon.png')|maskable }}</span></code></pre>\n<h2 id=\"webp\">webp<a class=\"heading-anchor\" href=\"#webp\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Converts an image to <a href=\"https://developers.google.com/speed/webp\" target=\"_blank\" rel=\"noopener noreferrer\">WebP</a> format, with an optional quality (default: <a href=\"../configuration/6-assets.md#assets-images\"><code translate=\"no\">assets.images.quality</code></a>).</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset(image_path)|webp(quality) }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">picture</span>&gt;</span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">source</span> <span class=\"hljs-attr\">type</span>=<span class=\"hljs-string\">\"image/webp\"</span> <span class=\"hljs-attr\">srcset</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ asset(image_path)|webp }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(asset(image_path)) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">width</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ asset(image_path).width }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">height</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ asset(image_path).height }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">alt</span>=<span class=\"hljs-string\">\"\"</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">picture</span>&gt;</span></span></code></pre>\n<h2 id=\"avif\">avif<a class=\"heading-anchor\" href=\"#avif\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Converts an image to <a href=\"https://github.com/AOMediaCodec/libavif\" target=\"_blank\" rel=\"noopener noreferrer\">AVIF</a> format, with an optional quality (default: <a href=\"../configuration/6-assets.md#assets-images\"><code translate=\"no\">assets.images.quality</code></a>).</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset(image_path)|avif(quality) }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">picture</span>&gt;</span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">source</span> <span class=\"hljs-attr\">type</span>=<span class=\"hljs-string\">\"image/avif\"</span> <span class=\"hljs-attr\">srcset</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ asset(image_path)|avif(60) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(asset(image_path)) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">width</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ asset(image_path).width }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">height</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ asset(image_path).height }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">alt</span>=<span class=\"hljs-string\">\"\"</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">picture</span>&gt;</span></span></code></pre>\n<aside class=\"note note-info\"><p>WebP and AVIF support depends on the image driver available (Imagick, libvips or GD). The <code translate=\"no\">html</code> function skips alternative formats (<code translate=\"no\">formats</code> option) not supported by the driver.</p></aside>\n<h2 id=\"lqip\">lqip<a class=\"heading-anchor\" href=\"#lqip\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Returns a <a href=\"https://www.guypo.com/introducing-lqip-low-quality-image-placeholders\" target=\"_blank\" rel=\"noopener noreferrer\">Low Quality Image Placeholder</a> (100 px wide, blurred) as data URL.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset(image_path)|lqip }}</span></code></pre>\n<h2 id=\"dominant-color\">dominant_color<a class=\"heading-anchor\" href=\"#dominant-color\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Returns the dominant color of an image, as a <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb\" target=\"_blank\" rel=\"noopener noreferrer\">CSS color value</a> (e.g. <code translate=\"no\">rgb(120 85 60)</code>).</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset(image_path)|dominant_color }}</span></code></pre>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/configuration/site/",
      "url": "https://cloudflare.cecil.app/documentation/configuration/site/",
      "title": "Site options",
      "summary": "title, baseurl, menus, taxonomies, theme, date, metatags, debug, etc.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-11-30T00:00:00+00:00","content_text": "Site options\nThese options define the main settings of the site: title, URL, description, menus, taxonomies, theme, metatags, etc.\ntitle\nMain title of the site.\ntitle: \"&lt;site title&gt;\"\nbaseline\nShort description (~ 20 characters).\nbaseline: \"&lt;baseline&gt;\"\nbaseurl\nThe base URL.\nbaseurl: &lt;url&gt;\nExample:\nbaseurl: http:\/\/localhost:8000\/\nbaseurl should end with a trailing slash (\/).\ncanonicalurl\nIf set to true the url() function will return the absolute URL (false by default).\ncanonicalurl: &lt;true|false&gt; # false by default\ndescription\nSite description (~ 250 characters).\ndescription: \"&lt;description&gt;\"\nmenus\nMenus are used to create navigation links in templates.\nA menu is a list of entries, each defined by a unique ID and properties (name, URL, weight).\nmenus:\n  &lt;name&gt;:\n    - id: &lt;unique-id&gt;   # unique identifier (required)\n      name: \"&lt;name&gt;\"    # name displayed in templates\n      url: &lt;url&gt;        # relative or absolute URL\n      weight: &lt;integer&gt; # integer value used to sort entries (lighter first)\nThe configuration is validated when it is loaded: an entry without id, or a property of an invalid type (e.g. a non integer weight), stops the build with the path of the invalid item.\nExample:\nmenus:\n  main:\n    - id: about\n      name: \"About\"\n      url: \/about\/\n      weight: 1\n  footer:\n    - id: author\n      name: The author\n      url: https:\/\/arnaudligny.fr\n      weight: 99\nA main menu is automatically created with the home page entry and the top-level sections entries, unless they define their own menu variable (see content management).\nA page can be added to a menu by setting the menu variable in its front matter.\nOverride an entry\nA page menu entry can be overridden: use the page ID as id.\nThe 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.\nExample:\nmenus:\n  main:\n    - id: index\n      name: \"My amazing homepage!\"\n      weight: 1\nDisable an entry\nA menu entry can be disabled with enabled: false.\nExample:\nmenus:\n  main:\n    - id: about\n      enabled: false\ntaxonomies\nList of vocabularies, paired by plural and singular value.\ntaxonomies:\n  &lt;plural&gt;: &lt;singular&gt;\nEach vocabulary must be a non-empty string (disabled to disable a vocabulary, e.g. one declared by a theme).\nExample:\ntaxonomies:\n  categories: category\n  tags: tag\nThen you can use those vocabularies in your content’s front matter.\nSince version 8.37.0, default vocabularies category and tag have been removed. You must define them in the configuration file if you want to use them.\nA vocabulary can be disabled with the special value disabled. Example: tags: disabled.\ntheme\nThe theme to use, or a list of themes.\ntheme: &lt;theme&gt; # theme name\n# or\ntheme:\n  - &lt;theme1&gt; # theme name\n  - &lt;theme2&gt;\nThe first theme overrides the others, and so on.\nA theme can require other themes: they are enabled with it, after the themes of the list.\nExamples:\ntheme: hyde\ntheme:\n  - pwa\n  - hyde\nSee themes on GitHub or the themes section of the website.\ndate\nDate format and timezone.\ndate:\n  format: &lt;format&gt;     # date format (optional, `F j, Y` by default)\n  timezone: &lt;timezone&gt; # date timezone (optional, local time zone by default)\n\nformat: PHP date format specifier\ntimezone: see timezones\n\nExample:\ndate:\n  format: 'j F, Y'\n  timezone: 'Europe\/Paris'\nmetatags\nmetatags are SEO and social helpers that can be automatically injected in the &lt;head&gt;, with the template partials\/metatags.html.twig.\nThis template adds the following meta tags:\n\nPage title + Site title, or Site title + Site baseline\nPage\/Site description\nPage\/Site keywords\nPage\/Site author\nSearch engine crawler directives (robots)\nFavicon links\nNavigation links (first, previous, next, last)\nCanonical URL\nAlternate links (e.g.: RSS feed, other languages)\nrel=me links\nOpen Graph\nFacebook profile ID\nTwitter\/X Card\nFediverse tag\nDublin Core\nStructured data (JSON-LD)\n\nmetatags options\nCecil uses page front matter to feed meta tags, and falls back to site options when needed.\ntitle: \"Page\/Site title\"              # used by title meta\ndescription: \"Page\/Site description\"  # used by description meta\ntags: [tag1, tag2]                    # used by keywords meta\nkeywords: [keyword1, keyword2]        # obsolete in page front matter (use `tags`)\nauthor:                               # used by author meta\n  name: &lt;name&gt;                          # author name\n  url: &lt;url&gt;                            # author URL\n  email: &lt;email&gt;                        # author email\nimage: image.jpg                      # used by Open Graph and social networks cards\ncanonical:                            # used to override the generated canonical URL\n  url: &lt;URL&gt;                            # absolute URL\n  title: \"&lt;URL title&gt;\"                  # optional canonical title\nsocial:                               # used by social networks meta\n  twitter:                              # used by Twitter\/X Card\n    url: &lt;URL&gt;                            # used for `rel=me` link\n    site: username                        # site username\n    creator: username                     # page author username\n  mastodon:                             # used by Mastodon meta\n    url: &lt;URL&gt;                            # used for `rel=me` link\n    creator: handle                       # page author account\n  facebook:                             # used by Facebook meta\n    url: &lt;URL&gt;                            # used for `rel=me` link\n    id: 123456789                         # Facebook profile ID\n    username: username                    # page author username\nIn the configuration, author (a name or a map), image (a path or a URL) and social (a map of networks, each one being a map) are validated when the configuration is loaded: a property of an invalid type stops the build with the path of the invalid item. Other properties are allowed.\nIf needed, title and image can be overridden:\n{{ include('partials\/metatags.html.twig', {title: 'Custom title', image: 'images\/og.png'}) }}\nimage accepts a path or an asset.\nmetatags configuration\nmetatags:\n  title:                   # title options\n    divider: \" &amp;middot; \"    # string between page title and site title\n    only: false              # displays page title only (`false` by default)\n    pagination:              # pagination options\n      shownumber: true         # displays page number in title (`true` by default)\n      label: \"Page %s\"         # how to display page number (`Page %s` by default)\n  robots: \"index,follow\"   # web crawlers directives (`index,follow` by default)\n  favicon:                 # favicon options (set `favicon: false` to disable)\n    image: favicon.png       # path to favicon image (`favicon.png` by default)\n    sizes:                   # sizes by device\n      \"icon\": [32, 57, 76, 96, 128, 192, 228]  # web browsers\n      \"shortcut icon\": [128, 196]              # Android\n      \"apple-touch-icon\": [120, 152, 180]      # iOS\n  navigation: true         # includes previous and next links (`true` by default)\n  image: true              # includes image (`true` by default)\n  og: true                 # includes Open Graph meta tags (`true` by default)\n  articles: \"blog\"         # articles' section(s): a section or a list of sections (`blog` by default)\n  twitter: true            # includes Twitter\/X Card meta tags (`true` by default)\n  mastodon: true           # includes Mastodon meta tags (`true` by default)\n  dc: false                # includes Dublin Core meta tags (`false` by default)\n  data: false              # includes JSON-LD structured data (`false` by default), see below for options\nThese options are validated when the configuration is loaded: an option of an invalid type (e.g. og: yes, or a favicon size that is not an integer) stops the build with the path of the invalid item. Other options (e.g. used by a theme) are allowed.\nPages whose robots directives (metatags.robots in front matter, or the metatags.robots site option as fallback) contain noindex are excluded from the XML sitemap.\nStructured data\nWhen enabled, structured data are added as a JSON-LD graph of linked entities (schema.org):\n\nWebSite and its publisher (Organization or Person)\nWebPage (CollectionPage for the homepage, sections and taxonomies pages), except for the 404 page\nBreadcrumbList: home, ancestor sections (or vocabulary) and current page\nBlogPosting for pages of the articles' section(s) (see metatags.articles)\nVideoObject for pages with a video and an image (used as thumbnail)\nItemList of the main menu entries\n\nmetatags.data accepts true or a map of options:\nmetatags:\n  data:\n    enabled: true            # enables JSON-LD structured data (`true` if `data` is a map)\n    article: BlogPosting     # schema.org type of articles (`BlogPosting` by default, e.g. `NewsArticle`)\n    publisher:               # entity that publishes the site\n      type: Organization       # `Organization` (default) or `Person` (personal site)\n      name: &lt;name&gt;             # site title by default (site author name for a `Person`)\n      logo: logo.png           # favicon image (`favicon.png`) by default\n      url: &lt;url&gt;               # site URL by default\n      sameAs: [&lt;url&gt;, &lt;url&gt;]   # `url` of `social` entries by default\nThe page front matter can override some options:\nmetatags:\n  data:\n    enabled: false           # disables structured data for this page\n    type: AboutPage          # page type (e.g. `AboutPage`, `ContactPage`, `ProfilePage`, `FAQPage`)\n    article: NewsArticle     # article type\nThe author of an article is built from the author front matter (name, url, image, title) and from social.*.url page entries. Without author, the publisher is used.\nIn debug mode, the JSON-LD is pretty-printed to be human readable (unless HTML files are optimized).\ndebug\nEnables the debug mode, used to display debug information like very verbose logs, Twig dump, Twig profiler, SCSS sourcemap, etc.\ndebug: true\nThere are two other ways to enable debug mode:\n\nRun a command with the -vvv option\nSet the CECIL_DEBUG environment variable to true\n\n",
      "content_html": "<h1>Site options</h1>\n<p>These options define the main settings of the site: title, URL, description, menus, taxonomies, theme, metatags, etc.</p>\n<h2 id=\"title\">title<a class=\"heading-anchor\" href=\"#title\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Main title of the site.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">\"&lt;site title&gt;\"</span></code></pre>\n<h2 id=\"baseline\">baseline<a class=\"heading-anchor\" href=\"#baseline\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Short description (~ 20 characters).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">baseline:</span> <span class=\"hljs-string\">\"&lt;baseline&gt;\"</span></code></pre>\n<h2 id=\"baseurl\">baseurl<a class=\"heading-anchor\" href=\"#baseurl\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The base URL.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">baseurl:</span> <span class=\"hljs-string\">&lt;url&gt;</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">baseurl:</span> <span class=\"hljs-string\">http://localhost:8000/</span></code></pre>\n<aside class=\"note note-important\"><p><code translate=\"no\">baseurl</code> should end with a trailing slash (<code translate=\"no\">/</code>).</p></aside>\n<h2 id=\"canonicalurl\">canonicalurl<a class=\"heading-anchor\" href=\"#canonicalurl\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>If set to <code translate=\"no\">true</code> the <a href=\"../templates/reference/1-functions.md#url\"><code translate=\"no\">url()</code></a> function will return the absolute URL (<code translate=\"no\">false</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">canonicalurl:</span> <span class=\"hljs-string\">&lt;true|false&gt;</span> <span class=\"hljs-comment\"># false by default</span></code></pre>\n<h2 id=\"description\">description<a class=\"heading-anchor\" href=\"#description\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Site description (~ 250 characters).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">description:</span> <span class=\"hljs-string\">\"&lt;description&gt;\"</span></code></pre>\n<h2 id=\"menus\">menus<a class=\"heading-anchor\" href=\"#menus\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Menus are used to create <a href=\"../templates/2-variables.md#site-menus\">navigation links in templates</a>.</p>\n<p>A menu is a list of entries, each defined by a unique ID and properties (name, URL, weight).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">menus:</span>\n  <span class=\"hljs-string\">&lt;name&gt;:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">id:</span> <span class=\"hljs-string\">&lt;unique-id&gt;</span>   <span class=\"hljs-comment\"># unique identifier (required)</span>\n      <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">\"&lt;name&gt;\"</span>    <span class=\"hljs-comment\"># name displayed in templates</span>\n      <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">&lt;url&gt;</span>        <span class=\"hljs-comment\"># relative or absolute URL</span>\n      <span class=\"hljs-attr\">weight:</span> <span class=\"hljs-string\">&lt;integer&gt;</span> <span class=\"hljs-comment\"># integer value used to sort entries (lighter first)</span></code></pre>\n<p>The configuration is validated when it is loaded: an entry without <code translate=\"no\">id</code>, or a property of an invalid type (e.g. a non integer <code translate=\"no\">weight</code>), stops the build with the path of the invalid item.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">menus:</span>\n  <span class=\"hljs-attr\">main:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">id:</span> <span class=\"hljs-string\">about</span>\n      <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">\"About\"</span>\n      <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">/about/</span>\n      <span class=\"hljs-attr\">weight:</span> <span class=\"hljs-number\">1</span>\n  <span class=\"hljs-attr\">footer:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">id:</span> <span class=\"hljs-string\">author</span>\n      <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">The</span> <span class=\"hljs-string\">author</span>\n      <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">https://arnaudligny.fr</span>\n      <span class=\"hljs-attr\">weight:</span> <span class=\"hljs-number\">99</span></code></pre>\n<aside class=\"note note-info\"><p>A <code translate=\"no\">main</code> menu is automatically created with the home page entry and the top-level sections entries, unless they define their own <code translate=\"no\">menu</code> variable (see <a href=\"../content/index.md\">content management</a>).</p></aside>\n<aside class=\"note note-tip\"><p>A page can be added to a menu by setting the <a href=\"../content/2-front-matter.md#menu\"><code translate=\"no\">menu</code> variable</a> in its front matter.</p></aside>\n<h3 id=\"override-an-entry\">Override an entry<a class=\"heading-anchor\" href=\"#override-an-entry\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>A page menu entry can be overridden: use the page ID as <code translate=\"no\">id</code>.</p>\n<p>The ID of a page menu entry doesn't include the language prefix (e.g.: <code translate=\"no\">docs</code> for the <code translate=\"no\">fr/docs</code> page): the same <code translate=\"no\">id</code> targets the entry in every language.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">menus:</span>\n  <span class=\"hljs-attr\">main:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">id:</span> <span class=\"hljs-string\">index</span>\n      <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">\"My amazing homepage!\"</span>\n      <span class=\"hljs-attr\">weight:</span> <span class=\"hljs-number\">1</span></code></pre>\n<h3 id=\"disable-an-entry\">Disable an entry<a class=\"heading-anchor\" href=\"#disable-an-entry\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>A menu entry can be disabled with <code translate=\"no\">enabled: false</code>.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">menus:</span>\n  <span class=\"hljs-attr\">main:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">id:</span> <span class=\"hljs-string\">about</span>\n      <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">false</span></code></pre>\n<h2 id=\"taxonomies\">taxonomies<a class=\"heading-anchor\" href=\"#taxonomies\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>List of vocabularies, paired by plural and singular value.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">taxonomies:</span>\n  <span class=\"hljs-string\">&lt;plural&gt;:</span> <span class=\"hljs-string\">&lt;singular&gt;</span></code></pre>\n<p>Each vocabulary must be a non-empty string (<code translate=\"no\">disabled</code> to disable a vocabulary, e.g. one declared by a theme).</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">taxonomies:</span>\n  <span class=\"hljs-attr\">categories:</span> <span class=\"hljs-string\">category</span>\n  <span class=\"hljs-attr\">tags:</span> <span class=\"hljs-string\">tag</span></code></pre>\n<p>Then you can use those vocabularies in your content’s <a href=\"../content/2-front-matter.md#taxonomy\">front matter</a>.</p>\n<aside class=\"note note-warning\"><p>Since <ins>version 8.37.0</ins>, default vocabularies <code translate=\"no\">category</code> and <code translate=\"no\">tag</code> have been removed. You must define them in the configuration file if you want to use them.</p></aside>\n<aside class=\"note note-tip\"><p>A vocabulary can be disabled with the special value <code translate=\"no\">disabled</code>. Example: <code translate=\"no\">tags: disabled</code>.</p></aside>\n<h2 id=\"theme\">theme<a class=\"heading-anchor\" href=\"#theme\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The theme to use, or a list of themes.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">theme:</span> <span class=\"hljs-string\">&lt;theme&gt;</span> <span class=\"hljs-comment\"># theme name</span>\n<span class=\"hljs-comment\"># or</span>\n<span class=\"hljs-attr\">theme:</span>\n  <span class=\"hljs-bullet\">-</span> <span class=\"hljs-string\">&lt;theme1&gt;</span> <span class=\"hljs-comment\"># theme name</span>\n  <span class=\"hljs-bullet\">-</span> <span class=\"hljs-string\">&lt;theme2&gt;</span></code></pre>\n<aside class=\"note note-info\"><p>The first theme overrides the others, and so on.</p></aside>\n<aside class=\"note note-info\"><p>A theme can <a href=\"../templates/7-extend.md#required-themes\">require other themes</a>: they are enabled with it, after the themes of the list.</p></aside>\n<p><em>Examples:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">theme:</span> <span class=\"hljs-string\">hyde</span></code></pre>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">theme:</span>\n  <span class=\"hljs-bullet\">-</span> <span class=\"hljs-string\">pwa</span>\n  <span class=\"hljs-bullet\">-</span> <span class=\"hljs-string\">hyde</span></code></pre>\n<aside class=\"note note-info\"><p>See <a href=\"https://github.com/Cecilapp?q=theme#org-repositories\" target=\"_blank\" rel=\"noopener noreferrer\">themes on GitHub</a> or the <a href=\"https://cecil.app/themes/\" target=\"_blank\" rel=\"noopener noreferrer\">themes section</a> of the website.</p></aside>\n<h2 id=\"date\">date<a class=\"heading-anchor\" href=\"#date\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Date format and timezone.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">date:</span>\n  <span class=\"hljs-attr\">format:</span> <span class=\"hljs-string\">&lt;format&gt;</span>     <span class=\"hljs-comment\"># date format (optional, `F j, Y` by default)</span>\n  <span class=\"hljs-attr\">timezone:</span> <span class=\"hljs-string\">&lt;timezone&gt;</span> <span class=\"hljs-comment\"># date timezone (optional, local time zone by default)</span></code></pre>\n<ul>\n<li><code translate=\"no\">format</code>: <a href=\"https://php.net/date\" target=\"_blank\" rel=\"noopener noreferrer\">PHP date</a> format specifier</li>\n<li><code translate=\"no\">timezone</code>: see <a href=\"https://php.net/timezones\" target=\"_blank\" rel=\"noopener noreferrer\">timezones</a></li>\n</ul>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">date:</span>\n  <span class=\"hljs-attr\">format:</span> <span class=\"hljs-string\">'j F, Y'</span>\n  <span class=\"hljs-attr\">timezone:</span> <span class=\"hljs-string\">'Europe/Paris'</span></code></pre>\n<h2 id=\"metatags\">metatags<a class=\"heading-anchor\" href=\"#metatags\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p><em>metatags</em> are <abbr title=\"Search Engine Optimization\">SEO</abbr> and social helpers that can be automatically injected in the <code translate=\"no\">&lt;head&gt;</code>, with the template <a href=\"https://github.com/Cecilapp/Cecil/blob/main/resources/layouts/partials/metatags.html.twig\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">partials/metatags.html.twig</code></a>.</p>\n<p>This template adds the following meta tags:</p>\n<ul>\n<li>Page title + Site title, or Site title + Site baseline</li>\n<li>Page/Site description</li>\n<li>Page/Site keywords</li>\n<li>Page/Site author</li>\n<li>Search engine crawler directives (<em>robots</em>)</li>\n<li>Favicon links</li>\n<li>Navigation links (first, previous, next, last)</li>\n<li>Canonical URL</li>\n<li>Alternate links (e.g.: RSS feed, other languages)</li>\n<li><a href=\"https://developer.mozilla.org/docs/Web/HTML/Reference/Attributes/rel/me\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">rel=me</code></a> links</li>\n<li><a href=\"https://ogp.me\" target=\"_blank\" rel=\"noopener noreferrer\">Open Graph</a></li>\n<li>Facebook profile ID</li>\n<li><a href=\"https://developer.x.com/docs/x-for-websites/cards/guides/getting-started\" target=\"_blank\" rel=\"noopener noreferrer\">Twitter/X Card</a></li>\n<li><a href=\"https://blog.joinmastodon.org/2024/07/highlighting-journalism-on-mastodon/\" target=\"_blank\" rel=\"noopener noreferrer\">Fediverse tag</a></li>\n<li><a href=\"https://www.dublincore.org/specifications/dublin-core/dcmi-terms/\" target=\"_blank\" rel=\"noopener noreferrer\">Dublin Core</a></li>\n<li><a href=\"https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data\" target=\"_blank\" rel=\"noopener noreferrer\">Structured data</a> (JSON-LD)</li>\n</ul>\n<h3 id=\"metatags-options\">metatags options<a class=\"heading-anchor\" href=\"#metatags-options\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Cecil uses page front matter to feed meta tags, and falls back to site options when needed.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">\"Page/Site title\"</span>              <span class=\"hljs-comment\"># used by title meta</span>\n<span class=\"hljs-attr\">description:</span> <span class=\"hljs-string\">\"Page/Site description\"</span>  <span class=\"hljs-comment\"># used by description meta</span>\n<span class=\"hljs-attr\">tags:</span> <span class=\"hljs-string\">[tag1,</span> <span class=\"hljs-string\">tag2]</span>                    <span class=\"hljs-comment\"># used by keywords meta</span>\n<span class=\"hljs-attr\">keywords:</span> <span class=\"hljs-string\">[keyword1,</span> <span class=\"hljs-string\">keyword2]</span>        <span class=\"hljs-comment\"># obsolete in page front matter (use `tags`)</span>\n<span class=\"hljs-attr\">author:</span>                               <span class=\"hljs-comment\"># used by author meta</span>\n  <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">&lt;name&gt;</span>                          <span class=\"hljs-comment\"># author name</span>\n  <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">&lt;url&gt;</span>                            <span class=\"hljs-comment\"># author URL</span>\n  <span class=\"hljs-attr\">email:</span> <span class=\"hljs-string\">&lt;email&gt;</span>                        <span class=\"hljs-comment\"># author email</span>\n<span class=\"hljs-attr\">image:</span> <span class=\"hljs-string\">image.jpg</span>                      <span class=\"hljs-comment\"># used by Open Graph and social networks cards</span>\n<span class=\"hljs-attr\">canonical:</span>                            <span class=\"hljs-comment\"># used to override the generated canonical URL</span>\n  <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">&lt;URL&gt;</span>                            <span class=\"hljs-comment\"># absolute URL</span>\n  <span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">\"&lt;URL title&gt;\"</span>                  <span class=\"hljs-comment\"># optional canonical title</span>\n<span class=\"hljs-attr\">social:</span>                               <span class=\"hljs-comment\"># used by social networks meta</span>\n  <span class=\"hljs-attr\">twitter:</span>                              <span class=\"hljs-comment\"># used by Twitter/X Card</span>\n    <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">&lt;URL&gt;</span>                            <span class=\"hljs-comment\"># used for `rel=me` link</span>\n    <span class=\"hljs-attr\">site:</span> <span class=\"hljs-string\">username</span>                        <span class=\"hljs-comment\"># site username</span>\n    <span class=\"hljs-attr\">creator:</span> <span class=\"hljs-string\">username</span>                     <span class=\"hljs-comment\"># page author username</span>\n  <span class=\"hljs-attr\">mastodon:</span>                             <span class=\"hljs-comment\"># used by Mastodon meta</span>\n    <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">&lt;URL&gt;</span>                            <span class=\"hljs-comment\"># used for `rel=me` link</span>\n    <span class=\"hljs-attr\">creator:</span> <span class=\"hljs-string\">handle</span>                       <span class=\"hljs-comment\"># page author account</span>\n  <span class=\"hljs-attr\">facebook:</span>                             <span class=\"hljs-comment\"># used by Facebook meta</span>\n    <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">&lt;URL&gt;</span>                            <span class=\"hljs-comment\"># used for `rel=me` link</span>\n    <span class=\"hljs-attr\">id:</span> <span class=\"hljs-number\">123456789</span>                         <span class=\"hljs-comment\"># Facebook profile ID</span>\n    <span class=\"hljs-attr\">username:</span> <span class=\"hljs-string\">username</span>                    <span class=\"hljs-comment\"># page author username</span></code></pre>\n<p>In the configuration, <code translate=\"no\">author</code> (a name or a map), <code translate=\"no\">image</code> (a path or a URL) and <code translate=\"no\">social</code> (a map of networks, each one being a map) are validated when the configuration is loaded: a property of an invalid type stops the build with the path of the invalid item. Other properties are allowed.</p>\n<aside class=\"note note-tip\"><p>If needed, <code translate=\"no\">title</code> and <code translate=\"no\">image</code> can be overridden:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ <span class=\"hljs-name\">include</span><span class=\"hljs-params\">('partials/metatags.html.twig', {title: 'Custom title', image: 'images/og.png'})</span> }}</span></code></pre>\n<p><code translate=\"no\">image</code> accepts a path or an <a href=\"../assets/index.md\">asset</a>.</p></aside>\n<h3 id=\"metatags-configuration\">metatags configuration<a class=\"heading-anchor\" href=\"#metatags-configuration\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">metatags:</span>\n  <span class=\"hljs-attr\">title:</span>                   <span class=\"hljs-comment\"># title options</span>\n    <span class=\"hljs-attr\">divider:</span> <span class=\"hljs-string\">\" &amp;middot; \"</span>    <span class=\"hljs-comment\"># string between page title and site title</span>\n    <span class=\"hljs-attr\">only:</span> <span class=\"hljs-literal\">false</span>              <span class=\"hljs-comment\"># displays page title only (`false` by default)</span>\n    <span class=\"hljs-attr\">pagination:</span>              <span class=\"hljs-comment\"># pagination options</span>\n      <span class=\"hljs-attr\">shownumber:</span> <span class=\"hljs-literal\">true</span>         <span class=\"hljs-comment\"># displays page number in title (`true` by default)</span>\n      <span class=\"hljs-attr\">label:</span> <span class=\"hljs-string\">\"Page %s\"</span>         <span class=\"hljs-comment\"># how to display page number (`Page %s` by default)</span>\n  <span class=\"hljs-attr\">robots:</span> <span class=\"hljs-string\">\"index,follow\"</span>   <span class=\"hljs-comment\"># web crawlers directives (`index,follow` by default)</span>\n  <span class=\"hljs-attr\">favicon:</span>                 <span class=\"hljs-comment\"># favicon options (set `favicon: false` to disable)</span>\n    <span class=\"hljs-attr\">image:</span> <span class=\"hljs-string\">favicon.png</span>       <span class=\"hljs-comment\"># path to favicon image (`favicon.png` by default)</span>\n    <span class=\"hljs-attr\">sizes:</span>                   <span class=\"hljs-comment\"># sizes by device</span>\n      <span class=\"hljs-attr\">\"icon\":</span> <span class=\"hljs-string\">[32,</span> <span class=\"hljs-number\">57</span><span class=\"hljs-string\">,</span> <span class=\"hljs-number\">76</span><span class=\"hljs-string\">,</span> <span class=\"hljs-number\">96</span><span class=\"hljs-string\">,</span> <span class=\"hljs-number\">128</span><span class=\"hljs-string\">,</span> <span class=\"hljs-number\">192</span><span class=\"hljs-string\">,</span> <span class=\"hljs-number\">228</span><span class=\"hljs-string\">]</span>  <span class=\"hljs-comment\"># web browsers</span>\n      <span class=\"hljs-attr\">\"shortcut icon\":</span> <span class=\"hljs-string\">[128,</span> <span class=\"hljs-number\">196</span><span class=\"hljs-string\">]</span>              <span class=\"hljs-comment\"># Android</span>\n      <span class=\"hljs-attr\">\"apple-touch-icon\":</span> <span class=\"hljs-string\">[120,</span> <span class=\"hljs-number\">152</span><span class=\"hljs-string\">,</span> <span class=\"hljs-number\">180</span><span class=\"hljs-string\">]</span>      <span class=\"hljs-comment\"># iOS</span>\n  <span class=\"hljs-attr\">navigation:</span> <span class=\"hljs-literal\">true</span>         <span class=\"hljs-comment\"># includes previous and next links (`true` by default)</span>\n  <span class=\"hljs-attr\">image:</span> <span class=\"hljs-literal\">true</span>              <span class=\"hljs-comment\"># includes image (`true` by default)</span>\n  <span class=\"hljs-attr\">og:</span> <span class=\"hljs-literal\">true</span>                 <span class=\"hljs-comment\"># includes Open Graph meta tags (`true` by default)</span>\n  <span class=\"hljs-attr\">articles:</span> <span class=\"hljs-string\">\"blog\"</span>         <span class=\"hljs-comment\"># articles' section(s): a section or a list of sections (`blog` by default)</span>\n  <span class=\"hljs-attr\">twitter:</span> <span class=\"hljs-literal\">true</span>            <span class=\"hljs-comment\"># includes Twitter/X Card meta tags (`true` by default)</span>\n  <span class=\"hljs-attr\">mastodon:</span> <span class=\"hljs-literal\">true</span>           <span class=\"hljs-comment\"># includes Mastodon meta tags (`true` by default)</span>\n  <span class=\"hljs-attr\">dc:</span> <span class=\"hljs-literal\">false</span>                <span class=\"hljs-comment\"># includes Dublin Core meta tags (`false` by default)</span>\n  <span class=\"hljs-attr\">data:</span> <span class=\"hljs-literal\">false</span>              <span class=\"hljs-comment\"># includes JSON-LD structured data (`false` by default), see below for options</span></code></pre>\n<p>These options are validated when the configuration is loaded: an option of an invalid type (e.g. <code translate=\"no\">og: yes</code>, or a favicon size that is not an integer) stops the build with the path of the invalid item. Other options (e.g. used by a theme) are allowed.</p>\n<aside class=\"note note-info\"><p>Pages whose <code translate=\"no\">robots</code> directives (<code translate=\"no\">metatags.robots</code> in front matter, or the <code translate=\"no\">metatags.robots</code> site option as fallback) contain <code translate=\"no\">noindex</code> are excluded from the XML sitemap.</p></aside>\n<h3 id=\"structured-data\">Structured data<a class=\"heading-anchor\" href=\"#structured-data\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>When enabled, structured data are added as a <a href=\"https://json-ld.org\" target=\"_blank\" rel=\"noopener noreferrer\">JSON-LD</a> graph of linked entities (<a href=\"https://schema.org\" target=\"_blank\" rel=\"noopener noreferrer\">schema.org</a>):</p>\n<ul>\n<li><code translate=\"no\">WebSite</code> and its publisher (<code translate=\"no\">Organization</code> or <code translate=\"no\">Person</code>)</li>\n<li><code translate=\"no\">WebPage</code> (<code translate=\"no\">CollectionPage</code> for the homepage, sections and taxonomies pages), except for the 404 page</li>\n<li><code translate=\"no\">BreadcrumbList</code>: home, ancestor sections (or vocabulary) and current page</li>\n<li><code translate=\"no\">BlogPosting</code> for pages of the articles' section(s) (see <code translate=\"no\">metatags.articles</code>)</li>\n<li><code translate=\"no\">VideoObject</code> for pages with a video and an image (used as thumbnail)</li>\n<li><code translate=\"no\">ItemList</code> of the main menu entries</li>\n</ul>\n<p><code translate=\"no\">metatags.data</code> accepts <code translate=\"no\">true</code> or a map of options:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">metatags:</span>\n  <span class=\"hljs-attr\">data:</span>\n    <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">true</span>            <span class=\"hljs-comment\"># enables JSON-LD structured data (`true` if `data` is a map)</span>\n    <span class=\"hljs-attr\">article:</span> <span class=\"hljs-string\">BlogPosting</span>     <span class=\"hljs-comment\"># schema.org type of articles (`BlogPosting` by default, e.g. `NewsArticle`)</span>\n    <span class=\"hljs-attr\">publisher:</span>               <span class=\"hljs-comment\"># entity that publishes the site</span>\n      <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">Organization</span>       <span class=\"hljs-comment\"># `Organization` (default) or `Person` (personal site)</span>\n      <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">&lt;name&gt;</span>             <span class=\"hljs-comment\"># site title by default (site author name for a `Person`)</span>\n      <span class=\"hljs-attr\">logo:</span> <span class=\"hljs-string\">logo.png</span>           <span class=\"hljs-comment\"># favicon image (`favicon.png`) by default</span>\n      <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">&lt;url&gt;</span>               <span class=\"hljs-comment\"># site URL by default</span>\n      <span class=\"hljs-attr\">sameAs:</span> <span class=\"hljs-string\">[&lt;url&gt;,</span> <span class=\"hljs-string\">&lt;url&gt;]</span>   <span class=\"hljs-comment\"># `url` of `social` entries by default</span></code></pre>\n<p>The page front matter can override some options:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">metatags:</span>\n  <span class=\"hljs-attr\">data:</span>\n    <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">false</span>           <span class=\"hljs-comment\"># disables structured data for this page</span>\n    <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">AboutPage</span>          <span class=\"hljs-comment\"># page type (e.g. `AboutPage`, `ContactPage`, `ProfilePage`, `FAQPage`)</span>\n    <span class=\"hljs-attr\">article:</span> <span class=\"hljs-string\">NewsArticle</span>     <span class=\"hljs-comment\"># article type</span></code></pre>\n<aside class=\"note note-info\"><p>The author of an article is built from the <code translate=\"no\">author</code> front matter (<code translate=\"no\">name</code>, <code translate=\"no\">url</code>, <code translate=\"no\">image</code>, <code translate=\"no\">title</code>) and from <code translate=\"no\">social.*.url</code> page entries. Without author, the publisher is used.</p></aside>\n<aside class=\"note note-tip\"><p>In <a href=\"#debug\">debug mode</a>, the JSON-LD is pretty-printed to be human readable (unless HTML files are <a href=\"10-server.md#optimize\">optimized</a>).</p></aside>\n<h2 id=\"debug\">debug<a class=\"heading-anchor\" href=\"#debug\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Enables the <em>debug mode</em>, used to display debug information like very verbose logs, Twig dump, Twig profiler, SCSS sourcemap, etc.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">debug:</span> <span class=\"hljs-literal\">true</span></code></pre>\n<p>There are two other ways to enable <em>debug mode</em>:</p>\n<ol>\n<li>Run a command with the <code translate=\"no\">-vvv</code> option</li>\n<li>Set the <code translate=\"no\">CECIL_DEBUG</code> environment variable to <code translate=\"no\">true</code></li>\n</ol>\n<hr>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/content/pages/",
      "url": "https://cloudflare.cecil.app/documentation/content/pages/",
      "title": "Pages and sections",
      "summary": "Anatomy of a page, file prefix, sections, sub-sections and home page.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "Pages and sections\nA page is a file made up of a front matter and a body.\nPages are files stored in the pages\/ directory, with one of the following extensions: md, markdown, mdown, mkdn, mkd, text or txt (see pages.ext).\nA README.md file is handled as an index.md file (e.g.: blog\/README.md is the index of the blog Section).\nFront matter\nThe front matter is a collection of variables (in key\/value format) surrounded by ---.\nExample:\n---\ntitle: \"The title\"\ndate: 2019-02-21\ntags: [tag 1, tag 2]\ncustomvar: \"Value of customvar\"\n---\nYou can also use &lt;!-- --&gt; or +++ as separator.\nBody\nThe body is the main content of a page; it can be written in Markdown or in plain text.\nExample:\n# Header\n\n[toc]\n\n## Sub-Header 1\n\nLorem ipsum dolor [sit amet](https:\/\/example.com), consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n&lt;!-- excerpt --&gt;\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n## Sub-Header 2\n\n![Description](\/image.jpg \"Title\")\n\n## Sub-Header 3\n\n:::tip\nThis is advice.\n:::\nFile prefix\nThe filename can contain a prefix to define date or weight variables of the page (used by sortby).\nDefault prefix separators: _ and -.\nYou can customize them with the pages.prefix.separator option.\ndate\nThe date prefix is used to set the date of the page, and must be a valid date format (i.e.: YYYY-MM-DD).\nExample:\nIn 2019-04-23_My blog post.md:\n\nthe prefix is 2019-04-23\nthe date of the page is 2019-04-23\nthe title of the page is My blog post\n\nweight\nThe weight prefix is used to set the sort order of the page, and must be a valid integer value.\nExample:\nIn 1_The first project.md:\n\nthe prefix is 1\nthe weight of the page is 1\nthe title of the page is The first project\n\nSection\nSome dedicated variables can be used in a custom Section (i.e.: &lt;section&gt;\/index.md).\nsortby\nThe order of pages in a Section can be changed.\nAvailable values are:\n\ndate: more recent first\nupdated: more recently updated first\ntitle: alphabetic order\nweight: lightest first\n\nExample:\n---\nsortby: title\n---\nMore options:\n---\nsortby:\n  variable: date    # \"date\", \"updated\", \"title\" or \"weight\"\n  desc_title: false # used with \"date\" or \"updated\" variable value to sort by desc title order if items have the same date\n  reverse: false    # reversed if true\n---\npagination\nThe global pagination configuration is used by default, but you can change it for a specific Section.\nExample:\n---\npagination:\n  max: 5\n  path: \"page\"\n---\nPagination can be disabled for a Section:\n---\npagination: false\n---\nIf pagination is disabled globally, it can be enabled for a Section (max and path default to the global configuration):\n---\npagination:\n  enabled: true\n  max: 5\n---\ncascade\nAny variables in cascade are added to the front matter of all pages of the Section (including pages of its sub-sections).\nExample:\n---\ncascade:\n  banner: image.jpg\n---\nExisting variables are not overridden.\ncircular\nSet circular to true to enable circular navigation with page.&lt;prev\/next&gt;.\nWith sub-sections, only the circular value of the top level Section is used.\nExample:\n---\ncircular: true\n---\nSub-section\nA nested folder that explicitly contains an index.md file is turned into a sub-section of its parent Section.\n&lt;mywebsite&gt;\n└─ pages\n   └─ blog                 &lt;- Section\n      ├─ index.md\n      ├─ post-1.md         &lt;- Page in Section \"blog\"\n      └─ 2024              &lt;- Sub-section (contains an \"index.md\")\n         ├─ index.md\n         └─ post-2.md      &lt;- Page in Section \"blog\" *and* sub-section \"blog\/2024\"\nA sub-section:\n\nis a Section (same type, variables and layout resolution) available at its own URL (e.g.: \/blog\/2024\/)\nis rendered with the layouts of its parent Sections if it doesn't have its own (e.g.: blog\/list.html.twig)\ncan be nested at any depth (e.g.: blog\/2024\/06\/)\nlists its own pages, and its pages also belong to each of their parent Sections\nis not listed in its parent Section\nis placed in the page.&lt;prev\/next&gt; navigation of its parent Section (according to its sortby), followed by its own pages\n\nA nested folder without an index.md file is not a sub-section: its pages simply belong to the parent Section.\nHome page\nThe Home page is the pages\/index.md file.\nLike any other Section, the Home page supports sortby and pagination configuration.\npagesfrom\nSet a valid Section name in pagesfrom to use pages collection from this Section in Home page.\nExample:\n---\npagesfrom: blog\n---",
      "content_html": "<h1>Pages and sections</h1>\n<p>A page is a file made up of a <a href=\"#front-matter\"><strong>front matter</strong></a> and a <a href=\"#body\"><strong>body</strong></a>.</p>\n<aside class=\"note note-info\"><p>Pages are files stored in the <code translate=\"no\">pages/</code> directory, with one of the following extensions: <code translate=\"no\">md</code>, <code translate=\"no\">markdown</code>, <code translate=\"no\">mdown</code>, <code translate=\"no\">mkdn</code>, <code translate=\"no\">mkd</code>, <code translate=\"no\">text</code> or <code translate=\"no\">txt</code> (see <a href=\"../configuration/4-pages.md#pages-ext\"><code translate=\"no\">pages.ext</code></a>).</p>\n<p>A <code translate=\"no\">README.md</code> file is handled as an <code translate=\"no\">index.md</code> file (e.g.: <code translate=\"no\">blog/README.md</code> is the index of the <code translate=\"no\">blog</code> <em>Section</em>).</p></aside>\n<h2 id=\"front-matter\">Front matter<a class=\"heading-anchor\" href=\"#front-matter\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The <em>front matter</em> is a collection of <a href=\"2-front-matter.md\">variables</a> (in <em>key/value</em> format) surrounded by <code translate=\"no\">---</code>.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">\"The title\"</span>\n<span class=\"hljs-attr\">date:</span> <span class=\"hljs-number\">2019</span><span class=\"hljs-number\">-02</span><span class=\"hljs-number\">-21</span>\n<span class=\"hljs-attr\">tags:</span> <span class=\"hljs-string\">[tag</span> <span class=\"hljs-number\">1</span><span class=\"hljs-string\">,</span> <span class=\"hljs-string\">tag</span> <span class=\"hljs-number\">2</span><span class=\"hljs-string\">]</span>\n<span class=\"hljs-attr\">customvar:</span> <span class=\"hljs-string\">\"Value of customvar\"</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<aside class=\"note note-info\"><p>You can also use <code translate=\"no\">&lt;!-- --&gt;</code> or <code translate=\"no\">+++</code> as separator.</p></aside>\n<h2 id=\"body\">Body<a class=\"heading-anchor\" href=\"#body\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The <em>body</em> is the main content of a page; it can be written in <a href=\"3-markdown.md\">Markdown</a> or in plain text.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\"><span class=\"hljs-section\"># Header</span>\n\n[toc]\n\n<span class=\"hljs-section\">## Sub-Header 1</span>\n\nLorem ipsum dolor [<span class=\"hljs-string\">sit amet</span>](<span class=\"hljs-link\">https://example.com</span>), consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n<span class=\"xml\"><span class=\"hljs-comment\">&lt;!-- excerpt --&gt;</span></span>\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n<span class=\"hljs-section\">## Sub-Header 2</span>\n\n![<span class=\"hljs-string\">Description</span>](<span class=\"hljs-link\">/image.jpg \"Title\"</span>)\n\n<span class=\"hljs-section\">## Sub-Header 3</span>\n\n:::tip\nThis is advice.\n:::</code></pre>\n<h2 id=\"file-prefix\">File prefix<a class=\"heading-anchor\" href=\"#file-prefix\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The filename can contain a prefix to define <code translate=\"no\">date</code> or <code translate=\"no\">weight</code> variables of the page (used by <a href=\"../templates/reference/2-sorts.md#sort-by-date\"><code translate=\"no\">sortby</code></a>).</p>\n<aside class=\"note note-info\"><p>Default prefix separators: <code translate=\"no\">_</code> and <code translate=\"no\">-</code>.</p>\n<p>You can customize them with the <a href=\"../configuration/4-pages.md#pages-prefix-separator\"><code translate=\"no\">pages.prefix.separator</code></a> option.</p></aside>\n<h3 id=\"date\">date<a class=\"heading-anchor\" href=\"#date\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>The <em>date prefix</em> is used to set the <code translate=\"no\">date</code> of the page, and must be a valid date format (i.e.: <code translate=\"no\">YYYY-MM-DD</code>).</p>\n<p><em>Example:</em></p>\n<p>In <code translate=\"no\">2019-04-23_My blog post.md</code>:</p>\n<ul>\n<li>the prefix is <code translate=\"no\">2019-04-23</code></li>\n<li>the <code translate=\"no\">date</code> of the page is <code translate=\"no\">2019-04-23</code></li>\n<li>the <code translate=\"no\">title</code> of the page is <code translate=\"no\">My blog post</code></li>\n</ul>\n<h3 id=\"weight\">weight<a class=\"heading-anchor\" href=\"#weight\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>The <em>weight prefix</em> is used to set the sort order of the page, and must be a valid integer value.</p>\n<p><em>Example:</em></p>\n<p>In <code translate=\"no\">1_The first project.md</code>:</p>\n<ul>\n<li>the prefix is <code translate=\"no\">1</code></li>\n<li>the <code translate=\"no\">weight</code> of the page is <code translate=\"no\">1</code></li>\n<li>the <code translate=\"no\">title</code> of the page is <code translate=\"no\">The first project</code></li>\n</ul>\n<h2 id=\"section\">Section<a class=\"heading-anchor\" href=\"#section\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Some dedicated variables can be used in a custom <em>Section</em> (i.e.: <code translate=\"no\">&lt;section&gt;/index.md</code>).</p>\n<h3 id=\"sortby\">sortby<a class=\"heading-anchor\" href=\"#sortby\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>The order of pages in a <em>Section</em> can be changed.</p>\n<p>Available values are:</p>\n<ul>\n<li><code translate=\"no\">date</code>: more recent first</li>\n<li><code translate=\"no\">updated</code>: more recently updated first</li>\n<li><code translate=\"no\">title</code>: alphabetic order</li>\n<li><code translate=\"no\">weight</code>: lightest first</li>\n</ul>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">sortby:</span> <span class=\"hljs-string\">title</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<p><strong>More options:</strong></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">sortby:</span>\n  <span class=\"hljs-attr\">variable:</span> <span class=\"hljs-string\">date</span>    <span class=\"hljs-comment\"># \"date\", \"updated\", \"title\" or \"weight\"</span>\n  <span class=\"hljs-attr\">desc_title:</span> <span class=\"hljs-literal\">false</span> <span class=\"hljs-comment\"># used with \"date\" or \"updated\" variable value to sort by desc title order if items have the same date</span>\n  <span class=\"hljs-attr\">reverse:</span> <span class=\"hljs-literal\">false</span>    <span class=\"hljs-comment\"># reversed if true</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<h3 id=\"pagination\">pagination<a class=\"heading-anchor\" href=\"#pagination\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>The global <a href=\"../configuration/4-pages.md#pages-pagination\">pagination configuration</a> is used by default, but you can change it for a specific <em>Section</em>.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">pagination:</span>\n  <span class=\"hljs-attr\">max:</span> <span class=\"hljs-number\">5</span>\n  <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">\"page\"</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<p>Pagination can be disabled for a <em>Section</em>:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">pagination:</span> <span class=\"hljs-literal\">false</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<p>If pagination is <a href=\"../configuration/4-pages.md#disable-pagination\">disabled globally</a>, it can be enabled for a <em>Section</em> (<code translate=\"no\">max</code> and <code translate=\"no\">path</code> default to the global configuration):</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">pagination:</span>\n  <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">true</span>\n  <span class=\"hljs-attr\">max:</span> <span class=\"hljs-number\">5</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<h3 id=\"cascade\">cascade<a class=\"heading-anchor\" href=\"#cascade\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Any variables in <code translate=\"no\">cascade</code> are added to the front matter of all pages of the <em>Section</em> (including pages of its <a href=\"#sub-section\">sub-sections</a>).</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">cascade:</span>\n  <span class=\"hljs-attr\">banner:</span> <span class=\"hljs-string\">image.jpg</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<aside class=\"note note-info\"><p>Existing variables are not overridden.</p></aside>\n<h3 id=\"circular\">circular<a class=\"heading-anchor\" href=\"#circular\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Set <code translate=\"no\">circular</code> to <code translate=\"no\">true</code> to enable circular navigation with <a href=\"../templates/2-variables.md#page-prev-next\"><em>page.&lt;prev/next&gt;</em></a>.</p>\n<aside class=\"note note-info\"><p>With <a href=\"#sub-section\">sub-sections</a>, only the <code translate=\"no\">circular</code> value of the top level <em>Section</em> is used.</p></aside>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">circular:</span> <span class=\"hljs-literal\">true</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<h3 id=\"sub-section\">Sub-section<a class=\"heading-anchor\" href=\"#sub-section\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>A nested folder that explicitly contains an <code translate=\"no\">index.md</code> file is turned into a <em>sub-section</em> of its parent <em>Section</em>.</p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">&lt;mywebsite&gt;\n└─ pages\n   └─ blog                 &lt;- Section\n      ├─ index.md\n      ├─ post-1.md         &lt;- Page in Section \"blog\"\n      └─ 2024              &lt;- Sub-section (contains an \"index.md\")\n         ├─ index.md\n         └─ post-2.md      &lt;- Page in Section \"blog\" *and* sub-section \"blog/2024\"</code></pre>\n<p>A <em>sub-section</em>:</p>\n<ul>\n<li>is a <em>Section</em> (same type, variables and <a href=\"../templates/1-lookup-rules.md#type-section\">layout</a> resolution) available at its own URL (e.g.: <code translate=\"no\">/blog/2024/</code>)</li>\n<li>is rendered with the layouts of its parent <em>Sections</em> if it doesn't have its own (e.g.: <code translate=\"no\">blog/list.html.twig</code>)</li>\n<li>can be nested at any depth (e.g.: <code translate=\"no\">blog/2024/06/</code>)</li>\n<li>lists its own pages, and its pages also belong to each of their parent <em>Sections</em></li>\n<li>is <strong>not</strong> listed in its parent <em>Section</em></li>\n<li>is placed in the <a href=\"../templates/2-variables.md#page-prev-next\"><em>page.&lt;prev/next&gt;</em></a> navigation of its parent <em>Section</em> (according to its <code translate=\"no\">sortby</code>), followed by its own pages</li>\n</ul>\n<aside class=\"note note-info\"><p>A nested folder <strong>without</strong> an <code translate=\"no\">index.md</code> file is not a <em>sub-section</em>: its pages simply belong to the parent <em>Section</em>.</p></aside>\n<h2 id=\"home-page\">Home page<a class=\"heading-anchor\" href=\"#home-page\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The <em>Home page</em> is the <code translate=\"no\">pages/index.md</code> file.</p>\n<p>Like any other <em>Section</em>, the <em>Home page</em> supports <code translate=\"no\">sortby</code> and <code translate=\"no\">pagination</code> configuration.</p>\n<h3 id=\"pagesfrom\">pagesfrom<a class=\"heading-anchor\" href=\"#pagesfrom\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Set a valid <em>Section</em> name in <code translate=\"no\">pagesfrom</code> to use pages collection from this <em>Section</em> in <em>Home page</em>.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">pagesfrom:</span> <span class=\"hljs-string\">blog</span>\n<span class=\"hljs-meta\">---</span></code></pre>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/templates/lookup-rules/",
      "url": "https://cloudflare.cecil.app/documentation/templates/lookup-rules/",
      "title": "Organization and lookup rules",
      "summary": "Kinds of templates, naming convention, built-in templates and how a template is chosen for a page.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "Organization and lookup rules\nCecil renders pages with Twig templates: this page explains how templates are organized and how the right one is chosen for each page.\nFiles organization\nKinds of templates\nThere are three kinds of templates: layouts, components, and other templates. Layouts are used to render pages, and each layout can include templates and components.\nNaming convention\nTemplate files are stored in the layouts\/ directory and must be named according to the following convention:\nlayouts\/(&lt;section&gt;\/)&lt;type&gt;|&lt;layout&gt;.&lt;format&gt;(.&lt;language&gt;).twig\n\n&lt;section&gt; (optional)\nThe section of the page (e.g.: blog).\n&lt;type&gt;\nThe template type: home (or index) for the homepage, list for list pages (homepage and sections), page for a page, etc. (See Lookup rules for details).\n&lt;layout&gt; (optional)\nThe custom layout name defined in the front matter of the page (e.g.: layout: my-layout).\n&lt;format&gt;\nThe output format of the rendered page (e.g.: html, rss, json, xml, etc.).\n&lt;language&gt; (optional)\nThe language of the page (e.g.: fr).\n\nExamples:\nlayouts\/home.html.twig       # `type` is \"homepage\"\nlayouts\/page.html.twig       # `type` is \"page\"\nlayouts\/page.html.fr.twig    # `type` is \"page\" and `language` is \"fr\"\nlayouts\/my-layout.html.twig  # `layout` is \"my-layout\"\nlayouts\/blog\/list.html.twig  # `section` is \"blog\"\nlayouts\/blog\/list.rss.twig   # `section` is \"blog\" and `format` is \"rss\"\n&lt;my-site&gt;\n├─ ...\n├─ layouts\n|  ├─ index.html.twig      # Used by type \"homepage\"\n|  ├─ list.html.twig       # Used by types \"homepage\" and \"section\"\n|  ├─ list.rss.twig        # Used by types \"homepage\" and \"section\", for RSS output format\n|  ├─ page.html.twig       # Used by type \"page\"\n|  ├─ taxonomy\n|  |  ├─ tags.html.twig    # Used by type \"vocabulary\" of `tags` (list of terms)\n|  |  └─ tag.html.twig     # Used by type \"term\" of `tags` (list of pages)\n|  ├─ my-layout.html.twig  # Used by pages with `layout: my-layout` in the front matter\n|  ├─ ...\n|  └─ partials             # Included templates\n|     ├─ footer.html.twig\n|     └─ ...\n└─ themes                  # Themes layouts and templates\n   └─ ...\nBuilt-in templates\nCecil comes with a set of built-in templates.\nIf you need to modify built-in templates, you can easily extract them via the following command: they will be copied into the layouts directory of your site.\nphp cecil.phar util:templates:extract\nLookup rules\nIn most cases you don’t need to specify the layout: Cecil selects the most appropriate layout, according to the page type.\nFor example, the HTML output of the home page (index.md) will be rendered:\n\nwith my-layout.html.twig if the layout variable is set to \"my-layout\" (in the front matter)\nif not, with index.html.twig if the file exists\nif not, with home.html.twig if the file exists\nif not, with list.html.twig if the file exists\n\nAll rules are detailed below, for each page type, in the priority order.\nEach candidate template is searched in the layouts\/ directory of the site, then in the layouts\/ directory of each theme (in the configured order), then in the built-in templates. The first file found is used.\nFor a page in a language other than the default one, the localized variant of each candidate (e.g.: page.html.fr.twig) is tried first: all localized candidates are looked up before the non-localized ones.\nType homepage\n\n&lt;layout&gt;.&lt;format&gt;.twig\nindex.&lt;format&gt;.twig\nhome.&lt;format&gt;.twig\nlist.&lt;format&gt;.twig\n_default\/&lt;layout&gt;.&lt;format&gt;.twig\n_default\/index.&lt;format&gt;.twig\n_default\/home.&lt;format&gt;.twig\n_default\/list.&lt;format&gt;.twig\n_default\/page.&lt;format&gt;.twig\n\nType page\n\n&lt;section&gt;\/&lt;layout&gt;.&lt;format&gt;.twig\n&lt;layout&gt;.&lt;format&gt;.twig\n&lt;section&gt;\/page.&lt;format&gt;.twig\n_default\/&lt;layout&gt;.&lt;format&gt;.twig\npage.&lt;format&gt;.twig\n_default\/page.&lt;format&gt;.twig\n\nType section\n\n&lt;layout&gt;.&lt;format&gt;.twig\n&lt;section&gt;\/index.&lt;format&gt;.twig\n&lt;section&gt;\/list.&lt;format&gt;.twig\nsection\/&lt;section&gt;.&lt;format&gt;.twig\n&lt;parent&gt;\/index.&lt;format&gt;.twig, &lt;parent&gt;\/list.&lt;format&gt;.twig and section\/&lt;parent&gt;.&lt;format&gt;.twig, for each parent section of a sub-section (nearest first)\n_default\/section.&lt;format&gt;.twig\nlist.&lt;format&gt;.twig\n_default\/list.&lt;format&gt;.twig\n\nThe &lt;section&gt; of a sub-section is its full path (e.g.: blog\/2024), and a sub-section falls back to the templates of its parent sections: if blog\/2024\/list.html.twig doesn’t exist, the sub-section blog\/2024 is rendered with blog\/list.html.twig.\nThe name used as &lt;section&gt; (for a section and its pages) can be mapped to the layouts of another section with the layouts.sections option.\nType vocabulary\n\ntaxonomy\/&lt;plural&gt;.&lt;format&gt;.twig\nvocabulary.&lt;format&gt;.twig\n_default\/vocabulary.&lt;format&gt;.twig\n\nType term\n\ntaxonomy\/&lt;plural&gt;\/&lt;term&gt;.&lt;format&gt;.twig\ntaxonomy\/&lt;singular&gt;.&lt;format&gt;.twig\nterm.&lt;format&gt;.twig\n_default\/term.&lt;format&gt;.twig\n_default\/list.&lt;format&gt;.twig\n\nThe vocabulary template is named after the plural (e.g.: taxonomy\/categories.html.twig for \/categories\/), whereas the term template is named after the singular (e.g.: taxonomy\/category.html.twig for \/categories\/data-sovereignty\/).\n&lt;term&gt; is the slugified term name: a dedicated template for the term \"Data Sovereignty\" of the categories vocabulary is taxonomy\/categories\/data-sovereignty.html.twig.\nMost of those layouts are available by default (in _default\/), see built-in templates.",
      "content_html": "<h1>Organization and lookup rules</h1>\n<p>Cecil renders pages with Twig templates: this page explains how templates are organized and how the right one is chosen for each page.</p>\n<h2 id=\"files-organization\">Files organization<a class=\"heading-anchor\" href=\"#files-organization\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<h3 id=\"kinds-of-templates\">Kinds of templates<a class=\"heading-anchor\" href=\"#kinds-of-templates\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>There are three kinds of templates: <strong><em>layouts</em></strong>, <strong><em>components</em></strong>, and <strong><em>other templates</em></strong>. <em>Layouts</em> are used to render <a href=\"../content/1-pages.md\">pages</a>, and each layout can <a href=\"https://twig.symfony.com/doc/templates.html#including-other-templates\" target=\"_blank\" rel=\"noopener noreferrer\">include templates</a> and <a href=\"4-components.md\">components</a>.</p>\n<h3 id=\"naming-convention\">Naming convention<a class=\"heading-anchor\" href=\"#naming-convention\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Template files are stored in the <code translate=\"no\">layouts/</code> directory and must be named according to the following convention:</p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">layouts/(&lt;section&gt;/)&lt;type&gt;|&lt;layout&gt;.&lt;format&gt;(.&lt;language&gt;).twig</code></pre>\n<dl>\n<dt><code translate=\"no\">&lt;section&gt;</code> (<em>optional</em>)</dt>\n<dd>The section of the page (e.g.: <code translate=\"no\">blog</code>).</dd>\n<dt><code translate=\"no\">&lt;type&gt;</code></dt>\n<dd>The template type: <code translate=\"no\">home</code> (or <code translate=\"no\">index</code>) for the <em>homepage</em>, <code translate=\"no\">list</code> for list pages (<em>homepage</em> and <em>sections</em>), <code translate=\"no\">page</code> for a <em>page</em>, etc. (See <a href=\"#lookup-rules\"><em>Lookup rules</em></a> for details).</dd>\n<dt><code translate=\"no\">&lt;layout&gt;</code> (<em>optional</em>)</dt>\n<dd>The custom layout name defined in the <a href=\"../content/1-pages.md#front-matter\">front matter</a> of the page (e.g.: <code translate=\"no\">layout: my-layout</code>).</dd>\n<dt><code translate=\"no\">&lt;format&gt;</code></dt>\n<dd>The <a href=\"../configuration/8-output.md#output-formats\">output format</a> of the rendered page (e.g.: <code translate=\"no\">html</code>, <code translate=\"no\">rss</code>, <code translate=\"no\">json</code>, <code translate=\"no\">xml</code>, etc.).</dd>\n<dt><code translate=\"no\">&lt;language&gt;</code> (<em>optional</em>)</dt>\n<dd>The language of the page (e.g.: <code translate=\"no\">fr</code>).</dd>\n</dl>\n<p><em>Examples:</em></p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">layouts/home.html.twig       # `type` is \"homepage\"\nlayouts/page.html.twig       # `type` is \"page\"\nlayouts/page.html.fr.twig    # `type` is \"page\" and `language` is \"fr\"\nlayouts/my-layout.html.twig  # `layout` is \"my-layout\"\nlayouts/blog/list.html.twig  # `section` is \"blog\"\nlayouts/blog/list.rss.twig   # `section` is \"blog\" and `format` is \"rss\"</code></pre>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">&lt;my-site&gt;\n├─ ...\n├─ layouts\n|  ├─ index.html.twig      # Used by type \"homepage\"\n|  ├─ list.html.twig       # Used by types \"homepage\" and \"section\"\n|  ├─ list.rss.twig        # Used by types \"homepage\" and \"section\", for RSS output format\n|  ├─ page.html.twig       # Used by type \"page\"\n|  ├─ taxonomy\n|  |  ├─ tags.html.twig    # Used by type \"vocabulary\" of `tags` (list of terms)\n|  |  └─ tag.html.twig     # Used by type \"term\" of `tags` (list of pages)\n|  ├─ my-layout.html.twig  # Used by pages with `layout: my-layout` in the front matter\n|  ├─ ...\n|  └─ partials             # Included templates\n|     ├─ footer.html.twig\n|     └─ ...\n└─ themes                  # Themes layouts and templates\n   └─ ...</code></pre>\n<h3 id=\"built-in-templates\">Built-in templates<a class=\"heading-anchor\" href=\"#built-in-templates\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Cecil comes with a set of <a href=\"https://github.com/Cecilapp/Cecil/tree/main/resources/layouts\" target=\"_blank\" rel=\"noopener noreferrer\">built-in templates</a>.</p>\n<aside class=\"note note-tip\"><p>If you need to modify built-in templates, you can easily extract them via the following command: they will be copied into the <code translate=\"no\">layouts</code> directory of your site.</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar util:templates:extract</code></pre></aside>\n<h2 id=\"lookup-rules\">Lookup rules<a class=\"heading-anchor\" href=\"#lookup-rules\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>In most cases <strong>you don’t need to specify the layout</strong>: Cecil selects the most appropriate layout, according to the <strong>page type</strong>.</p>\n<p>For example, the HTML output of the <strong>home page</strong> (<code translate=\"no\">index.md</code>) will be rendered:</p>\n<ol>\n<li>with <code translate=\"no\">my-layout.html.twig</code> if the <code translate=\"no\">layout</code> variable is set to \"my-layout\" (in the front matter)</li>\n<li>if not, with <code translate=\"no\">index.html.twig</code> if the file exists</li>\n<li>if not, with <code translate=\"no\">home.html.twig</code> if the file exists</li>\n<li>if not, with <code translate=\"no\">list.html.twig</code> if the file exists</li>\n</ol>\n<p>All rules are detailed below, for each page type, in the priority order.</p>\n<aside class=\"note note-info\"><p>Each candidate template is searched in the <code translate=\"no\">layouts/</code> directory of the site, then in the <code translate=\"no\">layouts/</code> directory of each <a href=\"7-extend.md#theme\">theme</a> (in the configured order), then in the built-in templates. The first file found is used.</p></aside>\n<aside class=\"note note-tip\"><p>For a page in a language other than the default one, the localized variant of each candidate (e.g.: <code translate=\"no\">page.html.fr.twig</code>) is tried first: all localized candidates are looked up before the non-localized ones.</p></aside>\n<h3 id=\"type-homepage\">Type <em>homepage</em><a class=\"heading-anchor\" href=\"#type-homepage\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<ol>\n<li><code translate=\"no\">&lt;layout&gt;.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">index.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">home.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">list.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">_default/&lt;layout&gt;.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">_default/index.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">_default/home.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">_default/list.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">_default/page.&lt;format&gt;.twig</code></li>\n</ol>\n<h3 id=\"type-page\">Type <em>page</em><a class=\"heading-anchor\" href=\"#type-page\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<ol>\n<li><code translate=\"no\">&lt;section&gt;/&lt;layout&gt;.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">&lt;layout&gt;.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">&lt;section&gt;/page.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">_default/&lt;layout&gt;.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">page.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">_default/page.&lt;format&gt;.twig</code></li>\n</ol>\n<h3 id=\"type-section\">Type <em>section</em><a class=\"heading-anchor\" href=\"#type-section\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<ol>\n<li><code translate=\"no\">&lt;layout&gt;.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">&lt;section&gt;/index.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">&lt;section&gt;/list.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">section/&lt;section&gt;.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">&lt;parent&gt;/index.&lt;format&gt;.twig</code>, <code translate=\"no\">&lt;parent&gt;/list.&lt;format&gt;.twig</code> and <code translate=\"no\">section/&lt;parent&gt;.&lt;format&gt;.twig</code>, for each parent section of a sub-section (nearest first)</li>\n<li><code translate=\"no\">_default/section.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">list.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">_default/list.&lt;format&gt;.twig</code></li>\n</ol>\n<aside class=\"note note-tip\"><p>The <code translate=\"no\">&lt;section&gt;</code> of a <a href=\"../content/1-pages.md#sub-section\">sub-section</a> is its full path (e.g.: <code translate=\"no\">blog/2024</code>), and a sub-section falls back to the templates of its parent sections: if <code translate=\"no\">blog/2024/list.html.twig</code> doesn’t exist, the sub-section <code translate=\"no\">blog/2024</code> is rendered with <code translate=\"no\">blog/list.html.twig</code>.</p></aside>\n<aside class=\"note note-info\"><p>The name used as <code translate=\"no\">&lt;section&gt;</code> (for a section and its pages) can be mapped to the layouts of another section with the <a href=\"../configuration/7-layouts.md#layouts-sections\"><code translate=\"no\">layouts.sections</code></a> option.</p></aside>\n<h3 id=\"type-vocabulary\">Type <em>vocabulary</em><a class=\"heading-anchor\" href=\"#type-vocabulary\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<ol>\n<li><code translate=\"no\">taxonomy/&lt;plural&gt;.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">vocabulary.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">_default/vocabulary.&lt;format&gt;.twig</code></li>\n</ol>\n<h3 id=\"type-term\">Type <em>term</em><a class=\"heading-anchor\" href=\"#type-term\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<ol>\n<li><code translate=\"no\">taxonomy/&lt;plural&gt;/&lt;term&gt;.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">taxonomy/&lt;singular&gt;.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">term.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">_default/term.&lt;format&gt;.twig</code></li>\n<li><code translate=\"no\">_default/list.&lt;format&gt;.twig</code></li>\n</ol>\n<aside class=\"note note-important\"><p>The <strong>vocabulary</strong> template is named after the <strong>plural</strong> (e.g.: <code translate=\"no\">taxonomy/categories.html.twig</code> for <code translate=\"no\">/categories/</code>), whereas the <strong>term</strong> template is named after the <strong>singular</strong> (e.g.: <code translate=\"no\">taxonomy/category.html.twig</code> for <code translate=\"no\">/categories/data-sovereignty/</code>).</p></aside>\n<aside class=\"note note-tip\"><p><code translate=\"no\">&lt;term&gt;</code> is the slugified term name: a dedicated template for the term \"Data Sovereignty\" of the <code translate=\"no\">categories</code> vocabulary is <code translate=\"no\">taxonomy/categories/data-sovereignty.html.twig</code>.</p></aside>\n<aside class=\"note note-info\"><p>Most of those layouts are available by default (in <code translate=\"no\">_default/</code>), see <a href=\"#built-in-templates\">built-in templates</a>.</p></aside>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/templates/reference/functions/",
      "url": "https://cloudflare.cecil.app/documentation/templates/reference/functions/",
      "title": "Functions",
      "summary": "url, html, readtime, hash, cache_key, getenv, dump, tests, etc.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-22T00:00:00+00:00","content_text": "Functions\n\nFunctions can be called to generate content. Functions are called by their name followed by parentheses (()) and may have arguments.\n\nSee also: functions dedicated to assets (asset, integrity, image_srcset, image_sizes, image_from_website, etc.) are documented in the Assets section.\nurl\nCreates a valid URL for a page, a menu entry, an asset, a page ID or a path.\n{{ url(value, {options}) }}\n\n\n\nOption\nDescription\nType\nDefault\n\n\n\n\ncanonical\nPrefixes URL with baseurl or uses canonical.url if it exists.\nboolean\nvalue of canonicalurl (false by default)\n\n\nformat\nDefines page output format (e.g.: json).\nstring\nhtml\n\n\nlanguage\nDefines page language (e.g.: fr).\nstring\ncurrent language\n\n\n\nExamples:\n{# page #}\n{{ url(page) }}\n{{ url(page, {canonical: true}) }}\n{{ url(page, {format: 'json'}) }}\n{{ url(page, {language: 'fr'}) }}\n{# menu entry #}\n{{ url(site.menus.main.about) }}\n{# asset #}\n{{ url(asset('styles.css')) }}\n{# page ID #}\n{{ url('page-id') }}\n{# path #}\n{{ url('about-me\/') }}\n{{ url('tags\/' ~ tag) }}\nFor convenience the url function is also available as a filter:\n{# page #}\n{{ page|url }}\n{{ page|url({canonical: true, format: 'json', language: 'fr'}) }}\n{# asset #}\n{{ asset('styles.css')|url }}\nWhen the value is a string, url() slugifies it to find a matching page ID (e.g.: url('tags\/My Tag') returns the URL of the page tags\/my-tag). If no page matches, the string is kept as a path, with invalid characters (e.g.: spaces) percent-encoded.\nhtml\nCreates an HTML element from an asset (or an array of assets with custom attributes).\n{{ html(asset, {attributes}, {options}) }}\n{# dedicated functions for each common type of asset #}\n{{ css(asset) }}\n{{ js(asset) }}\n{{ image(asset) }}\n{{ audio(asset) }}\n{{ video(asset) }}\n\n\n\nArgument\nDescription\nType\n\n\n\n\nattributes\nAdds name=\"value\" couple to the HTML element.\narray\n\n\noptions\n{preload: boolean}: preloads.For images:{formats: array}: adds alternative formats.{responsive: bool|string}: adds responsive images (based on width or pixels density).{placeholder: string}: fills the image background before loading (color or lqip).\narray\n\n\n\nSince version 8.42.0, the html function replaces the deprecated html filter.\nYou can define a global default behavior of images options (formats, responsive and placeholder) through the layouts configuration.\nWhen layouts.images.dark_suffix is configured (e.g. .dark), Cecil automatically looks for a dark variant of each image (e.g. photo.dark.jpg alongside photo.jpg) and generates a &lt;picture&gt; element with a &lt;source media=\"(prefers-color-scheme: dark)\"&gt;.\nIn the same way, when layouts.images.mobile_suffix is configured (e.g. .mobile), Cecil looks for a mobile variant of each image (e.g. photo.mobile.jpg) and adds a &lt;source&gt; with the layouts.images.mobile_media_query media query. If a dark variant of the mobile image exists (e.g. photo.mobile.dark.jpg), it is used on mobile with dark color scheme.\nExamples:\n{# CSS with an attribute #}\n{{ html(asset('print.css'), {media: 'print'}) }}\n{# CSS with an attribute and an option #}\n{{ html(asset('styles.css'), {title: 'Main theme'}, {preload: true}) }}\n{# Array of assets with media query #}\n{{ html([\n  {asset: asset('css\/style.css')},\n  {asset: asset('css\/style-dark.css'), attributes: {media: '(prefers-color-scheme: dark)'}}\n]) }}\n{# JavaScript #}\n{{ html(asset('script.js')) }}\n{# image without specific attributes nor options #}\n{{ html(asset('image.png')) }}\n{# image with specific attributes, responsive images and alternative formats #}\n{{ html(asset('image.jpg'), {alt: 'Description', loading: 'lazy'}, {responsive: true, formats: ['avif', 'webp']}) }}\n{# image with responsive pixels density images #}\n{{ html(asset('image.jpg'), options={responsive: 'density'}, attributes={width: 256}) }}\n{# image with a Low-Quality Image Placeholder #}\n{{ html(asset('image.jpg'), {alt: 'Description', loading: 'lazy'}, {placeholder: 'lqip'}) }}\n{# Audio #}\n{{ html(asset('audio.mp3')) }}\n{# Video #}\n{{ html(asset('video.mp4')) }}\nFor convenience the html function remains available as a filter (deprecated):\n{{ asset|html({attributes}, {options}) }}\nreadtime\nDetermines read time of a text, in minutes (based on 200 words per minute, 1 minute minimum).\n{{ readtime(value) }}\nExample:\n{{ readtime(page.content) }} min\nhash\nCalculates the hash of an object, an array or a string with a given algorithm.\n{{ hash(value, algorithm) }}\nalgorithm can be any algorithm supported by PHP’s hash() function (e.g.: md5, sha256, etc.). Default is xxh128.\nExample:\n{{ hash('my string', 'sha256') }}\ncache_key\nCalculates a cache key for fragments cache based on a name and an optional value.\n{% cache cache_key(name, value) %}\n  {# cacheable content #}\n{% endcache %}\nThe function adds a hash of the value (could be a string, an array or an object) to the name (and the current language and build ID to be sure the generated cache key is unique), so if the value changes, the cache key changes too and a new cache entry is generated.\ngetenv\nGets the value of an environment variable from its key.\n{{ getenv(var) }}\nExample:\n{{ getenv('VAR') }}\ndump\nThe dump function dumps information about a template variable. This is mostly useful to debug a template that does not behave as expected by introspecting its variables:\n{{ dump(user) }}\nThe debug mode must be enabled.\nd\nThe d() function is the HTML version of dump() and uses the Symfony VarDumper Component behind the scenes.\n{{ d(variable, {theme: 'dark'}) }}\n\nIf variable is not provided, the function dumps the current Twig context\nAvailable themes are light (default) and dark\n\nThe debug mode must be enabled.\nTests\nTests can be used with the is operator.\n\n\n\nTest\nDescription\n\n\n\n\nasset\nThe variable is an asset.\n\n\nimage_large\nThe asset is a landscape image of at least 600 × 315 pixels (e.g.: a cover image).\n\n\nimage_square\nThe asset is a square image (same width and height).\n\n\nenabled\nThe option is enabled: true, a map without enabled key or with enabled: true, or any other value except false and null.\n\n\nexternal\nThe URL (or the URL of a menu entry) is external: it has a scheme (https:, mailto:, etc.) or starts with \/\/, and does not start with baseurl.\n\n\n\nExample:\n{% set image = asset(page.image) %}\n{% if image is image_large %}\n  {{ html(image, {alt: page.title}) }}\n{% endif %}\n{% if config.cache is enabled %}\n  {# `cache: false` and `cache: {enabled: false}` are both disabled #}\n{% endif %}\n{% for item in site.menus.main|sort_by_weight %}\n  &lt;a href=\"{{ url(item.url) }}\"{% if item is external %} rel=\"noopener\" target=\"_blank\"{% endif %}&gt;{{ item.name }}&lt;\/a&gt;\n{% endfor %}\nThe enabled test only checks the given value, not its parents: config.optimize.html is enabled can be true while optimize is disabled.\nA custom option may not exist: use the default filter (e.g. config.myoption|default(false) is enabled).\nDeprecated\nThe following functions are deprecated (a deprecation notice is triggered when they are used):\n\n\n\nFunction\nReplacement\n\n\n\n\nminify()\nminify filter\n\n\ntoCSS()\nto_css filter\n\n\nimage_from_url()\nimage_from_website() function\n\n\n",
      "content_html": "<h1>Functions</h1>\n<blockquote>\n<p><a href=\"https://twig.symfony.com/doc/functions/index.html\" target=\"_blank\" rel=\"noopener noreferrer\">Functions</a> can be called to generate content. Functions are called by their name followed by parentheses (<code translate=\"no\">()</code>) and may have arguments.</p>\n</blockquote>\n<aside class=\"note note-info\"><p>See also: functions dedicated to assets (<code translate=\"no\">asset</code>, <code translate=\"no\">integrity</code>, <code translate=\"no\">image_srcset</code>, <code translate=\"no\">image_sizes</code>, <code translate=\"no\">image_from_website</code>, etc.) are documented in the <a href=\"../../assets/index.md\">Assets</a> section.</p></aside>\n<h2 id=\"url\">url<a class=\"heading-anchor\" href=\"#url\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Creates a valid URL for a page, a menu entry, an asset, a page ID or a path.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ url(value, {options}) }}</span></code></pre>\n<table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Description</th>\n<th>Type</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>canonical</td>\n<td>Prefixes URL with <a href=\"../../configuration/1-site.md#baseurl\"><code translate=\"no\">baseurl</code></a> or uses <a href=\"../../configuration/1-site.md#metatags-options\"><code translate=\"no\">canonical.url</code></a> if it exists.</td>\n<td>boolean</td>\n<td>value of <a href=\"../../configuration/1-site.md#canonicalurl\"><code translate=\"no\">canonicalurl</code></a> (<code translate=\"no\">false</code> by default)</td>\n</tr>\n<tr>\n<td>format</td>\n<td>Defines page <a href=\"../../configuration/8-output.md#output-formats\">output format</a> (e.g.: <code translate=\"no\">json</code>).</td>\n<td>string</td>\n<td><code translate=\"no\">html</code></td>\n</tr>\n<tr>\n<td>language</td>\n<td>Defines page <a href=\"../../configuration/2-languages.md#language\">language</a> (e.g.: <code translate=\"no\">fr</code>).</td>\n<td>string</td>\n<td>current language</td>\n</tr>\n</tbody>\n</table>\n<p><em>Examples:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# page #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ url(page) }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ url(page, {canonical: true}) }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ url(page, {format: 'json'}) }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ url(page, {language: 'fr'}) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# menu entry #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ url(site.menus.main.about) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# asset #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ url(asset('styles.css')) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# page ID #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ url('page-id') }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# path #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ url('about-me/') }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ url('tags/' ~ tag) }}</span></code></pre>\n<aside class=\"note note-info\"><p>For convenience the <code translate=\"no\">url</code> function is also available as a filter:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# page #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ page|url }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ page|url({canonical: true, format: 'json', language: 'fr'}) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# asset #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ asset('styles.css')|url }}</span></code></pre></aside>\n<aside class=\"note note-tip\"><p>When the value is a string, <code translate=\"no\">url()</code> slugifies it to find a matching page ID (e.g.: <code translate=\"no\">url('tags/My Tag')</code> returns the URL of the page <code translate=\"no\">tags/my-tag</code>). If no page matches, the string is kept as a path, with invalid characters (e.g.: spaces) percent-encoded.</p></aside>\n<h2 id=\"html\">html<a class=\"heading-anchor\" href=\"#html\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Creates an HTML element from an asset (or an array of assets with custom attributes).</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ html(asset, {attributes}, {options}) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# dedicated functions for each common type of asset #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ css(asset) }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ js(asset) }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ image(asset) }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ audio(asset) }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ video(asset) }}</span></code></pre>\n<table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>attributes</td>\n<td>Adds <code translate=\"no\">name=\"value\"</code> couple to the HTML element.</td>\n<td>array</td>\n</tr>\n<tr>\n<td>options</td>\n<td><code translate=\"no\">{preload: boolean}</code>: preloads.<br>For images:<br><code translate=\"no\">{formats: array}</code>: adds alternative formats.<br><code translate=\"no\">{responsive: bool|string}</code>: adds responsive images (based on <code translate=\"no\">width</code> or pixels <code translate=\"no\">density</code>).<br><code translate=\"no\">{placeholder: string}</code>: fills the image background before loading (<code translate=\"no\">color</code> or <code translate=\"no\">lqip</code>).</td>\n<td>array</td>\n</tr>\n</tbody>\n</table>\n<aside class=\"note note-warning\"><p>Since version <ins>8.42.0</ins>, the <code translate=\"no\">html</code> function replaces the deprecated <code translate=\"no\">html</code> filter.</p></aside>\n<aside class=\"note note-tip\"><p>You can define a global default behavior of images options (<code translate=\"no\">formats</code>, <code translate=\"no\">responsive</code> and <code translate=\"no\">placeholder</code>) through the <a href=\"../../configuration/7-layouts.md#layouts-images\">layouts configuration</a>.</p>\n<p>When <a href=\"../../configuration/7-layouts.md#layouts-images\"><code translate=\"no\">layouts.images.dark_suffix</code></a> is configured (e.g. <code translate=\"no\">.dark</code>), Cecil automatically looks for a dark variant of each image (e.g. <code translate=\"no\">photo.dark.jpg</code> alongside <code translate=\"no\">photo.jpg</code>) and generates a <code translate=\"no\">&lt;picture&gt;</code> element with a <code translate=\"no\">&lt;source media=\"(prefers-color-scheme: dark)\"&gt;</code>.</p>\n<p>In the same way, when <a href=\"../../configuration/7-layouts.md#layouts-images\"><code translate=\"no\">layouts.images.mobile_suffix</code></a> is configured (e.g. <code translate=\"no\">.mobile</code>), Cecil looks for a mobile variant of each image (e.g. <code translate=\"no\">photo.mobile.jpg</code>) and adds a <code translate=\"no\">&lt;source&gt;</code> with the <a href=\"../../configuration/7-layouts.md#layouts-images\"><code translate=\"no\">layouts.images.mobile_media_query</code></a> media query. If a dark variant of the mobile image exists (e.g. <code translate=\"no\">photo.mobile.dark.jpg</code>), it is used on mobile with dark color scheme.</p></aside>\n<p><em>Examples:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# CSS with an attribute #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ html(asset('print.css'), {media: 'print'}) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# CSS with an attribute and an option #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ html(asset('styles.css'), {title: 'Main theme'}, {preload: true}) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# Array of assets with media query #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ html([\n  {asset: asset('css/style.css')},\n  {asset: asset('css/style-dark.css'), attributes: {media: '(prefers-color-scheme: dark)'}}</span><span class=\"xml\">\n]) }}\n</span><span class=\"hljs-comment\">{# JavaScript #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ html(asset('script.js')) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# image without specific attributes nor options #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ html(asset('image.png')) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# image with specific attributes, responsive images and alternative formats #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ html(asset('image.jpg'), {alt: 'Description', loading: 'lazy'}, {responsive: true, formats: ['avif', 'webp']}) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# image with responsive pixels density images #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ html(asset('image.jpg'), options={responsive: 'density'}, attributes={width: 256}) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# image with a Low-Quality Image Placeholder #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ html(asset('image.jpg'), {alt: 'Description', loading: 'lazy'}, {placeholder: 'lqip'}) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# Audio #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ html(asset('audio.mp3')) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# Video #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ html(asset('video.mp4')) }}</span></code></pre>\n<aside class=\"note note-info\"><p>For convenience the <code translate=\"no\">html</code> function remains available as a filter (deprecated):</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset|html({attributes}, {options}) }}</span></code></pre></aside>\n<h2 id=\"readtime\">readtime<a class=\"heading-anchor\" href=\"#readtime\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Determines read time of a text, in minutes (based on 200 words per minute, 1 minute minimum).</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ readtime(value) }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ readtime(page.content) }}</span><span class=\"xml\"> min</span></code></pre>\n<h2 id=\"hash\">hash<a class=\"heading-anchor\" href=\"#hash\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Calculates the hash of an object, an array or a string with a given algorithm.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ hash(value, algorithm) }}</span></code></pre>\n<p><code translate=\"no\">algorithm</code> can be any algorithm supported by PHP’s <code translate=\"no\">hash()</code> function (e.g.: <code translate=\"no\">md5</code>, <code translate=\"no\">sha256</code>, etc.). Default is <code translate=\"no\">xxh128</code>.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ hash('my string', 'sha256') }}</span></code></pre>\n<h2 id=\"cache-key\">cache_key<a class=\"heading-anchor\" href=\"#cache-key\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Calculates a cache key for <a href=\"../6-cache.md#fragments-cache\"><em>fragments</em> cache</a> based on a name and an optional value.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">cache</span> cache_key(name, value) %}</span><span class=\"xml\">\n  </span><span class=\"hljs-comment\">{# cacheable content #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">endcache</span> %}</span></code></pre>\n<p>The function adds a hash of the value (could be a string, an array or an object) to the name (and the current language and build ID to be sure the generated cache key is unique), so if the value changes, the cache key changes too and a new cache entry is generated.</p>\n<h2 id=\"getenv\">getenv<a class=\"heading-anchor\" href=\"#getenv\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Gets the value of an environment variable from its key.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ getenv(var) }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ getenv('VAR') }}</span></code></pre>\n<h2 id=\"dump\">dump<a class=\"heading-anchor\" href=\"#dump\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The <code translate=\"no\">dump</code> function dumps information about a template variable. This is mostly useful to debug a template that does not behave as expected by introspecting its variables:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ <span class=\"hljs-name\">dump</span><span class=\"hljs-params\">(user)</span> }}</span></code></pre>\n<aside class=\"note note-important\"><p>The <a href=\"../../configuration/1-site.md#debug\"><em>debug mode</em></a> must be enabled.</p></aside>\n<h2 id=\"d\">d<a class=\"heading-anchor\" href=\"#d\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The <code translate=\"no\">d()</code> function is the HTML version of <a href=\"#dump\"><code translate=\"no\">dump()</code></a> and uses the <a href=\"https://symfony.com/doc/current/components/var_dumper.html\" target=\"_blank\" rel=\"noopener noreferrer\">Symfony VarDumper Component</a> behind the scenes.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ d(variable, {theme: 'dark'}) }}</span></code></pre>\n<ul>\n<li>If <em>variable</em> is not provided, the function dumps the current Twig context</li>\n<li>Available themes are <code translate=\"no\">light</code> (default) and <code translate=\"no\">dark</code></li>\n</ul>\n<aside class=\"note note-important\"><p>The <a href=\"../../configuration/1-site.md#debug\"><em>debug mode</em></a> must be enabled.</p></aside>\n<h2 id=\"tests\">Tests<a class=\"heading-anchor\" href=\"#tests\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p><a href=\"https://twig.symfony.com/doc/tests/index.html\" target=\"_blank\" rel=\"noopener noreferrer\">Tests</a> can be used with the <code translate=\"no\">is</code> operator.</p>\n<table>\n<thead>\n<tr>\n<th>Test</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">asset</code></td>\n<td>The variable is an <a href=\"../../assets/index.md#asset\">asset</a>.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">image_large</code></td>\n<td>The asset is a landscape image of at least 600 × 315 pixels (e.g.: a cover image).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">image_square</code></td>\n<td>The asset is a square image (same width and height).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">enabled</code></td>\n<td>The option is enabled: <code translate=\"no\">true</code>, a map without <code translate=\"no\">enabled</code> key or with <code translate=\"no\">enabled: true</code>, or any other value except <code translate=\"no\">false</code> and <code translate=\"no\">null</code>.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">external</code></td>\n<td>The URL (or the URL of a menu entry) is external: it has a scheme (<code translate=\"no\">https:</code>, <code translate=\"no\">mailto:</code>, etc.) or starts with <code translate=\"no\">//</code>, and does not start with <code translate=\"no\">baseurl</code>.</td>\n</tr>\n</tbody>\n</table>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> image = asset(page.image) %}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">if</span></span> image is image_large %}</span><span class=\"xml\">\n  </span><span class=\"hljs-template-variable\">{{ html(image, {alt: page.title}) }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endif</span></span> %}</span></code></pre>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">if</span></span> config.cache is enabled %}</span><span class=\"xml\">\n  </span><span class=\"hljs-comment\">{# `cache: false` and `cache: {enabled: false}` are both disabled #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endif</span></span> %}</span></code></pre>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> item in site.menus.main|sort_by_weight %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(item.url) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">if</span></span> item is external %}</span><span class=\"xml\"><span class=\"hljs-tag\"> <span class=\"hljs-attr\">rel</span>=<span class=\"hljs-string\">\"noopener\"</span> <span class=\"hljs-attr\">target</span>=<span class=\"hljs-string\">\"_blank\"</span></span></span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endif</span></span> %}</span><span class=\"xml\"><span class=\"hljs-tag\">&gt;</span></span><span class=\"hljs-template-variable\">{{ item.name }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span></code></pre>\n<aside class=\"note note-info\"><p>The <code translate=\"no\">enabled</code> test only checks the given value, not its parents: <code translate=\"no\">config.optimize.html is enabled</code> can be true while <code translate=\"no\">optimize</code> is disabled.\nA custom option may not exist: use the <code translate=\"no\">default</code> filter (e.g. <code translate=\"no\">config.myoption|default(false) is enabled</code>).</p></aside>\n<h2 id=\"deprecated\">Deprecated<a class=\"heading-anchor\" href=\"#deprecated\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The following functions are deprecated (a deprecation notice is triggered when they are used):</p>\n<table>\n<thead>\n<tr>\n<th>Function</th>\n<th>Replacement</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">minify()</code></td>\n<td><a href=\"../../assets/2-processing.md#minify\"><code translate=\"no\">minify</code></a> filter</td>\n</tr>\n<tr>\n<td><code translate=\"no\">toCSS()</code></td>\n<td><a href=\"../../assets/2-processing.md#to-css\"><code translate=\"no\">to_css</code></a> filter</td>\n</tr>\n<tr>\n<td><code translate=\"no\">image_from_url()</code></td>\n<td><a href=\"../../assets/1-images.md#image-from-website\"><code translate=\"no\">image_from_website()</code></a> function</td>\n</tr>\n</tbody>\n</table>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/assets/processing/",
      "url": "https://cloudflare.cecil.app/documentation/assets/processing/",
      "title": "CSS, JavaScript and processing",
      "summary": "Compile Sass, minify, fingerprint, inline or embed assets.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "CSS, JavaScript and processing\nCecil provides Twig filters to compile Sass, minify, fingerprint, inline or embed (as data URL) CSS and JavaScript assets.\nfingerprint\nAdds a hash of the file content (fingerprint) to the file name.\n{{ asset(path)|fingerprint }}\n{{ path|fingerprint }}\nExample:\n{{ asset('styles.css')|fingerprint }}\nminify\nMinifies a CSS or a JavaScript file.\n{{ asset(path)|minify }}\n{{ path|minify }}\nExamples:\n{{ asset('styles.css')|minify }}\n{{ asset('scripts.js')|minify }}\nminify_css\nMinifies a CSS string.\n{{ variable|minify_css }}\n{% apply minify_css %}\n{# CSS here #}\n{% endapply %}\nExamples:\n{% set styles = 'some CSS here' %}\n{{ styles|minify_css }}\n&lt;style&gt;\n{% apply minify_css %}\n  html {\n    background-color: #fcfcfc;\n    color: #444;\n  }\n{% endapply %}\n&lt;\/style&gt;\nminify_js\nMinifies a JavaScript string.\n{{ variable|minify_js }}\n{% apply minify_js %}\n{# JavaScript here #}\n{% endapply %}\nExamples:\n{% set script = 'some JavaScript here' %}\n{{ script|minify_js }}\n&lt;script&gt;\n{% apply minify_js %}\n  var test = 'test';\n  console.log(test);\n{% endapply %}\n&lt;\/script&gt;\nscss_to_css\nCompiles a Sass string to CSS.\n{{ variable|scss_to_css }}\n{% apply scss_to_css %}\n{# SCSS here #}\n{% endapply %}\nAlias: sass_to_css.\nExamples:\n{% set scss = 'some SCSS here' %}\n{{ scss|scss_to_css }}\n&lt;style&gt;\n{% apply scss_to_css %}\n  $color: #fcfcfc;\n  div {\n    color: lighten($color, 20%);\n  }\n{% endapply %}\n&lt;\/style&gt;\nto_css\nCompiles a Sass file to CSS.\n{{ asset(path)|to_css }}\n{{ path|to_css }}\nExample:\n{{ asset('styles.scss')|to_css }}\ninline\nOutputs the content of an Asset.\n{{ asset(path)|inline }}\nExample:\n{{ asset('styles.css')|inline }}\ndataurl\nReturns the data URL of an asset (or of a path).\nRaster images are re-encoded with the assets.images.quality option; other files (including SVG) are encoded as is in Base64.\n{{ asset(path)|dataurl }}\n{{ path|dataurl }}\nExample:\n&lt;img src=\"{{ asset('icon.png')|dataurl }}\" alt=\"\"&gt;",
      "content_html": "<h1>CSS, JavaScript and processing</h1>\n<p>Cecil provides Twig filters to compile Sass, minify, fingerprint, inline or embed (as data URL) CSS and JavaScript assets.</p>\n<h2 id=\"fingerprint\">fingerprint<a class=\"heading-anchor\" href=\"#fingerprint\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Adds a hash of the file content (fingerprint) to the file name.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset(path)|fingerprint }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ path|fingerprint }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset('styles.css')|fingerprint }}</span></code></pre>\n<h2 id=\"minify\">minify<a class=\"heading-anchor\" href=\"#minify\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Minifies a CSS or a JavaScript file.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset(path)|minify }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ path|minify }}</span></code></pre>\n<p><em>Examples:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset('styles.css')|minify }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ asset('scripts.js')|minify }}</span></code></pre>\n<h2 id=\"minify-css\">minify_css<a class=\"heading-anchor\" href=\"#minify-css\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Minifies a CSS string.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ variable|minify_css }}</span></code></pre>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">apply</span></span> minify_css %}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# CSS here #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endapply</span></span> %}</span></code></pre>\n<p><em>Examples:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> styles = 'some CSS here' %}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ styles|minify_css }}</span></code></pre>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">style</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">apply</span></span> minify_css %}</span><span class=\"xml\"><span class=\"css\">\n  <span class=\"hljs-selector-tag\">html</span> {\n    <span class=\"hljs-attribute\">background-color</span>: <span class=\"hljs-number\">#fcfcfc</span>;\n    <span class=\"hljs-attribute\">color</span>: <span class=\"hljs-number\">#444</span>;\n  }\n</span></span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endapply</span></span> %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">style</span>&gt;</span></span></code></pre>\n<h2 id=\"minify-js\">minify_js<a class=\"heading-anchor\" href=\"#minify-js\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Minifies a JavaScript string.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ variable|minify_js }}</span></code></pre>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">apply</span></span> minify_js %}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# JavaScript here #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endapply</span></span> %}</span></code></pre>\n<p><em>Examples:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> script = 'some JavaScript here' %}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ script|minify_js }}</span></code></pre>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">apply</span></span> minify_js %}</span><span class=\"xml\"><span class=\"javascript\">\n  <span class=\"hljs-keyword\">var</span> test = <span class=\"hljs-string\">'test'</span>;\n  <span class=\"hljs-built_in\">console</span>.log(test);\n</span></span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endapply</span></span> %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">script</span>&gt;</span></span></code></pre>\n<h2 id=\"scss-to-css\">scss_to_css<a class=\"heading-anchor\" href=\"#scss-to-css\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Compiles a <a href=\"https://sass-lang.com\" target=\"_blank\" rel=\"noopener noreferrer\">Sass</a> string to CSS.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ variable|scss_to_css }}</span></code></pre>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">apply</span></span> scss_to_css %}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# SCSS here #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endapply</span></span> %}</span></code></pre>\n<p>Alias: <code translate=\"no\">sass_to_css</code>.</p>\n<p><em>Examples:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> scss = 'some SCSS here' %}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ scss|scss_to_css }}</span></code></pre>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">style</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">apply</span></span> scss_to_css %}</span><span class=\"xml\">\n  $color: #fcfcfc;\n  div {\n    color: lighten($color, 20%);\n  }\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endapply</span></span> %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">style</span>&gt;</span></span></code></pre>\n<h2 id=\"to-css\">to_css<a class=\"heading-anchor\" href=\"#to-css\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Compiles a <a href=\"https://sass-lang.com\" target=\"_blank\" rel=\"noopener noreferrer\">Sass</a> file to CSS.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset(path)|to_css }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ path|to_css }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset('styles.scss')|to_css }}</span></code></pre>\n<h2 id=\"inline\">inline<a class=\"heading-anchor\" href=\"#inline\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Outputs the content of an <em>Asset</em>.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset(path)|inline }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset('styles.css')|inline }}</span></code></pre>\n<h2 id=\"dataurl\">dataurl<a class=\"heading-anchor\" href=\"#dataurl\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Returns the <a href=\"https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\" target=\"_blank\" rel=\"noopener noreferrer\">data URL</a> of an asset (or of a path).</p>\n<p>Raster images are re-encoded with the <a href=\"../configuration/6-assets.md#assets-images\"><code translate=\"no\">assets.images.quality</code></a> option; other files (including SVG) are encoded as is in Base64.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ asset(path)|dataurl }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ path|dataurl }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ asset('icon.png')|dataurl }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">alt</span>=<span class=\"hljs-string\">\"\"</span>&gt;</span></span></code></pre>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/configuration/languages/",
      "url": "https://cloudflare.cecil.app/documentation/configuration/languages/",
      "title": "Languages",
      "summary": "Main language and additional languages of a multilingual website.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-11-04T00:00:00+00:00","content_text": "Languages\nThese options define the main language of the site and, for a multilingual website, its additional languages.\nlanguage\nThe main language, defined by its code.\nlanguage: &lt;code&gt; # unique code (`en` by default)\nBy default, only the paths of the other languages pages are prefixed with their language code, but you can also prefix the paths of the main language pages with the following option:\n#language: &lt;code&gt;\nlanguage:\n  code: &lt;code&gt;\n  prefix: true\nWhen prefix is set to true, an alias is automatically created for the home page that redirects from \/ to \/&lt;code&gt;\/.\nlanguages\nOptions of available languages, used for pages and templates localization.\nlanguages:\n  - code: &lt;code&gt;          # unique code, `xx` or `xx-XX` (required, e.g.: `en`, `fr`, `en-US`, `fr-CA`)\n    name: &lt;name&gt;          # human readable name (e.g.: `Français`)\n    locale: &lt;locale&gt;      # locale code (required, `language_COUNTRY`, e.g.: `en_US`, `fr_FR`, `fr_CA`)\n    enabled: &lt;true|false&gt; # enabled or not (`true` by default)\nExample:\nlanguage: en\nlanguages:\n  - code: en\n    name: English\n    locale: en_US\n  - code: fr\n    name: Français\n    locale: fr_FR\nA locale code list is available if needed.\nLocalize\nTo localize configuration options you must store them under the config key of the language.\nExample:\ntitle: \"Cecil in English\"\nlanguages:\n  - code: en\n    name: English\n    locale: en_US\n  - code: fr\n    name: Français\n    locale: fr_FR\n    config:\n      title: \"Cecil en français\"\nIn templates you can access an option with {{ site.&lt;option&gt; }}, for example {{ site.title }}.\nIf an option is not available in the current language (e.g.: fr), it falls back to the global one (e.g.: en).\nThe localized options are validated like the global ones: the effective value of the language (the global value overridden by the localized one) must be valid.\nSome options apply to the whole site and can't be localized: language, languages, theme, cache, extensions, optimize, server, data, static, pages.dir, pages.ext, pages.frontmatter, pages.converter, pages.generators, pages.default, output.dir, output.formats, output.postprocessors, layouts.dir, layouts.extensions, layouts.autoescape and assets.dir. They are ignored, with a warning, if they are set under the config key of a language.\n",
      "content_html": "<h1>Languages</h1>\n<p>These options define the main language of the site and, for a multilingual website, its additional languages.</p>\n<h2 id=\"language\">language<a class=\"heading-anchor\" href=\"#language\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The main language, defined by its code.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">language:</span> <span class=\"hljs-string\">&lt;code&gt;</span> <span class=\"hljs-comment\"># unique code (`en` by default)</span></code></pre>\n<p>By default, only the paths of the other <a href=\"#languages\">languages</a> pages are prefixed with their language code, but you can also prefix the paths of the main language pages with the following option:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-comment\">#language: &lt;code&gt;</span>\n<span class=\"hljs-attr\">language:</span>\n  <span class=\"hljs-attr\">code:</span> <span class=\"hljs-string\">&lt;code&gt;</span>\n  <span class=\"hljs-attr\">prefix:</span> <span class=\"hljs-literal\">true</span></code></pre>\n<aside class=\"note note-info\"><p>When <code translate=\"no\">prefix</code> is set to <code translate=\"no\">true</code>, an alias is automatically created for the home page that redirects from <code translate=\"no\">/</code> to <code translate=\"no\">/&lt;code&gt;/</code>.</p></aside>\n<h2 id=\"languages\">languages<a class=\"heading-anchor\" href=\"#languages\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Options of available languages, used for <a href=\"../content/4-multilingual.md\">pages</a> and <a href=\"../templates/5-localization.md\">templates</a> localization.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">languages:</span>\n  <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">code:</span> <span class=\"hljs-string\">&lt;code&gt;</span>          <span class=\"hljs-comment\"># unique code, `xx` or `xx-XX` (required, e.g.: `en`, `fr`, `en-US`, `fr-CA`)</span>\n    <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">&lt;name&gt;</span>          <span class=\"hljs-comment\"># human readable name (e.g.: `Français`)</span>\n    <span class=\"hljs-attr\">locale:</span> <span class=\"hljs-string\">&lt;locale&gt;</span>      <span class=\"hljs-comment\"># locale code (required, `language_COUNTRY`, e.g.: `en_US`, `fr_FR`, `fr_CA`)</span>\n    <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-string\">&lt;true|false&gt;</span> <span class=\"hljs-comment\"># enabled or not (`true` by default)</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">language:</span> <span class=\"hljs-string\">en</span>\n<span class=\"hljs-attr\">languages:</span>\n  <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">code:</span> <span class=\"hljs-string\">en</span>\n    <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">English</span>\n    <span class=\"hljs-attr\">locale:</span> <span class=\"hljs-string\">en_US</span>\n  <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">code:</span> <span class=\"hljs-string\">fr</span>\n    <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">Français</span>\n    <span class=\"hljs-attr\">locale:</span> <span class=\"hljs-string\">fr_FR</span></code></pre>\n<aside class=\"note note-info\"><p>A <a href=\"3-locale-codes.md\">locale code list</a> is available if needed.</p></aside>\n<h3 id=\"localize\">Localize<a class=\"heading-anchor\" href=\"#localize\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>To localize configuration options you must store them under the <code translate=\"no\">config</code> key of the language.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">\"Cecil in English\"</span>\n<span class=\"hljs-attr\">languages:</span>\n  <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">code:</span> <span class=\"hljs-string\">en</span>\n    <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">English</span>\n    <span class=\"hljs-attr\">locale:</span> <span class=\"hljs-string\">en_US</span>\n  <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">code:</span> <span class=\"hljs-string\">fr</span>\n    <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">Français</span>\n    <span class=\"hljs-attr\">locale:</span> <span class=\"hljs-string\">fr_FR</span>\n    <span class=\"hljs-attr\">config:</span>\n      <span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">\"Cecil en français\"</span></code></pre>\n<aside class=\"note note-info\"><p>In <a href=\"../templates/index.md\">templates</a> you can access an option with <code translate=\"no\">{{ site.&lt;option&gt; }}</code>, for example <code translate=\"no\">{{ site.title }}</code>.<br>\nIf an option is not available in the current language (e.g.: <code translate=\"no\">fr</code>), it falls back to the global one (e.g.: <code translate=\"no\">en</code>).</p></aside>\n<p>The localized options are validated like the global ones: the effective value of the language (the global value overridden by the localized one) must be valid.</p>\n<p>Some options apply to the whole site and can't be localized: <code translate=\"no\">language</code>, <code translate=\"no\">languages</code>, <code translate=\"no\">theme</code>, <code translate=\"no\">cache</code>, <code translate=\"no\">extensions</code>, <code translate=\"no\">optimize</code>, <code translate=\"no\">server</code>, <code translate=\"no\">data</code>, <code translate=\"no\">static</code>, <code translate=\"no\">pages.dir</code>, <code translate=\"no\">pages.ext</code>, <code translate=\"no\">pages.frontmatter</code>, <code translate=\"no\">pages.converter</code>, <code translate=\"no\">pages.generators</code>, <code translate=\"no\">pages.default</code>, <code translate=\"no\">output.dir</code>, <code translate=\"no\">output.formats</code>, <code translate=\"no\">output.postprocessors</code>, <code translate=\"no\">layouts.dir</code>, <code translate=\"no\">layouts.extensions</code>, <code translate=\"no\">layouts.autoescape</code> and <code translate=\"no\">assets.dir</code>. They are ignored, with a warning, if they are set under the <code translate=\"no\">config</code> key of a language.</p>\n<hr>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/content/front-matter/",
      "url": "https://cloudflare.cecil.app/documentation/content/front-matter/",
      "title": "Front matter",
      "summary": "Custom and predefined page variables: menu, taxonomy, schedule, redirect, alias, output, etc.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-11-28T00:00:00+00:00","content_text": "Front matter\nThe front matter can contain custom variables applied to the current page.\nIt must be the first thing in the file and must be valid YAML.\nYAML is the default format: you can use INI, TOML or JSON instead with the pages.frontmatter option.\nThe front matter is validated: the types of predefined variables are checked, and you can declare your own rules (required variables, types, allowed values, default values, etc.) by section or by page with the pages.schema option.\nPredefined variables\n\n\n\nVariable\nDescription\nDefault value\nExample\n\n\n\n\ntitle\nTitle\nFile name without extension, prefix and language suffix.\nPost 1\n\n\nlayout\nTemplate\nSee Lookup rules.\n404\n\n\ndate\nCreation date\nFile modification date (PHP DateTime object).\n2019-04-15\n\n\nsection\nSection\nPage's Section.\nblog\n\n\npath\nPath\nPage's path.\nblog\/post-1\n\n\nslug\nSlug\nPage's slug.\npost-1\n\n\nweight\nSort order\nFile weight prefix, if any.\n10\n\n\nlanguage\nLanguage code\nFile language suffix, or the main language.\nfr\n\n\nlangref\nTranslations reference\nPage's path (without language).\nblog\/post-1\n\n\npublished\nPublished or not\ntrue.\nfalse\n\n\ndraft\nDraft or not\nfalse.\ntrue\n\n\n\nAll the predefined variables can be overridden except section.\nThe values of path and slug must already be slugified (e.g.: my-post, not My Post), otherwise the build fails. They can't contain . or .. segments.\ndraft: true is the same as published: false. Unpublished pages can be previewed with the --drafts option of the build and serve commands.\nupdated\nThe updated variable is used to define the last modification date of a page.\nExample:\n---\nupdated: 2026-02-02\n---\nlastmod is an alias of updated.\nBefore version 8.80.1, the updated variable was a predefined variable. It is now an optional variable (and must be defined in the front matter to be used).\nmenu\nA page can be added to a menu.\nThe entry name is the page title and the URL is the page path.\nThe same page can be added to multiple menus, and each entry's position can be set with the weight key (lowest first). The name key can be used to override the default entry name per menu.\nExamples:\n---\nmenu: main\n---\n---\nmenu: [main, navigation] # same page in multiple menus\n---\n---\nmenu:\n  main:\n    weight: 10\n  navigation:\n    weight: 20\n---\n---\ntitle: 'Our Expertise'\nmenu:\n  main:\n    weight: 15\n  footer:\n    weight: 15\n    name: \"Expertise\" # override the entry name in this menu\n---\nTaxonomy\nTaxonomy allows you to connect, relate and classify your website’s content.\nIn Cecil, these terms are gathered within vocabularies.\nVocabularies are declared in the Configuration.\n\nVocabulary\nA categorization of content (e.g.: tags, categories, etc.).\nTerm\nA term is an item of a vocabulary (e.g.: Development, PHP, etc.).\n\nExample:\n---\ntags: [\"Development\", \"PHP\"]\n---\nCecil then generates, for each vocabulary:\n\na page listing its terms, e.g.: \/tags\/\na page per term listing its pages, e.g.: \/tags\/development\/ and \/tags\/php\/\n\nSee templates lookup rules and taxonomy variables to customize those pages.\nSchedule\nSchedules pages’ publication.\nExample:\nThe page is published from 2023-02-07 (if the current date is &gt;= 2023-02-07):\n---\nschedule:\n  publish: 2023-02-07\n---\nThe page is published until 2022-04-28 (if the current date is &lt; 2022-04-28, i.e. before midnight):\n---\nschedule:\n  expiry: 2022-04-28\n---\nBoth can be combined: the page is published if the publish date is reached and the expiry date is not passed.\nredirect\nAs indicated by its name, the redirect variable is used to redirect a page to a dedicated URL.\nExample:\n---\nredirect: \"https:\/\/arnaudligny.fr\"\n---\nRedirect works with the redirect.html.twig template.\nalias\nAn alias is a redirection to the current page.\nExample:\n---\ntitle: \"About\"\nalias:\n  - contact\n---\nIn the previous example contact\/ redirects to about\/.\naliases is still supported for backward compatibility.\noutput\nDefines the output format of the page.\nAvailable formats are: html, atom, rss, json, xml, etc.\nYou can define one or more formats in an array.\nIt’s not required to define an output format, but if you do, it must be one of the available formats defined in the Configuration.\nExample:\n---\noutput: [html, atom]\n---\nuglyurl\nSet uglyurl to true to publish the page as a file named after its path (e.g.: blog\/post-1.html) instead of an index.html file in a folder (e.g.: blog\/post-1\/index.html).\nExample:\n---\nuglyurl: true\n---\nexternal\nA page with an external variable tries to fetch the content of the pointed resource, and uses it as the page body.\nExample:\n---\nexternal: \"https:\/\/raw.githubusercontent.com\/Cecilapp\/Cecil\/main\/README.md\"\n---\nThe resource can be:\n\na remote file, with an http:\/\/ or https:\/\/ URL (other schemes, like file:\/\/ or php:\/\/, are not allowed);\na local file, with a path relative to the site directory (e.g.: ..\/README.md), that must be inside the parent directory of the site.\n\nexcluded\nSet excluded to true to hide a page from list pages (e.g.: Home page, Section, Sitemap, etc.).\nExample:\n---\nexcluded: true\n---\nexcluded is different from published: an excluded page is published but hidden from list pages.\nSince version 8.49.0, the previous exclude variable has been renamed excluded (exclude is still supported for backward compatibility).",
      "content_html": "<h1>Front matter</h1>\n<p>The <em>front matter</em> can contain custom variables applied to the current page.</p>\n<p>It must be the first thing in the file and must be valid <a href=\"https://en.wikipedia.org/wiki/YAML\" target=\"_blank\" rel=\"noopener noreferrer\">YAML</a>.</p>\n<aside class=\"note note-info\"><p>YAML is the default format: you can use INI, TOML or JSON instead with the <a href=\"../configuration/4-pages.md#pages-frontmatter\"><code translate=\"no\">pages.frontmatter</code></a> option.</p></aside>\n<aside class=\"note note-tip\"><p>The front matter is validated: the types of predefined variables are checked, and you can declare your own rules (required variables, types, allowed values, default values, etc.) by section or by page with the <a href=\"../configuration/4-pages.md#pages-schema\"><code translate=\"no\">pages.schema</code></a> option.</p></aside>\n<h2 id=\"predefined-variables\">Predefined variables<a class=\"heading-anchor\" href=\"#predefined-variables\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n<th>Default value</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">title</code></td>\n<td>Title</td>\n<td>File name without extension, prefix and language suffix.</td>\n<td><code translate=\"no\">Post 1</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">layout</code></td>\n<td>Template</td>\n<td>See <a href=\"../templates/1-lookup-rules.md#lookup-rules\"><em>Lookup rules</em></a>.</td>\n<td><code translate=\"no\">404</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">date</code></td>\n<td>Creation date</td>\n<td>File modification date (PHP <em>DateTime</em> object).</td>\n<td><code translate=\"no\">2019-04-15</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">section</code></td>\n<td>Section</td>\n<td>Page's <em>Section</em>.</td>\n<td><code translate=\"no\">blog</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">path</code></td>\n<td>Path</td>\n<td>Page's <em>path</em>.</td>\n<td><code translate=\"no\">blog/post-1</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">slug</code></td>\n<td>Slug</td>\n<td>Page's <em>slug</em>.</td>\n<td><code translate=\"no\">post-1</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">weight</code></td>\n<td>Sort order</td>\n<td>File <a href=\"1-pages.md#weight\">weight prefix</a>, if any.</td>\n<td><code translate=\"no\">10</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">language</code></td>\n<td>Language code</td>\n<td>File language suffix, or the main <a href=\"../configuration/2-languages.md#language\">language</a>.</td>\n<td><code translate=\"no\">fr</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">langref</code></td>\n<td>Translations reference</td>\n<td>Page's <em>path</em> (without language).</td>\n<td><code translate=\"no\">blog/post-1</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">published</code></td>\n<td>Published or not</td>\n<td><code translate=\"no\">true</code>.</td>\n<td><code translate=\"no\">false</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">draft</code></td>\n<td>Draft or not</td>\n<td><code translate=\"no\">false</code>.</td>\n<td><code translate=\"no\">true</code></td>\n</tr>\n</tbody>\n</table>\n<aside class=\"note note-info\"><p>All the predefined variables can be overridden except <code translate=\"no\">section</code>.</p></aside>\n<aside class=\"note note-important\"><p>The values of <code translate=\"no\">path</code> and <code translate=\"no\">slug</code> must already be slugified (e.g.: <code translate=\"no\">my-post</code>, not <code translate=\"no\">My Post</code>), otherwise the build fails. They can't contain <code translate=\"no\">.</code> or <code translate=\"no\">..</code> segments.</p></aside>\n<aside class=\"note note-tip\"><p><code translate=\"no\">draft: true</code> is the same as <code translate=\"no\">published: false</code>. Unpublished pages can be previewed with the <code translate=\"no\">--drafts</code> option of the <a href=\"../commands/4-build.md\"><code translate=\"no\">build</code></a> and <a href=\"../commands/3-serve.md\"><code translate=\"no\">serve</code></a> commands.</p></aside>\n<h2 id=\"updated\">updated<a class=\"heading-anchor\" href=\"#updated\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The <code translate=\"no\">updated</code> variable is used to define the last modification date of a page.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">updated:</span> <span class=\"hljs-number\">2026</span><span class=\"hljs-number\">-02</span><span class=\"hljs-number\">-02</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<aside class=\"note note-info\"><p><code translate=\"no\">lastmod</code> is an alias of <code translate=\"no\">updated</code>.</p></aside>\n<aside class=\"note note-warning\"><p>Before version 8.80.1, the <code translate=\"no\">updated</code> variable was a predefined variable. It is now an optional variable (and must be defined in the front matter to be used).</p></aside>\n<h2 id=\"menu\">menu<a class=\"heading-anchor\" href=\"#menu\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>A page can be added to a <a href=\"../configuration/1-site.md#menus\">menu</a>.</p>\n<p>The entry name is the page <code translate=\"no\">title</code> and the URL is the page <code translate=\"no\">path</code>.</p>\n<p>The same page can be added to multiple menus, and each entry's position can be set with the <code translate=\"no\">weight</code> key (lowest first). The <code translate=\"no\">name</code> key can be used to override the default entry name per menu.</p>\n<p><em>Examples:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">menu:</span> <span class=\"hljs-string\">main</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">menu:</span> <span class=\"hljs-string\">[main,</span> <span class=\"hljs-string\">navigation]</span> <span class=\"hljs-comment\"># same page in multiple menus</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">menu:</span>\n  <span class=\"hljs-attr\">main:</span>\n    <span class=\"hljs-attr\">weight:</span> <span class=\"hljs-number\">10</span>\n  <span class=\"hljs-attr\">navigation:</span>\n    <span class=\"hljs-attr\">weight:</span> <span class=\"hljs-number\">20</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">'Our Expertise'</span>\n<span class=\"hljs-attr\">menu:</span>\n  <span class=\"hljs-attr\">main:</span>\n    <span class=\"hljs-attr\">weight:</span> <span class=\"hljs-number\">15</span>\n  <span class=\"hljs-attr\">footer:</span>\n    <span class=\"hljs-attr\">weight:</span> <span class=\"hljs-number\">15</span>\n    <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">\"Expertise\"</span> <span class=\"hljs-comment\"># override the entry name in this menu</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<h2 id=\"taxonomy\">Taxonomy<a class=\"heading-anchor\" href=\"#taxonomy\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Taxonomy allows you to connect, relate and classify your website’s content.<br>\nIn Cecil, these terms are gathered within vocabularies.</p>\n<p>Vocabularies are declared in the <a href=\"../configuration/1-site.md#taxonomies\"><em>Configuration</em></a>.</p>\n<dl>\n<dt>Vocabulary</dt>\n<dd>A categorization of content (e.g.: <code translate=\"no\">tags</code>, <code translate=\"no\">categories</code>, etc.).</dd>\n<dt>Term</dt>\n<dd>A term is an item of a vocabulary (e.g.: <code translate=\"no\">Development</code>, <code translate=\"no\">PHP</code>, etc.).</dd>\n</dl>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">tags:</span> <span class=\"hljs-string\">[\"Development\",</span> <span class=\"hljs-string\">\"PHP\"</span><span class=\"hljs-string\">]</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<p>Cecil then generates, for each vocabulary:</p>\n<ul>\n<li>a page listing its terms, e.g.: <code translate=\"no\">/tags/</code></li>\n<li>a page per term listing its pages, e.g.: <code translate=\"no\">/tags/development/</code> and <code translate=\"no\">/tags/php/</code></li>\n</ul>\n<p>See <a href=\"../templates/1-lookup-rules.md#type-vocabulary\">templates lookup rules</a> and <a href=\"../templates/2-variables.md#taxonomy\">taxonomy variables</a> to customize those pages.</p>\n<h2 id=\"schedule\">Schedule<a class=\"heading-anchor\" href=\"#schedule\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Schedules pages’ publication.</p>\n<p><em>Example:</em></p>\n<p>The page is published from 2023-02-07 (if the current date is &gt;= 2023-02-07):</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">schedule:</span>\n  <span class=\"hljs-attr\">publish:</span> <span class=\"hljs-number\">2023</span><span class=\"hljs-number\">-02</span><span class=\"hljs-number\">-07</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<p>The page is published until 2022-04-28 (if the current date is &lt; 2022-04-28, i.e. before midnight):</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">schedule:</span>\n  <span class=\"hljs-attr\">expiry:</span> <span class=\"hljs-number\">2022</span><span class=\"hljs-number\">-04</span><span class=\"hljs-number\">-28</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<p>Both can be combined: the page is published if the <code translate=\"no\">publish</code> date is reached <strong>and</strong> the <code translate=\"no\">expiry</code> date is not passed.</p>\n<h2 id=\"redirect\">redirect<a class=\"heading-anchor\" href=\"#redirect\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>As indicated by its name, the <code translate=\"no\">redirect</code> variable is used to redirect a page to a dedicated URL.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">redirect:</span> <span class=\"hljs-string\">\"https://arnaudligny.fr\"</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<aside class=\"note note-info\"><p>Redirect works with the <a href=\"https://github.com/Cecilapp/Cecil/blob/main/resources/layouts/_default/redirect.html.twig\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">redirect.html.twig</code></a> template.</p></aside>\n<h2 id=\"alias\">alias<a class=\"heading-anchor\" href=\"#alias\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>An alias is a redirection to the current page.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">\"About\"</span>\n<span class=\"hljs-attr\">alias:</span>\n  <span class=\"hljs-bullet\">-</span> <span class=\"hljs-string\">contact</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<p>In the previous example <code translate=\"no\">contact/</code> redirects to <code translate=\"no\">about/</code>.</p>\n<aside class=\"note note-info\"><p><code translate=\"no\">aliases</code> is still supported for backward compatibility.</p></aside>\n<h2 id=\"output\">output<a class=\"heading-anchor\" href=\"#output\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Defines the output format of the page.</p>\n<p>Available formats are: <code translate=\"no\">html</code>, <code translate=\"no\">atom</code>, <code translate=\"no\">rss</code>, <code translate=\"no\">json</code>, <code translate=\"no\">xml</code>, etc.<br>\nYou can define one or more formats in an array.</p>\n<p>It’s not required to define an output format, but if you do, it must be one of the available formats defined in the <a href=\"../configuration/8-output.md#output-formats\"><em>Configuration</em></a>.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">output:</span> <span class=\"hljs-string\">[html,</span> <span class=\"hljs-string\">atom]</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<h2 id=\"uglyurl\">uglyurl<a class=\"heading-anchor\" href=\"#uglyurl\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Set <code translate=\"no\">uglyurl</code> to <code translate=\"no\">true</code> to publish the page as a file named after its path (e.g.: <code translate=\"no\">blog/post-1.html</code>) instead of an <code translate=\"no\">index.html</code> file in a folder (e.g.: <code translate=\"no\">blog/post-1/index.html</code>).</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">uglyurl:</span> <span class=\"hljs-literal\">true</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<h2 id=\"external\">external<a class=\"heading-anchor\" href=\"#external\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>A page with an <code translate=\"no\">external</code> variable tries to fetch the content of the pointed resource, and uses it as the page body.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">external:</span> <span class=\"hljs-string\">\"https://raw.githubusercontent.com/Cecilapp/Cecil/main/README.md\"</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<p>The resource can be:</p>\n<ul>\n<li>a remote file, with an <code translate=\"no\">http://</code> or <code translate=\"no\">https://</code> URL (other schemes, like <code translate=\"no\">file://</code> or <code translate=\"no\">php://</code>, are not allowed);</li>\n<li>a local file, with a path relative to the site directory (e.g.: <code translate=\"no\">../README.md</code>), that must be inside the parent directory of the site.</li>\n</ul>\n<h2 id=\"excluded\">excluded<a class=\"heading-anchor\" href=\"#excluded\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Set <code translate=\"no\">excluded</code> to <code translate=\"no\">true</code> to hide a page from list pages (e.g.: <em>Home page</em>, <em>Section</em>, <em>Sitemap</em>, etc.).</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">excluded:</span> <span class=\"hljs-literal\">true</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<aside class=\"note note-info\"><p><code translate=\"no\">excluded</code> is different from <a href=\"#predefined-variables\"><code translate=\"no\">published</code></a>: an excluded page is published but hidden from list pages.</p></aside>\n<aside class=\"note note-warning\"><p>Since version 8.49.0, the previous <code translate=\"no\">exclude</code> variable has been renamed <code translate=\"no\">excluded</code> (<code translate=\"no\">exclude</code> is still supported for backward compatibility).</p></aside>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/templates/variables/",
      "url": "https://cloudflare.cecil.app/documentation/templates/variables/",
      "title": "Variables",
      "summary": "Variables available in templates: site, page and cecil.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-19T00:00:00+00:00","content_text": "Variables\n\nThe application passes variables to the templates for manipulation in the template. Variables may have attributes or elements you can access, too.\nUse a dot (.) to access attributes of a variable: {{ foo.bar }}\n\nYou can use variables from different scopes: site, page, cecil.\nsite\nThe site variable contains built-in variables and those set in the configuration.\n\n\n\nVariable\nDescription\n\n\n\n\nsite.pages\nCollection of all pages, in the current language.\n\n\nsite.allpages\nCollection of all pages, in all languages.\n\n\nsite.page(id)\nA page with the given ID.\n\n\nsite.taxonomies\nCollection of vocabularies.\n\n\nsite.home\nID of the home page.\n\n\nsite.time\nCurrent Timestamp.\n\n\nsite.debug\nDebug mode status (true or false).\n\n\nsite.build\nCurrent build ID.\n\n\n\nExample:\ntitle: \"My amazing website!\"\nCan be displayed in a template with:\n{{ site.title }}\nUse showable method on pages collection to return only published and not paginated\/redirect\/excluded pages (generated pages, such as sections or taxonomies, are included).\nExample:\n{% for page in site.pages.showable %}\n  &lt;a href=\"{{ url(page) }}\"&gt;{{ page.title }}&lt;\/a&gt;\n{% endfor %}\nIn some cases, you can encounter conflicts between configuration and built-in variables (e.g. pages.default configuration). In that case, you can use config.&lt;variable&gt; (where &lt;variable&gt; is the variable name\/path) to access the raw configuration directly.\nExample:\n{{ config.pages.default.sitemap.priority }}\nsite.menus\nLoop on site.menus.&lt;menu&gt; to get each entry of the &lt;menu&gt; collection (e.g.: main).\n\n\n\nVariable\nDescription\n\n\n\n\n&lt;entry&gt;.id\nEntry ID (for a page entry: the page ID without language prefix).\n\n\n&lt;entry&gt;.name\nEntry name.\n\n\n&lt;entry&gt;.url\nEntry URL.\n\n\n&lt;entry&gt;.weight\nEntry weight (useful to sort menu entries).\n\n\n\nExample:\n&lt;nav&gt;\n  &lt;ol&gt;\n  {% for entry in site.menus.main|sort_by_weight %}\n    &lt;li&gt;&lt;a href=\"{{ url(entry.url) }}\" data-weight=\"{{ entry.weight }}\"&gt;{{ entry.name }}&lt;\/a&gt;&lt;\/li&gt;\n  {% endfor %}\n  &lt;\/ol&gt;\n&lt;\/nav&gt;\nsite.language\nInformation about the current language.\n\n\n\nVariable\nDescription\n\n\n\n\nsite.language\nLanguage code (e.g.: en).\n\n\nsite.language.name\nLanguage name (e.g.: English).\n\n\nsite.language.locale\nLanguage locale code (e.g.: en_US).\n\n\nsite.language.weight\nLanguage position in the languages list.\n\n\n\nYou can retrieve name, locale and weight of a specific language by passing its code as a parameter.\ne.g.: site.language.name('fr').\nsite.static\nThe static files collection can be accessed via site.static if the static load is enabled.\nEach file exposes the following properties:\n\nfile: relative file path, as found in the static\/ directory (e.g.: images\/img-1.jpg)\npath: relative path, with forward slashes (e.g.: images\/img-1.jpg)\ndate: creation date (DateTime)\nupdated: modification date (DateTime)\nname: name (e.g.: img-1.jpg)\nbasename: name without extension (e.g.: img-1)\next: extension (e.g.: jpg)\ntype: media type (e.g.: image)\nsubtype: media sub type (e.g.: image\/jpeg)\nexif: image EXIF data (array)\naudio: Mp3Info object\nvideo: array of basic video information (duration in seconds, width and height)\n\nsite.data\nA data collection can be accessed via site.data.&lt;filename&gt; (without file extension).\nExamples:\n\ndata\/authors.yml : site.data.authors\ndata\/authors.fr.yml : site.data.authors (if site.language = \"fr\")\ndata\/galleries\/gallery-1.json : site.data.galleries['gallery-1']\n\npage\nThe page variable contains built-in variables of a page and those set in the front matter.\n\n\n\nVariable\nDescription\nExample\n\n\n\n\npage.id\nUnique identifier.\nblog\/post-1\n\n\npage.title\nFile name (without extension).\nPost 1\n\n\npage.date\nFile creation date.\nDateTime\n\n\npage.body\nFile body.\nMarkdown\n\n\npage.content\nFile body converted in HTML.\nHTML\n\n\npage.section\nFile root folder (slugified).\nblog\n\n\npage.path\nFile path (slugified).\nblog\/post-1\n\n\npage.slug\nFile name (slugified).\npost-1\n\n\npage.filepath\nFile system path.\nBlog\/Post 1.md\n\n\npage.type\nhomepage, page, section, vocabulary or term.\npage\n\n\npage.pages\nCollection of all sub pages.\nCollection\n\n\npage.translations\nCollection of translated pages.\nCollection\n\n\n\nUse showable method on pages collection to return only published and not paginated\/redirect\/excluded pages (generated pages, such as sections or taxonomies, are included).\nExample:\n{% for page in page.pages.showable %}\n  &lt;a href=\"{{ url(page) }}\"&gt;{{ page.title }}&lt;\/a&gt;\n{% endfor %}\nNested sections\nIn a nested sections context, page.parent, page.ancestors, page.sections and page.toplevel help you build navigation.\n\n\n\nVariable\nDescription\nExample\n\n\n\n\npage.parent\nParent section's page (null if none).\nPage\n\n\npage.ancestors\nCollection of ancestor sections (nearest first).\nCollection\n\n\npage.sections\nCollection of immediate descendant sections.\nCollection\n\n\npage.toplevel\ntrue if the page is a top level section.\nBoolean\n\n\n\nBreadcrumb (from the home page to the current page):\n&lt;nav aria-label=\"breadcrumb\"&gt;\n  &lt;ul&gt;\n    &lt;li&gt;&lt;a href=\"{{ url(site.home) }}\"&gt;{{ site.title }}&lt;\/a&gt;&lt;\/li&gt;\n    {% for section in page.ancestors|reverse %}\n    &lt;li&gt;&lt;a href=\"{{ url(section) }}\"&gt;{{ section.title }}&lt;\/a&gt;&lt;\/li&gt;\n    {% endfor %}\n    {% if page.id != site.home %}\n    &lt;li&gt;&lt;a href=\"{{ url(page) }}\" aria-current=\"page\"&gt;{{ page.title }}&lt;\/a&gt;&lt;\/li&gt;\n    {% endif %}\n  &lt;\/ul&gt;\n&lt;\/nav&gt;\nA ready-to-use breadcrumb.html.twig partial is available:\n{{ include('partials\/breadcrumb.html.twig') }}\nSub-sections menu (immediate descendant sections of the current section):\n{% if page.sections|length %}\n&lt;ul&gt;\n  {% for section in page.sections|sort_by_title %}\n  &lt;li&gt;&lt;a href=\"{{ url(section) }}\"&gt;{{ section.title }}&lt;\/a&gt;&lt;\/li&gt;\n  {% endfor %}\n&lt;\/ul&gt;\n{% endif %}\nMain navigation limited to top level sections (from any page):\n&lt;nav&gt;\n  {% for section in site.page(site.home).sections|sort_by_title %}\n  &lt;a href=\"{{ url(section) }}\"&gt;{{ section.title }}&lt;\/a&gt;\n  {% endfor %}\n&lt;\/nav&gt;\nLink to the parent section:\n{% if page.parent %}\n&lt;a href=\"{{ url(page.parent) }}\"&gt;← {{ page.parent.title }}&lt;\/a&gt;\n{% endif %}\npage.&lt;prev\/next&gt;\nNavigation between pages within the same section, sorted according to the section's sortby (chronological order for dates).\nWith sub-sections, navigation follows the sections tree: the pages of a top level Section and of all its sub-sections are chained, each sub-section (its index page) being placed among the pages of its parent Section and followed by its own pages.\n\n\n\nVariable\nDescription\nExample\n\n\n\n\npage.prev\nPrevious page.\nPage\n\n\npage.next\nNext page.\nPage\n\n\n\nExample:\n{% if page.prev is defined %}\n&lt;a href=\"{{ url(page.prev) }}\"&gt;{{ page.prev.title }}&lt;\/a&gt;\n{% endif %}\npage.paginator\nPaginator helps you build navigation for list pages: homepage, sections, and taxonomies.\n\n\n\nVariable\nDescription\n\n\n\n\npage.paginator.pages\nPages Collection.\n\n\npage.paginator.pages_total\nTotal number of pages.\n\n\npage.paginator.count\nNumber of paginator's pages.\n\n\npage.paginator.current\nPosition index of the current page.\n\n\npage.paginator.links.first\nPage ID of the first page.\n\n\npage.paginator.links.prev\nPage ID of the previous page.\n\n\npage.paginator.links.self\nPage ID of the current page.\n\n\npage.paginator.links.next\nPage ID of the next page.\n\n\npage.paginator.links.last\nPage ID of the last page.\n\n\npage.paginator.links.path\nPage ID without the position index.\n\n\n\nBecause links entries are Page ID you must use the url() function to create working links.\ne.g.: {{ url(page.paginator.links.next) }}\nExample:\n{% if page.paginator %}\n&lt;div&gt;\n  {% if page.paginator.links.prev is defined %}\n  &lt;a href=\"{{ url(page.paginator.links.prev) }}\"&gt;Previous&lt;\/a&gt;\n  {% endif %}\n  {% if page.paginator.links.next is defined %}\n  &lt;a href=\"{{ url(page.paginator.links.next) }}\"&gt;Next&lt;\/a&gt;\n  {% endif %}\n&lt;\/div&gt;\n{% endif %}\nExample:\n{% if page.paginator %}\n&lt;div&gt;\n  {% for paginator_index in 1..page.paginator.count %}\n    {% if paginator_index != page.paginator.current %}\n      {% if paginator_index == 1 %}\n  &lt;a href=\"{{ url(page.paginator.links.first) }}\"&gt;{{ paginator_index }}&lt;\/a&gt;\n      {% else %}\n  &lt;a href=\"{{ url(page.paginator.links.path ~ '\/' ~ paginator_index) }}\"&gt;{{ paginator_index }}&lt;\/a&gt;\n      {% endif %}\n    {% else %}\n  {{ paginator_index }}\n    {% endif %}\n  {% endfor %}\n&lt;\/div&gt;\n{% endif %}\nTaxonomy\nVariables available in vocabulary and term templates.\nVocabulary\nPage \/&lt;plural&gt;\/ (e.g.: \/categories\/).\n\n\n\nVariable\nDescription\n\n\n\n\npage.plural\nVocabulary name in plural form.\n\n\npage.singular\nVocabulary name in singular form.\n\n\npage.terms\nList of terms (Collection).\n\n\n\nEach term of page.terms provides term.id (term ID, e.g.: categories\/php), term.name (term name, e.g.: PHP) and the number of its pages with term|length.\nTerm\nPage \/&lt;plural&gt;\/&lt;term&gt;\/ (e.g.: \/categories\/php\/).\n\n\n\nVariable\nDescription\n\n\n\n\npage.title\nTerm name.\n\n\npage.term\nTerm ID (e.g.: categories\/php).\n\n\npage.plural\nVocabulary name in plural form.\n\n\npage.singular\nVocabulary name in singular form.\n\n\npage.pages\nList of pages in this term, sorted by date (Collection).\n\n\n\nTaxonomy example\nConfiguration:\ntaxonomies:\n  categories: category\nPage front matter:\n---\ncategories: [\"Data Sovereignty\"]\n---\nList of terms (\/categories\/), in layouts\/taxonomy\/categories.html.twig:\n{% extends 'page.html.twig' %}\n\n{% block content %}\n  &lt;h1&gt;{{ page.title }}&lt;\/h1&gt;\n  &lt;ul&gt;\n  {% for term in page.terms %}\n    &lt;li&gt;&lt;a href=\"{{ url(term.id) }}\"&gt;{{ term.name }}&lt;\/a&gt; ({{ term|length }})&lt;\/li&gt;\n  {% endfor %}\n  &lt;\/ul&gt;\n{% endblock %}\nList of pages of a term (\/categories\/data-sovereignty\/), in layouts\/taxonomy\/category.html.twig:\n{% extends 'page.html.twig' %}\n\n{% block content %}\n  &lt;h1&gt;{{ page.title }}&lt;\/h1&gt;\n  {% for p in page.paginator.pages ?? page.pages %}\n    &lt;article&gt;\n      &lt;h2&gt;&lt;a href=\"{{ url(p) }}\"&gt;{{ p.title }}&lt;\/a&gt;&lt;\/h2&gt;\n    &lt;\/article&gt;\n  {% endfor %}\n  &lt;a href=\"{{ url(page.plural) }}\"&gt;All {{ page.plural }}&lt;\/a&gt;\n{% endblock %}\nLinks to the terms of the current page, in a page template:\n{% for category in page.categories ?? [] %}\n  &lt;a href=\"{{ url('categories\/' ~ category) }}\"&gt;{{ category }}&lt;\/a&gt;\n{% endfor %}\nThe url() function slugifies the given string to find the matching page: url('categories\/Data Sovereignty') returns \/categories\/data-sovereignty\/.\nYou can also use the built-in partial {{ include('partials\/terms-list.html.twig', {vocabulary: 'categories'}) }}.\ncecil\n\n\n\nVariable\nDescription\n\n\n\n\ncecil.url\nURL of the Cecil website.\n\n\ncecil.version\nCecil current version.\n\n\ncecil.poweredby\nPrints Cecil v%s, where %s is the current version.\n\n\n",
      "content_html": "<h1>Variables</h1>\n<blockquote>\n<p>The application passes variables to the templates for manipulation in the template. Variables may have attributes or elements you can access, too.<br>\nUse a dot (.) to access attributes of a variable: <code translate=\"no\">{{ foo.bar }}</code></p>\n</blockquote>\n<p>You can use variables from different scopes: <a href=\"#site\"><code translate=\"no\">site</code></a>, <a href=\"#page\"><code translate=\"no\">page</code></a>, <a href=\"#cecil\"><code translate=\"no\">cecil</code></a>.</p>\n<h2 id=\"site\">site<a class=\"heading-anchor\" href=\"#site\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The <code translate=\"no\">site</code> variable contains built-in variables <strong>and</strong> those set in the <a href=\"../configuration/index.md\">configuration</a>.</p>\n<table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">site.pages</code></td>\n<td>Collection of all pages, in the current language.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">site.allpages</code></td>\n<td>Collection of all pages, in all languages.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">site.page(id)</code></td>\n<td>A page with the given ID.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">site.taxonomies</code></td>\n<td>Collection of vocabularies.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">site.home</code></td>\n<td>ID of the home page.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">site.time</code></td>\n<td>Current <a href=\"https://wikipedia.org/wiki/Unix_time\" target=\"_blank\" rel=\"noopener noreferrer\"><em>Timestamp</em></a>.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">site.debug</code></td>\n<td>Debug mode status (<code translate=\"no\">true</code> or <code translate=\"no\">false</code>).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">site.build</code></td>\n<td>Current build ID.</td>\n</tr>\n</tbody>\n</table>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">\"My amazing website!\"</span></code></pre>\n<p>Can be displayed in a template with:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ site.title }}</span></code></pre>\n<aside class=\"note note-important\"><p>Use <code translate=\"no\">showable</code> method on pages collection to return only published and not <em>paginated/redirect/excluded</em> pages (generated pages, such as sections or taxonomies, are included).</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> page in site.pages.showable %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(page) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ page.title }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span></code></pre></aside>\n<aside class=\"note note-warning\"><p>In some cases, you can encounter conflicts between configuration and built-in variables (e.g. <code translate=\"no\">pages.default</code> configuration). In that case, you can use <code translate=\"no\">config.&lt;variable&gt;</code> (where <code translate=\"no\">&lt;variable&gt;</code> is the variable name/path) to access the raw configuration directly.</p>\n<p>Example:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ config.pages.default.sitemap.priority }}</span></code></pre></aside>\n<h3 id=\"site-menus\">site.menus<a class=\"heading-anchor\" href=\"#site-menus\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Loop on <code translate=\"no\">site.menus.&lt;menu&gt;</code> to get each entry of the <code translate=\"no\">&lt;menu&gt;</code> collection (e.g.: <code translate=\"no\">main</code>).</p>\n<table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">&lt;entry&gt;.id</code></td>\n<td>Entry ID (for a page entry: the page ID without language prefix).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">&lt;entry&gt;.name</code></td>\n<td>Entry name.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">&lt;entry&gt;.url</code></td>\n<td>Entry URL.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">&lt;entry&gt;.weight</code></td>\n<td>Entry weight (useful to sort menu entries).</td>\n</tr>\n</tbody>\n</table>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">nav</span>&gt;</span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">ol</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> entry in site.menus.main|sort_by_weight %}</span><span class=\"xml\">\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li</span>&gt;</span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(entry.url) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">data-weight</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ entry.weight }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ entry.name }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">li</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">ol</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">nav</span>&gt;</span></span></code></pre>\n<h3 id=\"site-language\">site.language<a class=\"heading-anchor\" href=\"#site-language\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Information about the current language.</p>\n<table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">site.language</code></td>\n<td>Language code (e.g.: <code translate=\"no\">en</code>).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">site.language.name</code></td>\n<td>Language name (e.g.: <code translate=\"no\">English</code>).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">site.language.locale</code></td>\n<td>Language <a href=\"../configuration/3-locale-codes.md\">locale code</a> (e.g.: <code translate=\"no\">en_US</code>).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">site.language.weight</code></td>\n<td>Language position in the <code translate=\"no\">languages</code> list.</td>\n</tr>\n</tbody>\n</table>\n<aside class=\"note note-tip\"><p>You can retrieve <code translate=\"no\">name</code>, <code translate=\"no\">locale</code> and <code translate=\"no\">weight</code> of a specific language by passing its code as a parameter.<br>\ne.g.: <code translate=\"no\">site.language.name('fr')</code>.</p></aside>\n<h3 id=\"site-static\">site.static<a class=\"heading-anchor\" href=\"#site-static\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>The static files collection can be accessed via <code translate=\"no\">site.static</code> if the <a href=\"../configuration/5-data-static.md#static-load\"><em>static load</em></a> is enabled.</p>\n<p>Each file exposes the following properties:</p>\n<ul>\n<li><code translate=\"no\">file</code>: relative file path, as found in the <code translate=\"no\">static/</code> directory (e.g.: <code translate=\"no\">images/img-1.jpg</code>)</li>\n<li><code translate=\"no\">path</code>: relative path, with forward slashes (e.g.: <code translate=\"no\">images/img-1.jpg</code>)</li>\n<li><code translate=\"no\">date</code>: creation date (<em>DateTime</em>)</li>\n<li><code translate=\"no\">updated</code>: modification date (<em>DateTime</em>)</li>\n<li><code translate=\"no\">name</code>: name (e.g.: <code translate=\"no\">img-1.jpg</code>)</li>\n<li><code translate=\"no\">basename</code>: name without extension (e.g.: <code translate=\"no\">img-1</code>)</li>\n<li><code translate=\"no\">ext</code>: extension (e.g.: <code translate=\"no\">jpg</code>)</li>\n<li><code translate=\"no\">type</code>: media type (e.g.: <code translate=\"no\">image</code>)</li>\n<li><code translate=\"no\">subtype</code>: media sub type (e.g.: <code translate=\"no\">image/jpeg</code>)</li>\n<li><code translate=\"no\">exif</code>: image EXIF data (<em>array</em>)</li>\n<li><code translate=\"no\">audio</code>: <a href=\"https://github.com/wapmorgan/Mp3Info#audio-information\" target=\"_blank\" rel=\"noopener noreferrer\">Mp3Info</a> object</li>\n<li><code translate=\"no\">video</code>: array of basic video information (duration in seconds, width and height)</li>\n</ul>\n<h3 id=\"site-data\">site.data<a class=\"heading-anchor\" href=\"#site-data\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>A data collection can be accessed via <code translate=\"no\">site.data.&lt;filename&gt;</code> (without file extension).</p>\n<p><em>Examples:</em></p>\n<ul>\n<li><code translate=\"no\">data/authors.yml</code> : <code translate=\"no\">site.data.authors</code></li>\n<li><code translate=\"no\">data/authors.fr.yml</code> : <code translate=\"no\">site.data.authors</code> (if <code translate=\"no\">site.language</code> = \"fr\")</li>\n<li><code translate=\"no\">data/galleries/gallery-1.json</code> : <code translate=\"no\">site.data.galleries['gallery-1']</code></li>\n</ul>\n<h2 id=\"page\">page<a class=\"heading-anchor\" href=\"#page\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The <code translate=\"no\">page</code> variable contains built-in variables of a page <strong>and</strong> those set in the <a href=\"../content/1-pages.md#front-matter\">front matter</a>.</p>\n<table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">page.id</code></td>\n<td>Unique identifier.</td>\n<td><code translate=\"no\">blog/post-1</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.title</code></td>\n<td>File name (without extension).</td>\n<td><code translate=\"no\">Post 1</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.date</code></td>\n<td>File creation date.</td>\n<td><em>DateTime</em></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.body</code></td>\n<td>File body.</td>\n<td><em>Markdown</em></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.content</code></td>\n<td>File body converted in HTML.</td>\n<td><em>HTML</em></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.section</code></td>\n<td>File root folder (<em>slugified</em>).</td>\n<td><code translate=\"no\">blog</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.path</code></td>\n<td>File path (<em>slugified</em>).</td>\n<td><code translate=\"no\">blog/post-1</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.slug</code></td>\n<td>File name (<em>slugified</em>).</td>\n<td><code translate=\"no\">post-1</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.filepath</code></td>\n<td>File system path.</td>\n<td><code translate=\"no\">Blog/Post 1.md</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.type</code></td>\n<td><code translate=\"no\">homepage</code>, <code translate=\"no\">page</code>, <code translate=\"no\">section</code>, <code translate=\"no\">vocabulary</code> or <code translate=\"no\">term</code>.</td>\n<td><code translate=\"no\">page</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.pages</code></td>\n<td>Collection of all sub pages.</td>\n<td><em>Collection</em></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.translations</code></td>\n<td>Collection of translated pages.</td>\n<td><em>Collection</em></td>\n</tr>\n</tbody>\n</table>\n<aside class=\"note note-important\"><p>Use <code translate=\"no\">showable</code> method on pages collection to return only published and not <em>paginated/redirect/excluded</em> pages (generated pages, such as sections or taxonomies, are included).</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> page in page.pages.showable %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(page) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ page.title }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span></code></pre></aside>\n<h3 id=\"nested-sections\">Nested sections<a class=\"heading-anchor\" href=\"#nested-sections\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>In a <a href=\"../content/1-pages.md#sub-section\">nested sections</a> context, <code translate=\"no\">page.parent</code>, <code translate=\"no\">page.ancestors</code>, <code translate=\"no\">page.sections</code> and <code translate=\"no\">page.toplevel</code> help you build navigation.</p>\n<table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">page.parent</code></td>\n<td>Parent <em>section</em>'s page (<code translate=\"no\">null</code> if none).</td>\n<td><em>Page</em></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.ancestors</code></td>\n<td>Collection of ancestor <em>sections</em> (nearest first).</td>\n<td><em>Collection</em></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.sections</code></td>\n<td>Collection of immediate descendant <em>sections</em>.</td>\n<td><em>Collection</em></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.toplevel</code></td>\n<td><code translate=\"no\">true</code> if the page is a top level <em>section</em>.</td>\n<td><em>Boolean</em></td>\n</tr>\n</tbody>\n</table>\n<p><em>Breadcrumb (from the home page to the current page):</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">nav</span> <span class=\"hljs-attr\">aria-label</span>=<span class=\"hljs-string\">\"breadcrumb\"</span>&gt;</span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">ul</span>&gt;</span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li</span>&gt;</span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(site.home) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ site.title }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">li</span>&gt;</span>\n    </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> section in page.ancestors|<span class=\"hljs-keyword\">reverse</span> %}</span><span class=\"xml\">\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li</span>&gt;</span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(section) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ section.title }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">li</span>&gt;</span>\n    </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span><span class=\"xml\">\n    </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">if</span></span> page.id != site.home %}</span><span class=\"xml\">\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li</span>&gt;</span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(page) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">aria-current</span>=<span class=\"hljs-string\">\"page\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ page.title }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">li</span>&gt;</span>\n    </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endif</span></span> %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">ul</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">nav</span>&gt;</span></span></code></pre>\n<aside class=\"note note-tip\"><p>A ready-to-use <a href=\"https://github.com/Cecilapp/Cecil/blob/main/resources/layouts/partials/breadcrumb.html.twig\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">breadcrumb.html.twig</code></a> partial is available:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ <span class=\"hljs-name\">include</span><span class=\"hljs-params\">('partials/breadcrumb.html.twig')</span> }}</span></code></pre></aside>\n<p><em>Sub-sections menu (immediate descendant sections of the current section):</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">if</span></span> page.sections|<span class=\"hljs-keyword\">length</span> %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">ul</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> section in page.sections|sort_by_title %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li</span>&gt;</span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(section) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ section.title }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">li</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">ul</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endif</span></span> %}</span></code></pre>\n<p><em>Main navigation limited to top level sections (from any page):</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">nav</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> section in site.page(site.home).sections|sort_by_title %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(section) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ section.title }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">nav</span>&gt;</span></span></code></pre>\n<p><em>Link to the parent section:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">if</span></span> page.<span class=\"hljs-name\">parent</span> %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(page.<span class=\"hljs-name\">parent</span>) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span>← </span><span class=\"hljs-template-variable\">{{ page.<span class=\"hljs-name\">parent</span>.title }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endif</span></span> %}</span></code></pre>\n<h3 id=\"page-prev-next\">page.&lt;prev/next&gt;<a class=\"heading-anchor\" href=\"#page-prev-next\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Navigation between pages within the same <em>section</em>, sorted according to the section's <code translate=\"no\">sortby</code> (chronological order for dates).</p>\n<p>With <a href=\"../content/1-pages.md#sub-section\">sub-sections</a>, navigation follows the sections tree: the pages of a top level <em>Section</em> and of all its sub-sections are chained, each sub-section (its index page) being placed among the pages of its parent <em>Section</em> and followed by its own pages.</p>\n<table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">page.prev</code></td>\n<td>Previous page.</td>\n<td><em>Page</em></td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.next</code></td>\n<td>Next page.</td>\n<td><em>Page</em></td>\n</tr>\n</tbody>\n</table>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">if</span></span> page.prev is defined %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(page.prev) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ page.prev.title }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endif</span></span> %}</span></code></pre>\n<h3 id=\"page-paginator\">page.paginator<a class=\"heading-anchor\" href=\"#page-paginator\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p><em>Paginator</em> helps you build navigation for list pages: homepage, sections, and taxonomies.</p>\n<table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">page.paginator.pages</code></td>\n<td>Pages Collection.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.paginator.pages_total</code></td>\n<td>Total number of pages.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.paginator.count</code></td>\n<td>Number of paginator's pages.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.paginator.current</code></td>\n<td>Position index of the current page.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.paginator.links.first</code></td>\n<td>Page ID of the first page.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.paginator.links.prev</code></td>\n<td>Page ID of the previous page.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.paginator.links.self</code></td>\n<td>Page ID of the current page.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.paginator.links.next</code></td>\n<td>Page ID of the next page.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.paginator.links.last</code></td>\n<td>Page ID of the last page.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.paginator.links.path</code></td>\n<td>Page ID without the position index.</td>\n</tr>\n</tbody>\n</table>\n<aside class=\"note note-important\"><p>Because links entries are Page ID you must use the <code translate=\"no\">url()</code> function to create working links.<br>\ne.g.: <code translate=\"no\">{{ url(page.paginator.links.next) }}</code></p></aside>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">if</span></span> page.paginator %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">if</span></span> page.paginator.links.prev is defined %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(page.paginator.links.prev) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span>Previous<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endif</span></span> %}</span><span class=\"xml\">\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">if</span></span> page.paginator.links.next is defined %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(page.paginator.links.next) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span>Next<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endif</span></span> %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endif</span></span> %}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">if</span></span> page.paginator %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> paginator_index in 1..page.paginator.count %}</span><span class=\"xml\">\n    </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">if</span></span> paginator_index != page.paginator.current %}</span><span class=\"xml\">\n      </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">if</span></span> paginator_index == 1 %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(page.paginator.links.first) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ paginator_index }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span>\n      </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">else</span> %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(page.paginator.links.path ~ '/' ~ paginator_index) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ paginator_index }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span>\n      </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endif</span></span> %}</span><span class=\"xml\">\n    </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">else</span> %}</span><span class=\"xml\">\n  </span><span class=\"hljs-template-variable\">{{ paginator_index }}</span><span class=\"xml\">\n    </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endif</span></span> %}</span><span class=\"xml\">\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endif</span></span> %}</span></code></pre>\n<h3 id=\"taxonomy\">Taxonomy<a class=\"heading-anchor\" href=\"#taxonomy\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Variables available in <em>vocabulary</em> and <em>term</em> templates.</p>\n<h4 id=\"vocabulary\">Vocabulary</h4>\n<p>Page <code translate=\"no\">/&lt;plural&gt;/</code> (e.g.: <code translate=\"no\">/categories/</code>).</p>\n<table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">page.plural</code></td>\n<td>Vocabulary name in plural form.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.singular</code></td>\n<td>Vocabulary name in singular form.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.terms</code></td>\n<td>List of terms (<em>Collection</em>).</td>\n</tr>\n</tbody>\n</table>\n<p>Each term of <code translate=\"no\">page.terms</code> provides <code translate=\"no\">term.id</code> (term ID, e.g.: <code translate=\"no\">categories/php</code>), <code translate=\"no\">term.name</code> (term name, e.g.: <code translate=\"no\">PHP</code>) and the number of its pages with <code translate=\"no\">term|length</code>.</p>\n<h4 id=\"term\">Term</h4>\n<p>Page <code translate=\"no\">/&lt;plural&gt;/&lt;term&gt;/</code> (e.g.: <code translate=\"no\">/categories/php/</code>).</p>\n<table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">page.title</code></td>\n<td>Term name.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.term</code></td>\n<td>Term ID (e.g.: <code translate=\"no\">categories/php</code>).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.plural</code></td>\n<td>Vocabulary name in plural form.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.singular</code></td>\n<td>Vocabulary name in singular form.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">page.pages</code></td>\n<td>List of pages in this term, sorted by date (<em>Collection</em>).</td>\n</tr>\n</tbody>\n</table>\n<h4 id=\"taxonomy-example\">Taxonomy example</h4>\n<p>Configuration:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">taxonomies:</span>\n  <span class=\"hljs-attr\">categories:</span> <span class=\"hljs-string\">category</span></code></pre>\n<p>Page front matter:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">categories:</span> <span class=\"hljs-string\">[\"Data</span> <span class=\"hljs-string\">Sovereignty\"]</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<p>List of terms (<code translate=\"no\">/categories/</code>), in <code translate=\"no\">layouts/taxonomy/categories.html.twig</code>:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">extends</span></span> 'page.html.twig' %}</span><span class=\"xml\">\n\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">block</span></span> content %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h1</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ page.title }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">h1</span>&gt;</span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">ul</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> term in page.terms %}</span><span class=\"xml\">\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li</span>&gt;</span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(term.id) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ term.name }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span> (</span><span class=\"hljs-template-variable\">{{ term|<span class=\"hljs-keyword\">length</span> }}</span><span class=\"xml\">)<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">li</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">ul</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endblock</span></span> %}</span></code></pre>\n<p>List of pages of a term (<code translate=\"no\">/categories/data-sovereignty/</code>), in <code translate=\"no\">layouts/taxonomy/category.html.twig</code>:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">extends</span></span> 'page.html.twig' %}</span><span class=\"xml\">\n\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">block</span></span> content %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h1</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ page.title }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">h1</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> p in page.paginator.pages ?? page.pages %}</span><span class=\"xml\">\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">article</span>&gt;</span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2</span>&gt;</span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(p) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ p.title }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">h2</span>&gt;</span>\n    <span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">article</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(page.plural) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span>All </span><span class=\"hljs-template-variable\">{{ page.plural }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endblock</span></span> %}</span></code></pre>\n<p>Links to the terms of the current page, in a page template:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> category in page.categories ?? [] %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url('categories/' ~ category) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ category }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span></code></pre>\n<aside class=\"note note-tip\"><p>The <a href=\"reference/1-functions.md#url\"><code translate=\"no\">url()</code></a> function slugifies the given string to find the matching page: <code translate=\"no\">url('categories/Data Sovereignty')</code> returns <code translate=\"no\">/categories/data-sovereignty/</code>.</p>\n<p>You can also use the built-in partial <code translate=\"no\">{{ include('partials/terms-list.html.twig', {vocabulary: 'categories'}) }}</code>.</p></aside>\n<h2 id=\"cecil\">cecil<a class=\"heading-anchor\" href=\"#cecil\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">cecil.url</code></td>\n<td>URL of the Cecil website.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">cecil.version</code></td>\n<td>Cecil current version.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">cecil.poweredby</code></td>\n<td>Prints <code translate=\"no\">Cecil v%s</code>, where <code translate=\"no\">%s</code> is the current version.</td>\n</tr>\n</tbody>\n</table>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/templates/reference/sorts/",
      "url": "https://cloudflare.cecil.app/documentation/templates/reference/sorts/",
      "title": "Sorts",
      "summary": "Sort collections of pages, menus or taxonomies.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "Sorts\nSorting collections (of pages, menus or taxonomies).\nsort_by_title\nSorts a collection by title (with natural sort).\n{{ collection|sort_by_title }}\nExample:\n{{ site.pages|sort_by_title }}\nsort_by_date\nSorts a collection by date (most recent first).\n{{ collection|sort_by_date(variable='date', desc_title=false) }}\n\nvariable: the date variable to sort by (date by default)\ndesc_title: sorts items with the same date by title, in descending order (false by default)\n\nExample:\n{# sort by date #}\n{{ site.pages|sort_by_date }}\n{# sort by updated variable instead of date #}\n{{ site.pages|sort_by_date(variable='updated') }}\n{# sort items with the same date by desc title #}\n{{ site.pages|sort_by_date(desc_title=true) }}\n{# reverse sort #}\n{{ site.pages|sort_by_date|reverse }}\nsort_by_weight\nSorts a collection by weight (lighter first).\n{{ collection|sort_by_weight }}\nExample:\n{{ site.menus.main|sort_by_weight }}\nsort\nFor more complex cases, you should use Twig’s native sort.\nExample:\n{% set files = site.static|sort((a, b) =&gt; b.date &lt;=&gt; a.date) %}\nCollection methods\nA pages collection (e.g.: site.pages, page.pages) also provides sorting methods, which return a pages collection:\n\nsortBy(options): sorts by date, updated, title or weight\nsortByDate(options), sortByTitle(options), sortByWeight(options)\n\noptions can be the name of the variable (e.g.: 'title') or an object with the keys variable, descTitle (sort by date only) and reverse.\nExamples:\n{% for p in site.pages.showable.sortBy('title') %}…{% endfor %}\n{% for p in site.pages.showable.sortBy({variable: 'updated', reverse: true}) %}…{% endfor %}",
      "content_html": "<h1>Sorts</h1>\n<p>Sorting collections (of pages, menus or taxonomies).</p>\n<h2 id=\"sort-by-title\">sort_by_title<a class=\"heading-anchor\" href=\"#sort-by-title\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Sorts a collection by title (with <a href=\"https://en.wikipedia.org/wiki/Natural_sort_order\" target=\"_blank\" rel=\"noopener noreferrer\">natural sort</a>).</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ collection|sort_by_title }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ site.pages|sort_by_title }}</span></code></pre>\n<h2 id=\"sort-by-date\">sort_by_date<a class=\"heading-anchor\" href=\"#sort-by-date\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Sorts a collection by date (most recent first).</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ collection|sort_by_date(variable='<span class=\"hljs-name\">date</span>', desc_title=false) }}</span></code></pre>\n<ul>\n<li><code translate=\"no\">variable</code>: the date variable to sort by (<code translate=\"no\">date</code> by default)</li>\n<li><code translate=\"no\">desc_title</code>: sorts items with the same date by title, in descending order (<code translate=\"no\">false</code> by default)</li>\n</ul>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# sort by date #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ site.pages|sort_by_date }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# sort by updated variable instead of date #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ site.pages|sort_by_date(variable='updated') }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# sort items with the same date by desc title #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ site.pages|sort_by_date(desc_title=true) }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# reverse sort #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ site.pages|sort_by_date|<span class=\"hljs-keyword\">reverse</span> }}</span></code></pre>\n<h2 id=\"sort-by-weight\">sort_by_weight<a class=\"heading-anchor\" href=\"#sort-by-weight\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Sorts a collection by weight (lighter first).</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ collection|sort_by_weight }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ site.menus.main|sort_by_weight }}</span></code></pre>\n<h2 id=\"sort\">sort<a class=\"heading-anchor\" href=\"#sort\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>For more complex cases, you should use <a href=\"https://twig.symfony.com/doc/filters/sort.html\" target=\"_blank\" rel=\"noopener noreferrer\">Twig’s native <code translate=\"no\">sort</code></a>.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> files = site.static|<span class=\"hljs-keyword\">sort</span>((a, b) =&gt; b.<span class=\"hljs-name\">date</span> &lt;=&gt; a.<span class=\"hljs-name\">date</span>) %}</span></code></pre>\n<h2 id=\"collection-methods\">Collection methods<a class=\"heading-anchor\" href=\"#collection-methods\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>A pages collection (e.g.: <code translate=\"no\">site.pages</code>, <code translate=\"no\">page.pages</code>) also provides sorting methods, which return a pages collection:</p>\n<ul>\n<li><code translate=\"no\">sortBy(options)</code>: sorts by <code translate=\"no\">date</code>, <code translate=\"no\">updated</code>, <code translate=\"no\">title</code> or <code translate=\"no\">weight</code></li>\n<li><code translate=\"no\">sortByDate(options)</code>, <code translate=\"no\">sortByTitle(options)</code>, <code translate=\"no\">sortByWeight(options)</code></li>\n</ul>\n<p><code translate=\"no\">options</code> can be the name of the variable (e.g.: <code translate=\"no\">'title'</code>) or an object with the keys <code translate=\"no\">variable</code>, <code translate=\"no\">descTitle</code> (sort by date only) and <code translate=\"no\">reverse</code>.</p>\n<p><em>Examples:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> p in site.pages.showable.sortBy('title') %}</span><span class=\"xml\">…</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> p in site.pages.showable.sortBy({variable: 'updated', reverse: true}) %}</span><span class=\"xml\">…</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span></code></pre>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/content/markdown/",
      "url": "https://cloudflare.cecil.app/documentation/content/markdown/",
      "title": "Markdown",
      "summary": "Markdown syntax and extensions: attributes, links, images, table of contents, notes, syntax highlight, etc.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-24T00:00:00+00:00","content_text": "Markdown\nCecil supports Markdown format, but also Markdown Extra.\nCecil also provides extra features to enhance your content, see below.\nAttributes\nWith Markdown Extra you can set an id, class and custom attributes on certain elements using an attribute block.\nFor instance, put the desired attribute(s) after a heading, a fenced code block, a link or an image at the end of the line inside curly brackets, like this:\n## Header {#id .class attribute=value}\nFor an inline element, like a link, you must use a line break after the closing brace:\nLorem ipsum [dolor](url){attribute=value} \nsit amet.\nLinks\nYou can create a link with the syntax [Text](url), where url can be a path, a relative path to a Markdown file, an external URL, etc.\nExample:\n[Link to a path](\/about\/)\n[Link to a Markdown file](about.md)\n[Link to Cecil website](https:\/\/cecil.app)\nA relative link to a Markdown file is resolved from the folder of the current file (as on GitHub), then replaced by the URL of the targeted page.\nLink to a page\nYou can easily create a link to a page with the syntax [Page title](page:page-id).\nExample:\n[Link to a blog post](page:blog\/post-1)\nExternal\nBy default external links have the following value for rel attribute: noopener noreferrer.\nA link is considered external if its URL starts with http but not with the baseurl: baseurl must be defined.\nExample:\n&lt;a href=\"&lt;url&gt;\" rel=\"noopener noreferrer\"&gt;Link to another website&lt;\/a&gt;\nYou can change this behavior with pages.body.links.external options.\nEmbedded links\nCecil can try to turn a link into embedded content by using the {embed} attribute or by setting the global configuration option pages.body.links.embed.enabled to true.\nOnly YouTube, Vimeo, Dailymotion, and GitHub Gists links are supported.\nExample:\n[CECIL : LE générateur de SITES STATIQUES en PHP](https:\/\/www.youtube.com\/watch?v=ur8koU0iYvc){embed}\n\n\n\nLocal video\/audio files\nCecil can also create &lt;video&gt; and &lt;audio&gt; HTML elements, based on the file extension (mp4 and webm for video, mp3, ogg and wav for audio, see pages.body.links.embed).\nExample:\n[Video file](video.mp4){embed controls poster=\/images\/video-test.png}\n[Audio file](song.mp3){embed controls}\nIs converted to:\n&lt;video src=\"\/video.mp4\" controls poster=\"\/images\/video-test.png\" style=\"max-width:100%;height:auto;background-color:#d8d8d8;\"&gt;&lt;\/video&gt;\n&lt;audio src=\"\/song.mp3\" controls&gt;&lt;\/audio&gt;\nWithout the controls attribute, a video gets the autoplay, loop, muted and playsinline attributes.\nWith {embed=false} (or when embedding is disabled), a local video\/audio file stays a link, but its URL points to the published file (fingerprinted if assets.fingerprint is enabled).\nImages\nTo add an image, use an exclamation mark (!) followed by an alternative description in brackets ([]), and the path or URL to the image in parentheses (()).\nYou can optionally add a title in quotation marks.\n![Alternative description](\/image.jpg \"Image title\")\nThe path should be relative to the root of your website (e.g.: \/image.jpg), however Cecil is able to normalize a path relative to assets and static directories (e.g.: ..\/..\/assets\/image.jpg).\nRemote images (e.g.: https:\/\/example.com\/image.jpg) are downloaded and handled as Assets, so they can be resized and converted. You can disable this behavior, or define a fallback image, with the remote option.\nLazy loading\nCecil adds the attribute loading=\"lazy\" to each image.\nExample:\n![](\/image.jpg)\nIs converted to:\n&lt;img src=\"\/image.jpg\" loading=\"lazy\"&gt;\nYou can disable this behavior with the attribute {loading=eager} or with the lazy option.\nDecoding\nCecil adds the attribute decoding=\"async\" to each image.\nExample:\n![](\/image.jpg)\nIs converted to:\n&lt;img src=\"\/image.jpg\" decoding=\"async\"&gt;\nYou can disable this behavior with the attribute {decoding=auto} or with the decoding option.\nResize\nEach image in the body can be resized automatically by setting a smaller width than the original one, with the extra attribute {width=X}.\nExample:\n![](\/image.jpg){width=800}\nIs converted to:\n&lt;img src=\"\/thumbnails\/800\/image.jpg\" width=\"800\" height=\"600\"&gt;\nRatio is preserved (height attribute is calculated automatically), the original file is not altered and the resized version is stored in \/thumbnails\/&lt;width&gt;\/.\nYou can also resize all images to a maximum width with the resize option.\nThis feature requires an image processing library: Imagick is used first if available (and able to read JPEG and PNG), then libvips (through the PHP FFI extension), and finally GD as fallback; otherwise it only adds a width HTML attribute to the img tag.\nlibvips support is optional and is not bundled with cecil.phar. To use it, Cecil must be installed with Composer, and you need:\n\nlibvips installed on your system\nthe PHP FFI extension enabled\nthe intervention\/image-driver-vips package installed alongside Cecil\n\nIf Cecil is a dependency of your project (see Library):\ncomposer require intervention\/image-driver-vips\nIf Cecil is installed globally:\ncomposer global require cecil\/cecil intervention\/image-driver-vips\nFormats\nIf the formats option is defined, alternative images are created and added.\nExample:\n![](\/image.jpg)\nCould be converted to:\n&lt;picture&gt;\n  &lt;source srcset=\"\/image.avif\" type=\"image\/avif\"&gt;\n  &lt;source srcset=\"\/image.webp\" type=\"image\/webp\"&gt;\n  &lt;img src=\"\/image.jpg\"&gt;\n&lt;\/picture&gt;\nPlease note that not all image formats are always included in the PHP image extensions.\nResponsive\nIf the responsive option is enabled, then all images in the body will be made responsive automatically.\nExample:\n![](\/image.jpg){width=800}\nwill be converted to:\n&lt;img src=\"\/thumbnails\/800\/image.jpg\" width=\"800\" height=\"600\"\n  srcset=\"\/thumbnails\/480\/image.jpg 480w,\n          \/thumbnails\/640\/image.jpg 640w,\n          \/thumbnails\/768\/image.jpg 768w,\n          \/thumbnails\/800\/image.jpg 800w\"\n  sizes=\"100vw\"\n&gt;\nBecause a body image is converted into an Asset, the different widths are defined (and can be changed) in the assets.images.responsive.widths option of the assets configuration.\nThe sizes attribute takes the value of the assets.images.responsive.sizes.default configuration option, but it can be changed by creating a new entry named after a class added to the image.\nExample:\nassets:\n  images:\n    responsive:\n      sizes:\n        default: 100vw\n        my_class: \"(max-width: 800px) 768px, 1024px\"\n![](\/image.jpg){.my_class}\nYou can combine formats and responsive options.\nCSS class\nYou can set a default value to the class attribute of each image with the class option.\nCaption\nThe optional title can be used to create a caption (figcaption) automatically by enabling the caption option.\nExample:\n![](\/image.jpg \"Title\")\nIs converted to:\n&lt;figure&gt;\n  &lt;img src=\"\/image.jpg\" title=\"Title\"&gt;\n  &lt;figcaption&gt;Title&lt;\/figcaption&gt;\n&lt;\/figure&gt;\nCaption supports Markdown content.\nLocalized image\nFor translated pages, Cecil first looks for a language-suffixed file when resolving Markdown image paths.\nExample:\n![](\/images\/cecil-logo.png)\nWith a French page (fr), Cecil tries \/images\/cecil-logo.fr.png first, then falls back to \/images\/cecil-logo.png.\nDark and mobile variants\nIf the dark_suffix option is defined (e.g.: .dark), Cecil looks for a dark variant of each image (e.g.: image.dark.jpg alongside image.jpg) and adds it as a &lt;source media=\"(prefers-color-scheme: dark)\"&gt; in a &lt;picture&gt; element.\nIn the same way, if the mobile_suffix option is defined (e.g.: .mobile), Cecil looks for a mobile variant of each image (e.g.: image.mobile.jpg) and adds it as a &lt;source&gt; with the mobile_media_query media query.\nPlaceholder\nAs images are typically heavier and slower resources, and they don’t block rendering, we should attempt to give users something to look at while they wait for the image to arrive.\nThe placeholder attribute accepts two options:\n\ncolor: display a colored background (based on image dominant color)\nlqip: Low-Quality Image Placeholder\n\nExamples:\n![](\/images\/img.jpg){placeholder=color}\n![](\/images\/img.jpg){placeholder=lqip}\nYou can set a value to the placeholder attribute for each image with the placeholder option.\nPlaceholders are only applied to JPEG, PNG and GIF images, and the lqip option is not compatible with animated GIF.\nHeading anchors\nAn anchor link is added at the end of h2 and h3 headings (see the pages.body.anchors option), to link to a heading of a page:\n&lt;h2 id=\"heading\"&gt;Heading&lt;a class=\"heading-anchor\" href=\"#heading\" aria-hidden=\"true\" tabindex=\"-1\"&gt;&lt;\/a&gt;&lt;\/h2&gt;\nThe link is empty: the default templates display a # on hover.\nTable of contents\nYou can add a table of contents with the following Markdown syntax:\n[toc]\nBy default, the ToC extracts H2 and H3 headings. You can change this behavior with body options.\nExcerpt\nAn excerpt can be defined in the body with one of the following HTML comments: &lt;!-- excerpt --&gt; or &lt;!-- break --&gt; (see the pages.body.excerpt option).\nExample:\nIntroduction.\n&lt;!-- excerpt --&gt;\nMain content.\nThen use the excerpt_html filter in your template.\nNotes\nCreate a Note block (info, tip, important, etc.).\nExample:\n:::tip\n**Tip:** This is advice.\n:::\nIs converted to:\n&lt;aside class=\"note note-tip\"&gt;\n  &lt;p&gt;\n    &lt;strong&gt;Tip:&lt;\/strong&gt; This is advice.\n  &lt;\/p&gt;\n&lt;\/aside&gt;\nTip: This is advice.\nAny type name can be used: it is added to the class attribute as note-&lt;type&gt; (e.g.: :::danger gives class=\"note note-danger\").\nOther examples:\nempty\ninfo\ntip\nimportant\nwarning\ncaution\nNested notes\nA note is closed by a line made of at least as many : as its opening line: to nest notes, use a longer fence for the parent note (::::, then ::::: for a third level, etc.).\n::::info\nBefore.\n\n:::tip\n**Tip:** This is advice.\n:::\n\nAfter.\n::::\nBefore.\nTip: This is advice.\nAfter.\nA longer fence also lets you show the note syntax in a code block, inside a note.\nTemplates\nA note is rendered with the partials\/notes\/&lt;type&gt;.html.twig template, if it exists (in the site layouts\/, in a theme or built-in), instead of the &lt;aside&gt; element.\nCecil provides templates for the following types, rendered without JavaScript: a theme can style them, override them and add interactivity. Unlike other notes, their root element is a &lt;div class=\"note note-&lt;type&gt;\"&gt; (not an &lt;aside&gt;), as their content is part of the main content.\n\n\n\nType\nItems\nRendering\n\n\n\n\ntabs\none per #### heading\nstacked panels (&lt;section class=\"note-tab\"&gt;)\n\n\ncode-group\none per #### heading, or one per code block (titled with its language)\nsame as tabs\n\n\nsteps\none per #### heading\nordered list (&lt;ol class=\"note-steps-list\"&gt;)\n\n\naccordion\none per #### heading\n&lt;details class=\"note-accordion-item\"&gt;\n\n\ncards\none per list entry (a leading link is the card title), or per #### heading\nlist (&lt;ul class=\"note-cards-list\"&gt;)\n\n\n\nThe examples below are themselves nested notes: a tabs note (with a :::: fence) shows the Markdown source and its rendering.\nTabs\nAlternative contents, one per #### heading (e.g.: per operating system).\n\n  \n    Markdown\n    :::tabs\n#### macOS and Linux\n\n```bash\nbrew install cecilapp\/tap\/cecil\n```\n\n#### Windows\n\n```bash\nscoop install https:\/\/cecil.app\/scoop\/cecil.json\n```\n:::\n  \n  \n    Result\n    \n  \n    macOS and Linux\n    brew install cecilapp\/tap\/cecil\n  \n  \n    Windows\n    scoop install https:\/\/cecil.app\/scoop\/cecil.json\n  \n\n  \n\nCode group\nLike tabs, with code blocks only: without heading, each code block is titled with its language.\n\n  \n    Markdown\n    :::code-group\n```bash\ncurl -LO https:\/\/cecil.app\/cecil.phar\n```\n\n```powershell\nInvoke-WebRequest https:\/\/cecil.app\/cecil.phar -OutFile cecil.phar\n```\n:::\n  \n  \n    Result\n    \n  \n    bash\n    curl -LO https:\/\/cecil.app\/cecil.phar\n  \n  \n    powershell\n    Invoke-WebRequest https:\/\/cecil.app\/cecil.phar -OutFile cecil.phar\n  \n\n  \n\nSteps\nA numbered procedure, one step per #### heading.\n\n  \n    Markdown\n    :::steps\n#### Create a site\n\n```bash\nphp cecil.phar new:site\n```\n\n#### Preview it\n\n```bash\nphp cecil.phar serve\n```\n:::\n  \n  \n    Result\n    \n  \n    \n      Create a site\n      php cecil.phar new:site\n    \n    \n      Preview it\n      php cecil.phar serve\n    \n  \n\n  \n\nAccordion\nCollapsible items, one per #### heading (e.g.: a FAQ).\n\n  \n    Markdown\n    :::accordion\n#### Is PHP required?\n\nNo: the standalone binary embeds PHP.\n\n#### Where is the generated site?\n\nIn the `_site` directory.\n:::\n  \n  \n    Result\n    \n  \n    Is PHP required?\n    \n      No: the standalone binary embeds PHP.\n    \n  \n  \n    Where is the generated site?\n    \n      In the _site directory.\n    \n  \n\n  \n\nCards\nLinks to other pages, one card per list entry: a leading link is the card title.\n\n  \n    Markdown\n    :::cards\n- [Installation](..\/getting-started\/2-installation.md): download and install Cecil.\n- [Configuration](..\/configuration\/index.md): configure your site.\n:::\n  \n  \n    Result\n    \n  \n    \n      Installation\n      download and install Cecil.\n    \n    \n      Configuration\n      configure your site.\n    \n  \n\n  \n\nCustom template\nThe template receives a note variable:\n\nnote.type: note type (e.g.: tabs)\nnote.id: unique ID in the page (e.g.: note-tabs-1)\nnote.content: HTML of the whole note\nnote.intro: HTML of the content before the first #### heading\nnote.items: list of items, each with:\ntitle: title (HTML)\nheading: heading element (HTML), with its id attribute\nid: heading ID, if any\nlink: leading link element (HTML) of a list entry\nurl: leading link URL of a list entry\nlanguage: language of a code block\ncontent: content (HTML)\n\n\n\nTo override the rendering of a note type, create the template in your site (or theme), for example layouts\/partials\/notes\/tip.html.twig:\n&lt;div class=\"callout callout-{{ note.type }}\"&gt;\n  {{ note.content|raw }}\n&lt;\/div&gt;\nNotes are rendered when Markdown is converted, before pages rendering: a note template has access to the note variable and to translations (in the page language), but not to page or site.\nSyntax highlight\nCode block syntax highlighting is enabled by default with the pages.body.highlight option.\nIf needed, you can disable it with:\npages:\n  body:\n    highlight: false\nExample:\n\n```php\necho \"Hello world\";\n```\n\nIs rendered to:\necho \"Hello world\";\nYou can customize the syntax highlighting style by creating your own theme. See the Highlight.js Theme Guide.\nYou can also use tempest\/highlight instead of highlight.js with the pages.body.highlight.engine option. It's faster, but supports fewer languages. It uses hl-* CSS classes: see the tempest\/highlight themes.\nThe language of a code block is added to the data-lang attribute of the &lt;pre&gt; element (e.g.: &lt;pre data-lang=\"php\"&gt;): the default templates display it as a label.\nInserted text\nRepresents a range of text that has been added.\n++text++\nIs converted to:\n&lt;ins&gt;text&lt;\/ins&gt;",
      "content_html": "<h1>Markdown</h1>\n<p>Cecil supports <a href=\"https://daringfireball.net/projects/markdown/syntax\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown</a> format, but also <a href=\"https://michelf.ca/projects/php-markdown/extra/\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown Extra</a>.</p>\n<p>Cecil also provides <strong>extra features</strong> to enhance your content, see below.</p>\n<h2 id=\"attributes\">Attributes<a class=\"heading-anchor\" href=\"#attributes\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>With <a href=\"https://michelf.ca/projects/php-markdown/extra/\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown Extra</a> you can set an id, class and custom attributes on certain elements using an attribute block.<br>\nFor instance, put the desired attribute(s) after a heading, a fenced code block, a link or an image at the end of the line inside curly brackets, like this:</p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\"><span class=\"hljs-section\">## Header {#id .class attribute=value}</span></code></pre>\n<aside class=\"note note-warning\"><p>For an inline element, like a link, you must use a line break after the closing brace:</p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">Lorem ipsum [<span class=\"hljs-string\">dolor</span>](<span class=\"hljs-link\">url</span>){attribute=value} \nsit amet.</code></pre></aside>\n<h2 id=\"links\">Links<a class=\"heading-anchor\" href=\"#links\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>You can create a link with the syntax <code translate=\"no\">[Text](url)</code>, where <code translate=\"no\">url</code> can be a path, a relative path to a Markdown file, an external URL, etc.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">[<span class=\"hljs-string\">Link to a path</span>](<span class=\"hljs-link\">/about/</span>)\n[<span class=\"hljs-string\">Link to a Markdown file</span>](<span class=\"hljs-link\">about.md</span>)\n[<span class=\"hljs-string\">Link to Cecil website</span>](<span class=\"hljs-link\">https://cecil.app</span>)</code></pre>\n<aside class=\"note note-info\"><p>A relative link to a Markdown file is resolved from the folder of the current file (as on GitHub), then replaced by the URL of the targeted page.</p></aside>\n<h3 id=\"link-to-a-page\">Link to a page<a class=\"heading-anchor\" href=\"#link-to-a-page\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>You can easily create a link to a page with the syntax <code translate=\"no\">[Page title](page:page-id)</code>.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">[<span class=\"hljs-string\">Link to a blog post</span>](<span class=\"hljs-link\">page:blog/post-1</span>)</code></pre>\n<h3 id=\"external\">External<a class=\"heading-anchor\" href=\"#external\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>By default external links have the following value for <code translate=\"no\">rel</code> attribute: <code translate=\"no\">noopener noreferrer</code>.</p>\n<aside class=\"note note-info\"><p>A link is considered external if its URL starts with <code translate=\"no\">http</code> but not with the <a href=\"../configuration/1-site.md#baseurl\"><code translate=\"no\">baseurl</code></a>: <code translate=\"no\">baseurl</code> must be defined.</p></aside>\n<p><em>Example:</em></p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"&lt;url&gt;\"</span> <span class=\"hljs-attr\">rel</span>=<span class=\"hljs-string\">\"noopener noreferrer\"</span>&gt;</span>Link to another website<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span></code></pre>\n<p>You can change this behavior with <a href=\"../configuration/4-pages.md#pages-body-links\"><code translate=\"no\">pages.body.links.external</code> options</a>.</p>\n<h3 id=\"embedded-links\">Embedded links<a class=\"heading-anchor\" href=\"#embedded-links\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Cecil can try to turn a link into embedded content by using the <code translate=\"no\">{embed}</code> attribute or by setting the global configuration option <code translate=\"no\">pages.body.links.embed.enabled</code> to <code translate=\"no\">true</code>.</p>\n<aside class=\"note note-important\"><p>Only <strong>YouTube</strong>, <strong>Vimeo</strong>, <strong>Dailymotion</strong>, and <strong>GitHub Gists</strong> links are supported.</p></aside>\n<p><em>Example:</em></p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">[<span class=\"hljs-string\">CECIL : LE générateur de SITES STATIQUES en PHP</span>](<span class=\"hljs-link\">https://www.youtube.com/watch?v=ur8koU0iYvc</span>){embed}</code></pre>\n<p><div style=\"position:relative;padding-bottom:56.25%;height:0;overflow:hidden;\">\n<iframe src=\"https://www.youtube-nocookie.com/embed/ur8koU0iYvc\" loading=\"lazy\" width=\"640\" height=\"360\" title=\"CECIL : LE générateur de SITES STATIQUES en PHP\" frameborder=\"0\" allow=\"accelerometer;autoplay;encrypted-media;gyroscope;picture-in-picture;fullscreen;web-share;\" allowfullscreen=\"\" style=\"position:absolute;top:0;left:0;width:100%;height:100%;border:0;background-color:#d8d8d8;\"></iframe>\n</div></p>\n<h4 id=\"local-video-audio-files\">Local video/audio files</h4>\n<p>Cecil can also create <code translate=\"no\">&lt;video&gt;</code> and <code translate=\"no\">&lt;audio&gt;</code> HTML elements, based on the file extension (<code translate=\"no\">mp4</code> and <code translate=\"no\">webm</code> for video, <code translate=\"no\">mp3</code>, <code translate=\"no\">ogg</code> and <code translate=\"no\">wav</code> for audio, see <a href=\"../configuration/4-pages.md#pages-body-links\"><code translate=\"no\">pages.body.links.embed</code></a>).</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">[<span class=\"hljs-string\">Video file</span>](<span class=\"hljs-link\">video.mp4</span>){embed controls poster=/images/video-test.png}\n[<span class=\"hljs-string\">Audio file</span>](<span class=\"hljs-link\">song.mp3</span>){embed controls}</code></pre>\n<p>Is converted to:</p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">video</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">\"/video.mp4\"</span> <span class=\"hljs-attr\">controls</span> <span class=\"hljs-attr\">poster</span>=<span class=\"hljs-string\">\"/images/video-test.png\"</span> <span class=\"hljs-attr\">style</span>=<span class=\"hljs-string\">\"max-width:100%;height:auto;background-color:#d8d8d8;\"</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">video</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">audio</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">\"/song.mp3\"</span> <span class=\"hljs-attr\">controls</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">audio</span>&gt;</span></code></pre>\n<aside class=\"note note-info\"><p>Without the <code translate=\"no\">controls</code> attribute, a video gets the <code translate=\"no\">autoplay</code>, <code translate=\"no\">loop</code>, <code translate=\"no\">muted</code> and <code translate=\"no\">playsinline</code> attributes.</p></aside>\n<p>With <code translate=\"no\">{embed=false}</code> (or when embedding is disabled), a local video/audio file stays a link, but its URL points to the published file (fingerprinted if <a href=\"../configuration/6-assets.md\"><code translate=\"no\">assets.fingerprint</code></a> is enabled).</p>\n<h2 id=\"images\">Images<a class=\"heading-anchor\" href=\"#images\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>To add an image, use an exclamation mark (<code translate=\"no\">!</code>) followed by an alternative description in brackets (<code translate=\"no\">[]</code>), and the path or URL to the image in parentheses (<code translate=\"no\">()</code>).<br>\nYou can optionally add a title in quotation marks.</p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">![<span class=\"hljs-string\">Alternative description</span>](<span class=\"hljs-link\">/image.jpg \"Image title\"</span>)</code></pre>\n<aside class=\"note note-info\"><p>The path should be relative to the root of your website (e.g.: <code translate=\"no\">/image.jpg</code>), however Cecil is able to normalize a path relative to <em>assets</em> and <em>static</em> directories (e.g.: <code translate=\"no\">../../assets/image.jpg</code>).</p></aside>\n<aside class=\"note note-info\"><p>Remote images (e.g.: <code translate=\"no\">https://example.com/image.jpg</code>) are downloaded and handled as <em>Assets</em>, so they can be resized and converted. You can disable this behavior, or define a fallback image, with the <a href=\"../configuration/4-pages.md#pages-body-images\"><code translate=\"no\">remote</code> option</a>.</p></aside>\n<h3 id=\"lazy-loading\">Lazy loading<a class=\"heading-anchor\" href=\"#lazy-loading\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Cecil adds the attribute <code translate=\"no\">loading=\"lazy\"</code> to each image.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">![](/image.jpg)</code></pre>\n<p>Is converted to:</p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">\"/image.jpg\"</span> <span class=\"hljs-attr\">loading</span>=<span class=\"hljs-string\">\"lazy\"</span>&gt;</span></code></pre>\n<aside class=\"note note-info\"><p>You can disable this behavior with the attribute <code translate=\"no\">{loading=eager}</code> or with the <a href=\"../configuration/4-pages.md#pages-body-images\"><code translate=\"no\">lazy</code> option</a>.</p></aside>\n<h3 id=\"decoding\">Decoding<a class=\"heading-anchor\" href=\"#decoding\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Cecil adds the attribute <code translate=\"no\">decoding=\"async\"</code> to each image.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">![](/image.jpg)</code></pre>\n<p>Is converted to:</p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">\"/image.jpg\"</span> <span class=\"hljs-attr\">decoding</span>=<span class=\"hljs-string\">\"async\"</span>&gt;</span></code></pre>\n<aside class=\"note note-info\"><p>You can disable this behavior with the attribute <code translate=\"no\">{decoding=auto}</code> or with the <a href=\"../configuration/4-pages.md#pages-body-images\"><code translate=\"no\">decoding</code> option</a>.</p></aside>\n<h3 id=\"resize\">Resize<a class=\"heading-anchor\" href=\"#resize\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Each image in the <em>body</em> can be resized automatically by setting a smaller width than the original one, with the extra attribute <code translate=\"no\">{width=X}</code>.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">![](/image.jpg){width=800}</code></pre>\n<p>Is converted to:</p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">\"/thumbnails/800/image.jpg\"</span> <span class=\"hljs-attr\">width</span>=<span class=\"hljs-string\">\"800\"</span> <span class=\"hljs-attr\">height</span>=<span class=\"hljs-string\">\"600\"</span>&gt;</span></code></pre>\n<aside class=\"note note-info\"><p>Ratio is preserved (<code translate=\"no\">height</code> attribute is calculated automatically), the original file is not altered and the resized version is stored in <code translate=\"no\">/thumbnails/&lt;width&gt;/</code>.</p></aside>\n<aside class=\"note note-tip\"><p>You can also resize all images to a maximum width with the <a href=\"../configuration/4-pages.md#pages-body-images\"><code translate=\"no\">resize</code> option</a>.</p></aside>\n<aside class=\"note note-important\"><p>This feature requires an image processing library: <a href=\"https://www.php.net/manual/book.imagick.php\" target=\"_blank\" rel=\"noopener noreferrer\">Imagick</a> is used first if available (and able to read JPEG and PNG), then <a href=\"https://www.libvips.org/\" target=\"_blank\" rel=\"noopener noreferrer\">libvips</a> (through the PHP <a href=\"https://www.php.net/manual/book.ffi.php\" target=\"_blank\" rel=\"noopener noreferrer\">FFI</a> extension), and finally <a href=\"https://www.php.net/manual/book.image.php\" target=\"_blank\" rel=\"noopener noreferrer\">GD</a> as fallback; otherwise it only adds a <code translate=\"no\">width</code> HTML attribute to the <code translate=\"no\">img</code> tag.</p></aside>\n<aside class=\"note note-info\"><p>libvips support is optional and is not bundled with <code translate=\"no\">cecil.phar</code>. To use it, Cecil must be installed with <a href=\"https://getcomposer.org\" target=\"_blank\" rel=\"noopener noreferrer\">Composer</a>, and you need:</p>\n<ol>\n<li><a href=\"https://www.libvips.org/install.html\" target=\"_blank\" rel=\"noopener noreferrer\">libvips</a> installed on your system</li>\n<li>the PHP <a href=\"https://www.php.net/manual/book.ffi.php\" target=\"_blank\" rel=\"noopener noreferrer\">FFI</a> extension enabled</li>\n<li>the <code translate=\"no\">intervention/image-driver-vips</code> package installed alongside Cecil</li>\n</ol>\n<p>If Cecil is a dependency of your project (see <a href=\"../developers/2-library.md#libvips-support\">Library</a>):</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">composer require intervention/image-driver-vips</code></pre>\n<p>If Cecil is installed globally:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">composer global require cecil/cecil intervention/image-driver-vips</code></pre></aside>\n<h3 id=\"formats\">Formats<a class=\"heading-anchor\" href=\"#formats\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>If the <a href=\"../configuration/4-pages.md#pages-body-images\"><code translate=\"no\">formats</code> option</a> is defined, alternative images are created and added.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">![](/image.jpg)</code></pre>\n<p>Could be converted to:</p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">picture</span>&gt;</span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">source</span> <span class=\"hljs-attr\">srcset</span>=<span class=\"hljs-string\">\"/image.avif\"</span> <span class=\"hljs-attr\">type</span>=<span class=\"hljs-string\">\"image/avif\"</span>&gt;</span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">source</span> <span class=\"hljs-attr\">srcset</span>=<span class=\"hljs-string\">\"/image.webp\"</span> <span class=\"hljs-attr\">type</span>=<span class=\"hljs-string\">\"image/webp\"</span>&gt;</span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">\"/image.jpg\"</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">picture</span>&gt;</span></code></pre>\n<aside class=\"note note-important\"><p>Please note that <strong>not all image formats</strong> are always included in the PHP image extensions.</p></aside>\n<h3 id=\"responsive\">Responsive<a class=\"heading-anchor\" href=\"#responsive\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>If the <a href=\"../configuration/4-pages.md#pages-body-images\"><code translate=\"no\">responsive</code> option</a> is enabled, then all images in the <em>body</em> will be made responsive automatically.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">![](/image.jpg){width=800}</code></pre>\n<p>will be converted to:</p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">\"/thumbnails/800/image.jpg\"</span> <span class=\"hljs-attr\">width</span>=<span class=\"hljs-string\">\"800\"</span> <span class=\"hljs-attr\">height</span>=<span class=\"hljs-string\">\"600\"</span>\n  <span class=\"hljs-attr\">srcset</span>=<span class=\"hljs-string\">\"/thumbnails/480/image.jpg 480w,\n          /thumbnails/640/image.jpg 640w,\n          /thumbnails/768/image.jpg 768w,\n          /thumbnails/800/image.jpg 800w\"</span>\n  <span class=\"hljs-attr\">sizes</span>=<span class=\"hljs-string\">\"100vw\"</span>\n&gt;</span></code></pre>\n<aside class=\"note note-info\"><p>Because a body image is converted into an <a href=\"../assets/index.md#asset\">Asset</a>, the different widths are defined (and can be changed) in the <code translate=\"no\">assets.images.responsive.widths</code> option of the <a href=\"../configuration/6-assets.md\">assets configuration</a>.</p></aside>\n<p>The <code translate=\"no\">sizes</code> attribute takes the value of the <code translate=\"no\">assets.images.responsive.sizes.default</code> configuration option, but it can be changed by creating a new entry named after a <em>class</em> added to the image.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">images:</span>\n    <span class=\"hljs-attr\">responsive:</span>\n      <span class=\"hljs-attr\">sizes:</span>\n        <span class=\"hljs-attr\">default:</span> <span class=\"hljs-string\">100vw</span>\n        <span class=\"hljs-attr\">my_class:</span> <span class=\"hljs-string\">\"(max-width: 800px) 768px, 1024px\"</span></code></pre>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">![](/image.jpg){.my_class}</code></pre>\n<aside class=\"note note-info\"><p>You can combine <code translate=\"no\">formats</code> and <code translate=\"no\">responsive</code> options.</p></aside>\n<h3 id=\"css-class\">CSS class<a class=\"heading-anchor\" href=\"#css-class\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>You can set a default value to the <code translate=\"no\">class</code> attribute of each image with the <a href=\"../configuration/4-pages.md#pages-body-images\"><code translate=\"no\">class</code> option</a>.</p>\n<h3 id=\"caption\">Caption<a class=\"heading-anchor\" href=\"#caption\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>The optional title can be used to create a caption (<code translate=\"no\">figcaption</code>) automatically by enabling the <a href=\"../configuration/4-pages.md#pages-body-images\"><code translate=\"no\">caption</code> option</a>.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">![](/image.jpg \"Title\")</code></pre>\n<p>Is converted to:</p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">figure</span>&gt;</span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">\"/image.jpg\"</span> <span class=\"hljs-attr\">title</span>=<span class=\"hljs-string\">\"Title\"</span>&gt;</span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">figcaption</span>&gt;</span>Title<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">figcaption</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">figure</span>&gt;</span></code></pre>\n<aside class=\"note note-info\"><p>Caption supports Markdown content.</p></aside>\n<h3 id=\"localized-image\">Localized image<a class=\"heading-anchor\" href=\"#localized-image\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>For translated pages, Cecil first looks for a language-suffixed file when resolving Markdown image paths.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">![](/images/cecil-logo.png)</code></pre>\n<p>With a French page (<code translate=\"no\">fr</code>), Cecil tries <code translate=\"no\">/images/cecil-logo.fr.png</code> first, then falls back to <code translate=\"no\">/images/cecil-logo.png</code>.</p>\n<h3 id=\"dark-and-mobile-variants\">Dark and mobile variants<a class=\"heading-anchor\" href=\"#dark-and-mobile-variants\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>If the <a href=\"../configuration/4-pages.md#pages-body-images\"><code translate=\"no\">dark_suffix</code> option</a> is defined (e.g.: <code translate=\"no\">.dark</code>), Cecil looks for a dark variant of each image (e.g.: <code translate=\"no\">image.dark.jpg</code> alongside <code translate=\"no\">image.jpg</code>) and adds it as a <code translate=\"no\">&lt;source media=\"(prefers-color-scheme: dark)\"&gt;</code> in a <code translate=\"no\">&lt;picture&gt;</code> element.</p>\n<p>In the same way, if the <a href=\"../configuration/4-pages.md#pages-body-images\"><code translate=\"no\">mobile_suffix</code> option</a> is defined (e.g.: <code translate=\"no\">.mobile</code>), Cecil looks for a mobile variant of each image (e.g.: <code translate=\"no\">image.mobile.jpg</code>) and adds it as a <code translate=\"no\">&lt;source&gt;</code> with the <code translate=\"no\">mobile_media_query</code> media query.</p>\n<h3 id=\"placeholder\">Placeholder<a class=\"heading-anchor\" href=\"#placeholder\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>As images are typically heavier and slower resources, and they don’t block rendering, we should attempt to give users something to look at while they wait for the image to arrive.</p>\n<p>The <code translate=\"no\">placeholder</code> attribute accepts two options:</p>\n<ol>\n<li><code translate=\"no\">color</code>: display a colored background (based on image dominant color)</li>\n<li><code translate=\"no\">lqip</code>: <a href=\"https://www.guypo.com/introducing-lqip-low-quality-image-placeholders\" target=\"_blank\" rel=\"noopener noreferrer\">Low-Quality Image Placeholder</a></li>\n</ol>\n<p><em>Examples:</em></p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">![](/images/img.jpg){placeholder=color}\n![](/images/img.jpg){placeholder=lqip}</code></pre>\n<aside class=\"note note-tip\"><p>You can set a value to the <code translate=\"no\">placeholder</code> attribute for each image with the <a href=\"../configuration/4-pages.md#pages-body-images\"><code translate=\"no\">placeholder</code> option</a>.</p></aside>\n<aside class=\"note note-warning\"><p>Placeholders are only applied to JPEG, PNG and GIF images, and the <code translate=\"no\">lqip</code> option is not compatible with animated GIF.</p></aside>\n<h2 id=\"heading-anchors\">Heading anchors<a class=\"heading-anchor\" href=\"#heading-anchors\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>An anchor link is added at the end of <code translate=\"no\">h2</code> and <code translate=\"no\">h3</code> headings (see the <a href=\"../configuration/4-pages.md#pages-body-anchors\"><code translate=\"no\">pages.body.anchors</code></a> option), to link to a heading of a page:</p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2</span> <span class=\"hljs-attr\">id</span>=<span class=\"hljs-string\">\"heading\"</span>&gt;</span>Heading<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">class</span>=<span class=\"hljs-string\">\"heading-anchor\"</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"#heading\"</span> <span class=\"hljs-attr\">aria-hidden</span>=<span class=\"hljs-string\">\"true\"</span> <span class=\"hljs-attr\">tabindex</span>=<span class=\"hljs-string\">\"-1\"</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">h2</span>&gt;</span></code></pre>\n<p>The link is empty: the default templates display a <code translate=\"no\">#</code> on hover.</p>\n<h2 id=\"table-of-contents\">Table of contents<a class=\"heading-anchor\" href=\"#table-of-contents\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>You can add a table of contents with the following Markdown syntax:</p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">[toc]</code></pre>\n<aside class=\"note note-info\"><p>By default, the ToC extracts H2 and H3 headings. You can change this behavior with <a href=\"../configuration/4-pages.md#pages-body\">body options</a>.</p></aside>\n<h2 id=\"excerpt\">Excerpt<a class=\"heading-anchor\" href=\"#excerpt\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>An excerpt can be defined in the <em>body</em> with one of the following HTML comments: <code translate=\"no\">&lt;!-- excerpt --&gt;</code> or <code translate=\"no\">&lt;!-- break --&gt;</code> (see the <a href=\"../configuration/4-pages.md#pages-body-excerpt\"><code translate=\"no\">pages.body.excerpt</code> option</a>).</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\">Introduction.\n<span class=\"hljs-comment\">&lt;!-- excerpt --&gt;</span>\nMain content.</code></pre>\n<p>Then use the <a href=\"../templates/reference/3-filters.md#excerpt-html\"><code translate=\"no\">excerpt_html</code> filter</a> in your template.</p>\n<h2 id=\"notes\">Notes<a class=\"heading-anchor\" href=\"#notes\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Create a <em>Note</em> block (info, tip, important, etc.).</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">:::tip\n<span class=\"hljs-strong\">**Tip:**</span> This is advice.\n:::</code></pre>\n<p>Is converted to:</p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">aside</span> <span class=\"hljs-attr\">class</span>=<span class=\"hljs-string\">\"note note-tip\"</span>&gt;</span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p</span>&gt;</span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">strong</span>&gt;</span>Tip:<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">strong</span>&gt;</span> This is advice.\n  <span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">p</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">aside</span>&gt;</span></code></pre>\n<aside class=\"note note-tip\"><p><strong>Tip:</strong> This is advice.</p></aside>\n<aside class=\"note note-info\"><p>Any type name can be used: it is added to the <code translate=\"no\">class</code> attribute as <code translate=\"no\">note-&lt;type&gt;</code> (e.g.: <code translate=\"no\">:::danger</code> gives <code translate=\"no\">class=\"note note-danger\"</code>).</p></aside>\n<p><em>Other examples:</em></p>\n<aside class=\"note\"><p>empty</p></aside>\n<aside class=\"note note-info\"><p>info</p></aside>\n<aside class=\"note note-tip\"><p>tip</p></aside>\n<aside class=\"note note-important\"><p>important</p></aside>\n<aside class=\"note note-warning\"><p>warning</p></aside>\n<aside class=\"note note-caution\"><p>caution</p></aside>\n<h3 id=\"nested-notes\">Nested notes<a class=\"heading-anchor\" href=\"#nested-notes\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>A note is closed by a line made of at least as many <code translate=\"no\">:</code> as its opening line: to nest notes, use a longer fence for the parent note (<code translate=\"no\">::::</code>, then <code translate=\"no\">:::::</code> for a third level, etc.).</p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">::::info\nBefore.\n\n:::tip\n<span class=\"hljs-strong\">**Tip:**</span> This is advice.\n:::\n\nAfter.\n::::</code></pre>\n<aside class=\"note note-info\"><p>Before.</p>\n<aside class=\"note note-tip\"><p><strong>Tip:</strong> This is advice.</p></aside>\n<p>After.</p></aside>\n<p>A longer fence also lets you show the note syntax in a code block, inside a note.</p>\n<h3 id=\"templates\">Templates<a class=\"heading-anchor\" href=\"#templates\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>A note is rendered with the <code translate=\"no\">partials/notes/&lt;type&gt;.html.twig</code> template, if it exists (in the site <code translate=\"no\">layouts/</code>, in a theme or built-in), instead of the <code translate=\"no\">&lt;aside&gt;</code> element.</p>\n<p>Cecil provides templates for the following types, rendered without JavaScript: a theme can style them, override them and add interactivity. Unlike other notes, their root element is a <code translate=\"no\">&lt;div class=\"note note-&lt;type&gt;\"&gt;</code> (not an <code translate=\"no\">&lt;aside&gt;</code>), as their content is part of the main content.</p>\n<table>\n<thead>\n<tr>\n<th>Type</th>\n<th>Items</th>\n<th>Rendering</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">tabs</code></td>\n<td>one per <code translate=\"no\">####</code> heading</td>\n<td>stacked panels (<code translate=\"no\">&lt;section class=\"note-tab\"&gt;</code>)</td>\n</tr>\n<tr>\n<td><code translate=\"no\">code-group</code></td>\n<td>one per <code translate=\"no\">####</code> heading, or one per code block (titled with its language)</td>\n<td>same as <code translate=\"no\">tabs</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">steps</code></td>\n<td>one per <code translate=\"no\">####</code> heading</td>\n<td>ordered list (<code translate=\"no\">&lt;ol class=\"note-steps-list\"&gt;</code>)</td>\n</tr>\n<tr>\n<td><code translate=\"no\">accordion</code></td>\n<td>one per <code translate=\"no\">####</code> heading</td>\n<td><code translate=\"no\">&lt;details class=\"note-accordion-item\"&gt;</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">cards</code></td>\n<td>one per list entry (a leading link is the card title), or per <code translate=\"no\">####</code> heading</td>\n<td>list (<code translate=\"no\">&lt;ul class=\"note-cards-list\"&gt;</code>)</td>\n</tr>\n</tbody>\n</table>\n<p>The examples below are themselves nested notes: a <code translate=\"no\">tabs</code> note (with a <code translate=\"no\">::::</code> fence) shows the Markdown source and its rendering.</p>\n<h4 id=\"tabs\">Tabs</h4>\n<p>Alternative contents, one per <code translate=\"no\">####</code> heading (e.g.: per operating system).</p>\n<div class=\"note note-tabs\" id=\"note-tabs-1\">\n  <section class=\"note-tab\" id=\"note-tabs-1-1\">\n    <h4 id=\"markdown\">Markdown</h4>\n    <pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">:::tabs\n<span class=\"hljs-section\">#### macOS and Linux</span>\n\n<span class=\"hljs-code\">```bash\nbrew install cecilapp/tap/cecil\n```</span>\n\n<span class=\"hljs-section\">#### Windows</span>\n\n<span class=\"hljs-code\">```bash\nscoop install https://cecil.app/scoop/cecil.json\n```</span>\n:::</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-tabs-1-2\">\n    <h4 id=\"result\">Result</h4>\n    <div class=\"note note-tabs\" id=\"note-tabs-2\">\n  <section class=\"note-tab\" id=\"note-tabs-2-1\">\n    <h4 id=\"macos-and-linux\">macOS and Linux</h4>\n    <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">brew install cecilapp/tap/cecil</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-tabs-2-2\">\n    <h4 id=\"windows\">Windows</h4>\n    <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">scoop install https://cecil.app/scoop/cecil.json</code></pre>\n  </section>\n</div>\n  </section>\n</div>\n<h4 id=\"code-group\">Code group</h4>\n<p>Like <code translate=\"no\">tabs</code>, with code blocks only: without heading, each code block is titled with its language.</p>\n<div class=\"note note-tabs\" id=\"note-tabs-3\">\n  <section class=\"note-tab\" id=\"note-tabs-3-1\">\n    <h4 id=\"markdown-1\">Markdown</h4>\n    <pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">:::code-group\n<span class=\"hljs-code\">```bash\ncurl -LO https://cecil.app/cecil.phar\n```</span>\n\n<span class=\"hljs-code\">```powershell\nInvoke-WebRequest https://cecil.app/cecil.phar -OutFile cecil.phar\n```</span>\n:::</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-tabs-3-2\">\n    <h4 id=\"result-1\">Result</h4>\n    <div class=\"note note-code-group\" id=\"note-code-group-4\">\n  <section class=\"note-tab\" id=\"note-code-group-4-1\">\n    <p class=\"note-tab-title\">bash</p>\n    <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">curl -LO https://cecil.app/cecil.phar</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-code-group-4-2\">\n    <p class=\"note-tab-title\">powershell</p>\n    <pre data-lang=\"powershell\"><code class=\"language-powershell hljs powershell\" translate=\"no\"><span class=\"hljs-built_in\">Invoke-WebRequest</span> https://cecil.app/cecil.phar <span class=\"hljs-literal\">-OutFile</span> cecil.phar</code></pre>\n  </section>\n</div>\n  </section>\n</div>\n<h4 id=\"steps\">Steps</h4>\n<p>A numbered procedure, one step per <code translate=\"no\">####</code> heading.</p>\n<div class=\"note note-tabs\" id=\"note-tabs-5\">\n  <section class=\"note-tab\" id=\"note-tabs-5-1\">\n    <h4 id=\"markdown-2\">Markdown</h4>\n    <pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">:::steps\n<span class=\"hljs-section\">#### Create a site</span>\n\n<span class=\"hljs-code\">```bash\nphp cecil.phar new:site\n```</span>\n\n<span class=\"hljs-section\">#### Preview it</span>\n\n<span class=\"hljs-code\">```bash\nphp cecil.phar serve\n```</span>\n:::</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-tabs-5-2\">\n    <h4 id=\"result-2\">Result</h4>\n    <div class=\"note note-steps\" id=\"note-steps-6\">\n  <ol class=\"note-steps-list\">\n    <li class=\"note-step\">\n      <h4 id=\"create-a-site\">Create a site</h4>\n      <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar new:site</code></pre>\n    </li>\n    <li class=\"note-step\">\n      <h4 id=\"preview-it\">Preview it</h4>\n      <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar serve</code></pre>\n    </li>\n  </ol>\n</div>\n  </section>\n</div>\n<h4 id=\"accordion\">Accordion</h4>\n<p>Collapsible items, one per <code translate=\"no\">####</code> heading (e.g.: a FAQ).</p>\n<div class=\"note note-tabs\" id=\"note-tabs-7\">\n  <section class=\"note-tab\" id=\"note-tabs-7-1\">\n    <h4 id=\"markdown-3\">Markdown</h4>\n    <pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">:::accordion\n<span class=\"hljs-section\">#### Is PHP required?</span>\n\nNo: the standalone binary embeds PHP.\n\n<span class=\"hljs-section\">#### Where is the generated site?</span>\n\nIn the <span class=\"hljs-code\">`_site`</span> directory.\n:::</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-tabs-7-2\">\n    <h4 id=\"result-3\">Result</h4>\n    <div class=\"note note-accordion\" id=\"note-accordion-8\">\n  <details class=\"note-accordion-item\" id=\"is-php-required\">\n    <summary>Is PHP required?</summary>\n    <div class=\"note-accordion-content\">\n      <p>No: the standalone binary embeds PHP.</p>\n    </div>\n  </details>\n  <details class=\"note-accordion-item\" id=\"where-is-the-generated-site\">\n    <summary>Where is the generated site?</summary>\n    <div class=\"note-accordion-content\">\n      <p>In the <code translate=\"no\">_site</code> directory.</p>\n    </div>\n  </details>\n</div>\n  </section>\n</div>\n<h4 id=\"cards\">Cards</h4>\n<p>Links to other pages, one card per list entry: a leading link is the card title.</p>\n<div class=\"note note-tabs\" id=\"note-tabs-9\">\n  <section class=\"note-tab\" id=\"note-tabs-9-1\">\n    <h4 id=\"markdown-4\">Markdown</h4>\n    <pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">:::cards\n<span class=\"hljs-bullet\">- </span>[<span class=\"hljs-string\">Installation</span>](<span class=\"hljs-link\">../getting-started/2-installation.md</span>): download and install Cecil.\n<span class=\"hljs-bullet\">- </span>[<span class=\"hljs-string\">Configuration</span>](<span class=\"hljs-link\">../configuration/index.md</span>): configure your site.\n:::</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-tabs-9-2\">\n    <h4 id=\"result-4\">Result</h4>\n    <div class=\"note note-cards\" id=\"note-cards-10\">\n  <ul class=\"note-cards-list\">\n    <li class=\"note-card\">\n      <p class=\"note-card-title\"><a href=\"../getting-started/2-installation.md\">Installation</a></p>\n      <div class=\"note-card-content\">download and install Cecil.</div>\n    </li>\n    <li class=\"note-card\">\n      <p class=\"note-card-title\"><a href=\"../configuration/index.md\">Configuration</a></p>\n      <div class=\"note-card-content\">configure your site.</div>\n    </li>\n  </ul>\n</div>\n  </section>\n</div>\n<h4 id=\"custom-template\">Custom template</h4>\n<p>The template receives a <code translate=\"no\">note</code> variable:</p>\n<ul>\n<li><code translate=\"no\">note.type</code>: note type (e.g.: <code translate=\"no\">tabs</code>)</li>\n<li><code translate=\"no\">note.id</code>: unique ID in the page (e.g.: <code translate=\"no\">note-tabs-1</code>)</li>\n<li><code translate=\"no\">note.content</code>: HTML of the whole note</li>\n<li><code translate=\"no\">note.intro</code>: HTML of the content before the first <code translate=\"no\">####</code> heading</li>\n<li><code translate=\"no\">note.items</code>: list of items, each with:<ul>\n<li><code translate=\"no\">title</code>: title (HTML)</li>\n<li><code translate=\"no\">heading</code>: heading element (HTML), with its <code translate=\"no\">id</code> attribute</li>\n<li><code translate=\"no\">id</code>: heading ID, if any</li>\n<li><code translate=\"no\">link</code>: leading link element (HTML) of a list entry</li>\n<li><code translate=\"no\">url</code>: leading link URL of a list entry</li>\n<li><code translate=\"no\">language</code>: language of a code block</li>\n<li><code translate=\"no\">content</code>: content (HTML)</li>\n</ul>\n</li>\n</ul>\n<p>To override the rendering of a note type, create the template in your site (or theme), for example <code translate=\"no\">layouts/partials/notes/tip.html.twig</code>:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span> <span class=\"hljs-attr\">class</span>=<span class=\"hljs-string\">\"callout callout-</span></span></span><span class=\"hljs-template-variable\">{{ note.type }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span>\n  </span><span class=\"hljs-template-variable\">{{ note.content|<span class=\"hljs-keyword\">raw</span> }}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span></span></code></pre>\n<aside class=\"note note-info\"><p>Notes are rendered when Markdown is converted, before pages rendering: a note template has access to the <code translate=\"no\">note</code> variable and to translations (in the page language), but not to <code translate=\"no\">page</code> or <code translate=\"no\">site</code>.</p></aside>\n<h2 id=\"syntax-highlight\">Syntax highlight<a class=\"heading-anchor\" href=\"#syntax-highlight\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Code block syntax highlighting is enabled by default with the <a href=\"../configuration/4-pages.md#pages-body-highlight\"><code translate=\"no\">pages.body.highlight</code></a> option.</p>\n<p>If needed, you can disable it with:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">body:</span>\n    <span class=\"hljs-attr\">highlight:</span> <span class=\"hljs-literal\">false</span></code></pre>\n<p><em>Example:</em></p>\n<pre>\n```php\necho \"Hello world\";\n```\n</pre>\n<p>Is rendered to:</p>\n<pre data-lang=\"php\"><code class=\"language-php hljs php\" translate=\"no\"><span class=\"hljs-keyword\">echo</span> <span class=\"hljs-string\">\"Hello world\"</span>;</code></pre>\n<aside class=\"note note-info\"><p>You can customize the syntax highlighting style by creating your own theme. See the <a href=\"https://highlightjs.readthedocs.io/en/latest/theme-guide.html\" target=\"_blank\" rel=\"noopener noreferrer\">Highlight.js Theme Guide</a>.</p></aside>\n<aside class=\"note note-tip\"><p>You can also use <a href=\"https://github.com/tempestphp/highlight\" target=\"_blank\" rel=\"noopener noreferrer\">tempest/highlight</a> instead of highlight.js with the <a href=\"../configuration/4-pages.md#pages-body-highlight\"><code translate=\"no\">pages.body.highlight.engine</code></a> option. It's faster, but supports fewer languages. It uses <code translate=\"no\">hl-*</code> CSS classes: see the <a href=\"https://github.com/tempestphp/highlight/tree/main/src/Themes/Css\" target=\"_blank\" rel=\"noopener noreferrer\">tempest/highlight themes</a>.</p></aside>\n<p>The language of a code block is added to the <code translate=\"no\">data-lang</code> attribute of the <code translate=\"no\">&lt;pre&gt;</code> element (e.g.: <code translate=\"no\">&lt;pre data-lang=\"php\"&gt;</code>): the default templates display it as a label.</p>\n<h2 id=\"inserted-text\">Inserted text<a class=\"heading-anchor\" href=\"#inserted-text\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Represents a range of text that has been added.</p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">++text++</code></pre>\n<p>Is converted to:</p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">ins</span>&gt;</span>text<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">ins</span>&gt;</span></code></pre>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/getting-started/directory-structure/",
      "url": "https://cloudflare.cecil.app/documentation/getting-started/directory-structure/",
      "title": "Directory structure",
      "summary": "How source files are organized, what the built website looks like and how files are routed to URLs.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-11-15T00:00:00+00:00","content_text": "Directory structure\nThis page describes how a Cecil project is organized, what the built website looks like and how files are routed to URLs.\nFile system tree\nProject files organization.\n&lt;mywebsite&gt;\n├─ pages\n|  ├─ blog            &lt;- Section\n|  |  ├─ post-1.md    &lt;- Page in Section\n|  |  └─ post-2.md\n|  ├─ projects\n|  |  └─ project-a.md\n|  └─ about.md        &lt;- Root page\n├─ assets\n|  ├─ styles.scss     &lt;- Asset file\n|  └─ logo.png\n├─ static\n|  └─ file.pdf        &lt;- Static file\n├─ data\n|  └─ authors.yml     &lt;- Data collection\n└─ schemas\n   └─ blog.yml        &lt;- Front matter schema of a Section\nBuilt website tree\nResult of the build.\n&lt;mywebsite&gt;\n└─ _site\n   ├─ index.html               &lt;- Generated home page\n   ├─ blog\/\n   |  ├─ index.html            &lt;- Generated list of posts\n   |  ├─ post-1\/index.html     &lt;- A blog post\n   |  └─ post-2\/index.html\n   ├─ projects\/\n   |  ├─ index.html            &lt;- Generated list of projects\n   |  └─ project-a\/index.html  &lt;- A project\n   ├─ about\/index.html         &lt;- “About” page\n   ├─ styles.css               &lt;- Compiled asset\n   ├─ logo.png\n   └─ file.pdf\nBy default, each page is generated as slugified-filename\/index.html to get a “beautiful” URL like https:\/\/mywebsite.tld\/section\/slugified-filename\/.\nTo get an “ugly” URL (like 404.html instead of 404\/), set uglyurl: true in the page’s front matter.\nFiles of the assets directory are published only when they are used in templates (with the asset() function), whereas files of the static directory are copied as is.\nFiles of the schemas directory are the front matter schemas, one file by Section or by page.\nFile-based routing\nMarkdown files in the pages directory enable file-based routing. This means that adding pages\/my-projects\/project-a.md, for instance, makes it available at \/my-projects\/project-a\/ in your browser.\nFile:\n                   pages\/my-projects\/project-a.md\n                        └───── filepath ──────┘\nURL:\n    ┌───── baseurl ─────┬─────── path ────────┐\n     https:\/\/example.com\/my-projects\/project-a\/index.html\n                        └─ section ─┴─ slug ──┘\nTwo kinds of prefixes can alter the URL. See the File prefix section.",
      "content_html": "<h1>Directory structure</h1>\n<p>This page describes how a Cecil project is organized, what the built website looks like and how files are routed to URLs.</p>\n<h2 id=\"file-system-tree\">File system tree<a class=\"heading-anchor\" href=\"#file-system-tree\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Project files organization.</p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">&lt;mywebsite&gt;\n├─ pages\n|  ├─ blog            &lt;- Section\n|  |  ├─ post-1.md    &lt;- Page in Section\n|  |  └─ post-2.md\n|  ├─ projects\n|  |  └─ project-a.md\n|  └─ about.md        &lt;- Root page\n├─ assets\n|  ├─ styles.scss     &lt;- Asset file\n|  └─ logo.png\n├─ static\n|  └─ file.pdf        &lt;- Static file\n├─ data\n|  └─ authors.yml     &lt;- Data collection\n└─ schemas\n   └─ blog.yml        &lt;- Front matter schema of a Section</code></pre>\n<h2 id=\"built-website-tree\">Built website tree<a class=\"heading-anchor\" href=\"#built-website-tree\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Result of the build.</p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">&lt;mywebsite&gt;\n└─ _site\n   ├─ index.html               &lt;- Generated home page\n   ├─ blog/\n   |  ├─ index.html            &lt;- Generated list of posts\n   |  ├─ post-1/index.html     &lt;- A blog post\n   |  └─ post-2/index.html\n   ├─ projects/\n   |  ├─ index.html            &lt;- Generated list of projects\n   |  └─ project-a/index.html  &lt;- A project\n   ├─ about/index.html         &lt;- “About” page\n   ├─ styles.css               &lt;- Compiled asset\n   ├─ logo.png\n   └─ file.pdf</code></pre>\n<aside class=\"note note-info\"><p>By default, each page is generated as <code translate=\"no\">slugified-filename/index.html</code> to get a “beautiful” URL like <code translate=\"no\">https://mywebsite.tld/section/slugified-filename/</code>.</p>\n<p>To get an “ugly” URL (like <code translate=\"no\">404.html</code> instead of <code translate=\"no\">404/</code>), set <code translate=\"no\">uglyurl: true</code> in the page’s <a href=\"../content/1-pages.md#front-matter\">front matter</a>.</p>\n<p>Files of the <code translate=\"no\">assets</code> directory are published only when they are used in templates (with the <code translate=\"no\">asset()</code> function), whereas files of the <code translate=\"no\">static</code> directory are copied as is.</p>\n<p>Files of the <code translate=\"no\">schemas</code> directory are the <a href=\"../configuration/4-pages.md#schemas-directory\">front matter schemas</a>, one file by <em>Section</em> or by page.</p></aside>\n<h2 id=\"file-based-routing\">File-based routing<a class=\"heading-anchor\" href=\"#file-based-routing\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Markdown files in the <code translate=\"no\">pages</code> directory enable file-based routing. This means that adding <code translate=\"no\">pages/my-projects/project-a.md</code>, for instance, makes it available at <code translate=\"no\">/my-projects/project-a/</code> in your browser.</p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">File:\n                   pages/my-projects/project-a.md\n                        └───── filepath ──────┘\nURL:\n    ┌───── baseurl ─────┬─────── path ────────┐\n     https://example.com/my-projects/project-a/index.html\n                        └─ section ─┴─ slug ──┘</code></pre>\n<aside class=\"note note-important\"><p>Two kinds of prefixes can alter the URL. See the <a href=\"../content/1-pages.md#file-prefix\">File prefix section</a>.</p></aside>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/templates/reference/filters/",
      "url": "https://cloudflare.cecil.app/documentation/templates/reference/filters/",
      "title": "Filters",
      "summary": "filter_by, markdown_to_html, toc, slugify, excerpt, highlight, preg_*, etc.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-11-15T00:00:00+00:00","content_text": "Filters\nVariables can be modified by filters. Filters are separated from the variable by a pipe symbol (|). Multiple filters can be chained. The output of one filter is applied to the next.\n{{ page.title|truncate(25)|capitalize }}\nSee also: filters dedicated to assets (resize, minify, fingerprint, to_css, inline, webp, lqip, etc.) are documented in the Assets section.\nfilter_by\nFilters a pages collection by variable name\/value.\n{{ collection|filter_by(variable, value) }}\nOnly regular pages (type page, not redirections) are returned.\nExample:\n{{ pages|filter_by('section', 'blog') }}\nfilter\nFor more complex cases, you should use Twig’s native filter.\nExample:\n{% set filtered = pages|filter(p =&gt; p.generated == false and p.id not in ['page-1', 'page-2']) %}\nmarkdown_to_html\nConverts a Markdown string to HTML.\n{{ markdown|markdown_to_html }}\n{% apply markdown_to_html %}\n{# Markdown here #}\n{% endapply %}\nExamples:\n{% set markdown = '**This is bold text**' %}\n{{ markdown|markdown_to_html }}\n{% apply markdown_to_html %}\n**This is bold text**\n{% endapply %}\ntoc\nExtracts only headings matching the given selectors (h2, h3, etc.), or those defined in config pages.body.toc if not specified.\nThe format parameter defines the output format: html (default) or json.\nThe url parameter is used to build links to headings.\n{{ markdown|toc(format, selectors, url) }}\nExamples:\n{{ page.body|toc }}\n{{ page.body|toc('html') }}\n{{ page.body|toc(selectors=['h2']) }}\n{{ page.body|toc(url=url(page)) }}\njson_decode\nConverts a JSON string to an array.\n{{ json|json_decode }}\nExample:\n{% set json = '{\"foo\": \"bar\"}' %}\n{% set array = json|json_decode %}\n{{ array.foo }}\nyaml_parse\nConverts a YAML string to an array.\n{{ yaml|yaml_parse }}\nExample:\n{% set yaml = 'key: value' %}\n{% set array = yaml|yaml_parse %}\n{{ array.key }}\nslugify\nConverts a string to a slug.\n{{ string|slugify }}\nu\nThe u filter wraps a text in a Unicode object (a Symfony UnicodeString instance) that exposes methods to \"manipulate\" the string.\nExample:\n{{ 'cecil_string with twig'|u.camel.title }}\n\nCecilStringWithTwig\n\nsingular\nThe singular filter transforms a given noun in its plural form into its singular version.\n{{ string|singular(locale) }}\nExample:\n{# English (en) rules are used by default #}\n{{ 'partitions'|singular }}\n\npartition\n\n{{ 'partitions'|singular('fr') }}\n\npartition\n\nplural\nThe plural filter transforms a given noun in its singular form into its plural version.\n{{ string|plural(locale) }}\nExample:\n{# English (en) rules are used by default #}\n{{ 'animal'|plural }}\n\nanimals\n\n{{ 'animal'|plural('fr') }}\n\nanimaux\n\nexcerpt\nTruncates a string and appends a suffix.\n{{ string|excerpt(length, suffix) }}\n\n\n\nOption\nDescription\nType\nDefault\n\n\n\n\nlength\nTruncates after this number of characters.\ninteger\n450\n\n\nsuffix\nAppends characters.\nstring\n' …' (space and ellipsis)\n\n\n\nExamples:\n{{ variable|excerpt }}\n{{ variable|excerpt(250, '...') }}\nexcerpt_html\nReads characters before or after &lt;!-- excerpt --&gt; or &lt;!-- break --&gt; tag.\nSee Content documentation for details.\n{{ string|excerpt_html({separator, capture}) }}\n\n\n\nOption\nDescription\nType\nDefault\n\n\n\n\nseparator\nString to use as separator.\nstring\nexcerpt|break\n\n\ncapture\nPart to capture, before or after the separator.\nstring\nbefore\n\n\n\nDefault values are defined by the pages.body.excerpt configuration.\nExamples:\n{{ variable|excerpt_html }}\n{{ variable|excerpt_html({separator: 'excerpt|break', capture: 'before'}) }}\n{{ variable|excerpt_html({capture: 'after'}) }}\nabsolute_urls\nMakes the root-relative URLs (e.g. \/about\/, \/images\/photo.png) of the href, src and srcset attributes of an HTML content absolute, with the scheme and the host of the baseurl, to use the content outside of the site (feeds, e-mails, etc.).\nOther URLs (absolute or protocol-relative URLs, relative paths, anchors, mailto:, data:, etc.) are kept as is, and the content is unchanged if the baseurl is not absolute.\n{{ string|absolute_urls }}\nExample:\n{# with `baseurl: https:\/\/example.com\/` #}\n{{ '&lt;a href=\"\/about\/\"&gt;About&lt;\/a&gt; &lt;img src=\"\/images\/photo.png\" srcset=\"\/images\/photo-320.png 320w\"&gt;'|absolute_urls }}\n{# &lt;a href=\"https:\/\/example.com\/about\/\"&gt;About&lt;\/a&gt; &lt;img src=\"https:\/\/example.com\/images\/photo.png\" srcset=\"https:\/\/example.com\/images\/photo-320.png 320w\"&gt; #}\nThe built-in feeds (Atom, RSS and JSON Feed) apply this filter to the content of their items.\nhighlight\nHighlights a code string.\n{{ code|highlight(language, engine) }}\nThe highlighter engine (highlightjs or tempest) is the optional engine argument or, by default, the layouts.highlight.engine option (highlightjs by default).\nThe filter does not use the pages.body.highlight.engine option, which only applies to Markdown content.\nIf the language is not supported by the engine, the code is returned escaped, without highlighting (and a warning is logged).\nExamples:\n{{ '&lt;?php echo $highlighted-&gt;value; ?&gt;'|highlight('php') }}\n{{ '&lt;?php echo $highlighted-&gt;value; ?&gt;'|highlight('php', 'tempest') }}\nEach engine uses its own CSS classes (hljs-* for highlightjs, hl-* for tempest): the stylesheet must match the engine used.\npreg_split\nSplits a string into an array using a regular expression (limit is 0, i.e. no limit, by default).\n{{ string|preg_split(pattern, limit) }}\nExample:\n{% set headers = page.content|preg_split('\/&lt;br[^&gt;]*&gt;\/') %}\npreg_match_all\nPerforms a regular expression match and returns the group for all matches (group is 0, i.e. the full match, by default).\n{{ string|preg_match_all(pattern, group) }}\nExample:\n{% set tags = page.content|preg_match_all('\/&lt;[^&gt;]+&gt;(.*)&lt;\\\/[^&gt;]+&gt;\/') %}\nhex_to_rgb\nConverts a hexadecimal color to RGB: returns an array with red, green and blue keys.\n{{ color|hex_to_rgb }}\nExample:\n{% set rgb = '#f00'|hex_to_rgb %}\nrgb({{ rgb.red }}, {{ rgb.green }}, {{ rgb.blue }})\n\nrgb(255, 0, 0)\n\nsplitline\nSplits a string into an array of lines of max characters maximum (18 by default), without breaking words.\n{{ string|splitline(max) }}\nExample:\n{% for line in 'The quick brown fox jumps'|splitline(10) %}\n  {{ line }}&lt;br&gt;\n{% endfor %}\n\nThe quickbrown foxjumps\n\niterable\nConverts a variable to an iterable (array): an array is returned as is, a traversable object is converted to an array, and any other value is wrapped in an array.\n{{ variable|iterable }}\nExample:\n{% for author in page.authors|iterable %}\n  {{ author }}\n{% endfor %}\nunique\nRemoves duplicate values from an array of strings (case-insensitive: the first occurrence is kept).\n{{ array|unique }}\nExample:\n{{ ['PHP', 'php', 'Twig']|unique|join(', ') }}\n\nPHP, Twig\n\nduration_to_iso8601\nConverts a duration in seconds to an ISO 8601 duration (e.g.: for the duration of a video in structured data).\n{{ seconds|duration_to_iso8601 }}\nExample:\n{{ 125|duration_to_iso8601 }}\n\nPT00H00M125S\n",
      "content_html": "<h1>Filters</h1>\n<p>Variables can be modified by <a href=\"https://twig.symfony.com/doc/filters/index.html\" target=\"_blank\" rel=\"noopener noreferrer\">filters</a>. Filters are separated from the variable by a pipe symbol (<code translate=\"no\">|</code>). Multiple filters can be chained. The output of one filter is applied to the next.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ page.title|truncate(25)|<span class=\"hljs-keyword\">capitalize</span> }}</span></code></pre>\n<aside class=\"note note-info\"><p>See also: filters dedicated to assets (<code translate=\"no\">resize</code>, <code translate=\"no\">minify</code>, <code translate=\"no\">fingerprint</code>, <code translate=\"no\">to_css</code>, <code translate=\"no\">inline</code>, <code translate=\"no\">webp</code>, <code translate=\"no\">lqip</code>, etc.) are documented in the <a href=\"../../assets/index.md\">Assets</a> section.</p></aside>\n<h2 id=\"filter-by\">filter_by<a class=\"heading-anchor\" href=\"#filter-by\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Filters a pages collection by variable name/value.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ collection|filter_by(variable, value) }}</span></code></pre>\n<p>Only regular pages (type <code translate=\"no\">page</code>, not redirections) are returned.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ pages|filter_by('section', 'blog') }}</span></code></pre>\n<h2 id=\"filter\">filter<a class=\"heading-anchor\" href=\"#filter\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>For more complex cases, you should use <a href=\"https://twig.symfony.com/doc/filters/filter.html\" target=\"_blank\" rel=\"noopener noreferrer\">Twig’s native <code translate=\"no\">filter</code></a>.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> filtered = pages|<span class=\"hljs-keyword\">filter</span>(p =&gt; p.generated == false and p.id not in ['page-1', 'page-2']) %}</span></code></pre>\n<h2 id=\"markdown-to-html\">markdown_to_html<a class=\"heading-anchor\" href=\"#markdown-to-html\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Converts a Markdown string to HTML.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ markdown|markdown_to_html }}</span></code></pre>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">apply</span></span> markdown_to_html %}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# Markdown here #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endapply</span></span> %}</span></code></pre>\n<p><em>Examples:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> markdown = '**This is bold text**' %}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ markdown|markdown_to_html }}</span></code></pre>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">apply</span></span> markdown_to_html %}</span><span class=\"xml\">\n**This is bold text**\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endapply</span></span> %}</span></code></pre>\n<h2 id=\"toc\">toc<a class=\"heading-anchor\" href=\"#toc\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Extracts only headings matching the given <code translate=\"no\">selectors</code> (h2, h3, etc.), or those defined in config <code translate=\"no\">pages.body.toc</code> if not specified.<br>\nThe <code translate=\"no\">format</code> parameter defines the output format: <code translate=\"no\">html</code> (default) or <code translate=\"no\">json</code>.<br>\nThe <code translate=\"no\">url</code> parameter is used to build links to headings.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ markdown|toc(format, selectors, url) }}</span></code></pre>\n<p><em>Examples:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ page.body|toc }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ page.body|toc('html') }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ page.body|toc(selectors=['h2']) }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ page.body|toc(url=url(page)) }}</span></code></pre>\n<h2 id=\"json-decode\">json_decode<a class=\"heading-anchor\" href=\"#json-decode\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Converts a JSON string to an array.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ json|json_decode }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> json = '{\"foo\": \"bar\"}' %}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> array = json|json_decode %}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ array.foo }}</span></code></pre>\n<h2 id=\"yaml-parse\">yaml_parse<a class=\"heading-anchor\" href=\"#yaml-parse\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Converts a YAML string to an array.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ yaml|yaml_parse }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> yaml = 'key: value' %}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> array = yaml|yaml_parse %}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ array.key }}</span></code></pre>\n<h2 id=\"slugify\">slugify<a class=\"heading-anchor\" href=\"#slugify\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Converts a string to a slug.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ string|slugify }}</span></code></pre>\n<h2 id=\"u\">u<a class=\"heading-anchor\" href=\"#u\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The <code translate=\"no\">u</code> filter wraps a text in a Unicode object (a <a href=\"https://symfony.com/doc/current/components/string.html\" target=\"_blank\" rel=\"noopener noreferrer\">Symfony UnicodeString instance</a>) that exposes methods to \"manipulate\" the string.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ 'cecil_string with twig'|u.camel.title }}</span></code></pre>\n<blockquote>\n<p>CecilStringWithTwig</p>\n</blockquote>\n<h2 id=\"singular\">singular<a class=\"heading-anchor\" href=\"#singular\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The <code translate=\"no\">singular</code> filter transforms a given noun in its plural form into its singular version.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ string|singular(locale) }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# English (en) rules are used by default #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ 'partitions'|singular }}</span></code></pre>\n<blockquote>\n<p>partition</p>\n</blockquote>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ 'partitions'|singular('fr') }}</span></code></pre>\n<blockquote>\n<p>partition</p>\n</blockquote>\n<h2 id=\"plural\">plural<a class=\"heading-anchor\" href=\"#plural\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The <code translate=\"no\">plural</code> filter transforms a given noun in its singular form into its plural version.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ string|plural(locale) }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# English (en) rules are used by default #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ 'animal'|plural }}</span></code></pre>\n<blockquote>\n<p>animals</p>\n</blockquote>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ 'animal'|plural('fr') }}</span></code></pre>\n<blockquote>\n<p>animaux</p>\n</blockquote>\n<h2 id=\"excerpt\">excerpt<a class=\"heading-anchor\" href=\"#excerpt\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Truncates a string and appends a suffix.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ string|excerpt(length, suffix) }}</span></code></pre>\n<table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Description</th>\n<th>Type</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>length</td>\n<td>Truncates after this number of characters.</td>\n<td>integer</td>\n<td>450</td>\n</tr>\n<tr>\n<td>suffix</td>\n<td>Appends characters.</td>\n<td>string</td>\n<td><code translate=\"no\">' …'</code> (space and ellipsis)</td>\n</tr>\n</tbody>\n</table>\n<p><em>Examples:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ variable|excerpt }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ variable|excerpt(250, '...') }}</span></code></pre>\n<h2 id=\"excerpt-html\">excerpt_html<a class=\"heading-anchor\" href=\"#excerpt-html\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Reads characters before or after <code translate=\"no\">&lt;!-- excerpt --&gt;</code> or <code translate=\"no\">&lt;!-- break --&gt;</code> tag.<br>\nSee <a href=\"../../content/3-markdown.md#excerpt\">Content documentation</a> for details.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ string|excerpt_html({separator, capture}) }}</span></code></pre>\n<table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Description</th>\n<th>Type</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>separator</td>\n<td>String to use as separator.</td>\n<td>string</td>\n<td><code translate=\"no\">excerpt|break</code></td>\n</tr>\n<tr>\n<td>capture</td>\n<td>Part to capture, <code translate=\"no\">before</code> or <code translate=\"no\">after</code> the separator.</td>\n<td>string</td>\n<td><code translate=\"no\">before</code></td>\n</tr>\n</tbody>\n</table>\n<p>Default values are defined by the <code translate=\"no\">pages.body.excerpt</code> configuration.</p>\n<p><em>Examples:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ variable|excerpt_html }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ variable|excerpt_html({separator: 'excerpt|break', capture: 'before'}) }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ variable|excerpt_html({capture: 'after'}) }}</span></code></pre>\n<h2 id=\"absolute-urls\">absolute_urls<a class=\"heading-anchor\" href=\"#absolute-urls\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Makes the root-relative URLs (e.g. <code translate=\"no\">/about/</code>, <code translate=\"no\">/images/photo.png</code>) of the <code translate=\"no\">href</code>, <code translate=\"no\">src</code> and <code translate=\"no\">srcset</code> attributes of an HTML content absolute, with the scheme and the host of the <code translate=\"no\">baseurl</code>, to use the content outside of the site (feeds, e-mails, etc.).</p>\n<p>Other URLs (absolute or protocol-relative URLs, relative paths, anchors, <code translate=\"no\">mailto:</code>, <code translate=\"no\">data:</code>, etc.) are kept as is, and the content is unchanged if the <code translate=\"no\">baseurl</code> is not absolute.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ string|absolute_urls }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# with `baseurl: https://example.com/` #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ '&lt;a href=\"/about/\"&gt;About&lt;/a&gt; &lt;img src=\"/images/photo.png\" srcset=\"/images/photo-320.png 320w\"&gt;'|absolute_urls }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# &lt;a href=\"https://example.com/about/\"&gt;About&lt;/a&gt; &lt;img src=\"https://example.com/images/photo.png\" srcset=\"https://example.com/images/photo-320.png 320w\"&gt; #}</span></code></pre>\n<aside class=\"note note-info\"><p>The built-in feeds (Atom, RSS and JSON Feed) apply this filter to the content of their items.</p></aside>\n<h2 id=\"highlight\">highlight<a class=\"heading-anchor\" href=\"#highlight\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Highlights a code string.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ code|highlight(language, engine) }}</span></code></pre>\n<p>The highlighter engine (<code translate=\"no\">highlightjs</code> or <code translate=\"no\">tempest</code>) is the optional <code translate=\"no\">engine</code> argument or, by default, the <a href=\"../../configuration/7-layouts.md#layouts-highlight\"><code translate=\"no\">layouts.highlight.engine</code></a> option (<code translate=\"no\">highlightjs</code> by default).</p>\n<aside class=\"note note-tip\"><p>The filter does not use the <a href=\"../../configuration/4-pages.md#pages-body-highlight\"><code translate=\"no\">pages.body.highlight.engine</code></a> option, which only applies to Markdown content.</p></aside>\n<p>If the language is not supported by the engine, the code is returned escaped, without highlighting (and a warning is logged).</p>\n<p><em>Examples:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ '&lt;?php echo $highlighted-&gt;value; ?&gt;'|highlight('php') }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ '&lt;?php echo $highlighted-&gt;value; ?&gt;'|highlight('php', 'tempest') }}</span></code></pre>\n<aside class=\"note note-info\"><p>Each engine uses its own CSS classes (<code translate=\"no\">hljs-*</code> for <code translate=\"no\">highlightjs</code>, <code translate=\"no\">hl-*</code> for <code translate=\"no\">tempest</code>): the stylesheet must match the engine used.</p></aside>\n<h2 id=\"preg-split\">preg_split<a class=\"heading-anchor\" href=\"#preg-split\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Splits a string into an array using a regular expression (<code translate=\"no\">limit</code> is <code translate=\"no\">0</code>, i.e. no limit, by default).</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ string|preg_split(pattern, limit) }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> headers = page.content|preg_split('/&lt;br[^&gt;]*&gt;/') %}</span></code></pre>\n<h2 id=\"preg-match-all\">preg_match_all<a class=\"heading-anchor\" href=\"#preg-match-all\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Performs a regular expression match and returns the group for all matches (<code translate=\"no\">group</code> is <code translate=\"no\">0</code>, i.e. the full match, by default).</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ string|preg_match_all(pattern, group) }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> tags = page.content|preg_match_all('/&lt;[^&gt;]+&gt;(.*)&lt;\\/[^&gt;]+&gt;/') %}</span></code></pre>\n<h2 id=\"hex-to-rgb\">hex_to_rgb<a class=\"heading-anchor\" href=\"#hex-to-rgb\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Converts a hexadecimal color to RGB: returns an array with <code translate=\"no\">red</code>, <code translate=\"no\">green</code> and <code translate=\"no\">blue</code> keys.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ color|hex_to_rgb }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> rgb = '#f00'|hex_to_rgb %}</span><span class=\"xml\">\nrgb(</span><span class=\"hljs-template-variable\">{{ rgb.red }}</span><span class=\"xml\">, </span><span class=\"hljs-template-variable\">{{ rgb.green }}</span><span class=\"xml\">, </span><span class=\"hljs-template-variable\">{{ rgb.blue }}</span><span class=\"xml\">)</span></code></pre>\n<blockquote>\n<p>rgb(255, 0, 0)</p>\n</blockquote>\n<h2 id=\"splitline\">splitline<a class=\"heading-anchor\" href=\"#splitline\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Splits a string into an array of lines of <code translate=\"no\">max</code> characters maximum (<code translate=\"no\">18</code> by default), without breaking words.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ string|splitline(<span class=\"hljs-name\">max</span>) }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> line in 'The quick brown fox jumps'|splitline(10) %}</span><span class=\"xml\">\n  </span><span class=\"hljs-template-variable\">{{ line }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">br</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span></code></pre>\n<blockquote>\n<p>The quick<br>brown fox<br>jumps</p>\n</blockquote>\n<h2 id=\"iterable\">iterable<a class=\"heading-anchor\" href=\"#iterable\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Converts a variable to an iterable (array): an array is returned as is, a traversable object is converted to an array, and any other value is wrapped in an array.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ variable|iterable }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> author in page.authors|iterable %}</span><span class=\"xml\">\n  </span><span class=\"hljs-template-variable\">{{ author }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span></code></pre>\n<h2 id=\"unique\">unique<a class=\"heading-anchor\" href=\"#unique\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Removes duplicate values from an array of strings (case-insensitive: the first occurrence is kept).</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ array|unique }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ ['PHP', 'php', 'Twig']|unique|<span class=\"hljs-keyword\">join</span>(', ') }}</span></code></pre>\n<blockquote>\n<p>PHP, Twig</p>\n</blockquote>\n<h2 id=\"duration-to-iso8601\">duration_to_iso8601<a class=\"heading-anchor\" href=\"#duration-to-iso8601\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Converts a duration in seconds to an <a href=\"https://en.wikipedia.org/wiki/ISO_8601#Durations\" target=\"_blank\" rel=\"noopener noreferrer\">ISO 8601 duration</a> (e.g.: for the <code translate=\"no\">duration</code> of a video in structured data).</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ seconds|duration_to_iso8601 }}</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ 125|duration_to_iso8601 }}</span></code></pre>\n<blockquote>\n<p>PT00H00M125S</p>\n</blockquote>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/configuration/pages/",
      "url": "https://cloudflare.cecil.app/documentation/configuration/pages/",
      "title": "Pages",
      "summary": "Pages directory, sorting, pagination, paths, body, default pages, generators, etc.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-12-04T00:00:00+00:00","content_text": "Pages\nThese options control how pages are loaded, sorted, paginated, routed and generated.\npages.dir\nSource directory of pages (pages by default).\npages:\n  dir: pages\npages.ext\nExtensions of pages files.\npages:\n  ext: [md, markdown, mdown, mkdn, mkd, text, txt]\npages.exclude\nDirectories, paths and files name to exclude (accepts globs, strings and regexes).\npages:\n  exclude: ['vendor', 'node_modules', '*.scss', '\/\\.bck$\/']\npages.prefix.separator\nList of characters used as separator between a filename prefix (date or weight) and the slug.\npages:\n  prefix:\n    separator: ['-', '_']\npages.sortby\nDefault collections sort method.\npages:\n  sortby: date # `date`, `updated`, `title` or `weight`\n  # or\n  sortby:\n    variable: date    # `date`, `updated`, `title` or `weight`\n    desc_title: false # sort by title in descending order\n    reverse: false    # reverse the sort order\npages.pagination\nPagination is available for list pages (type is homepage, section or term).\npages:\n  pagination:\n    max: 5     # maximum number of entries per page\n    path: page # path to the paginated page\nDisable pagination\nPagination can be disabled:\npages:\n  pagination: false\nOr:\npages:\n  pagination:\n    enabled: false\nWhen pagination is disabled globally, a list page can still enable it in its front matter with pagination.enabled: true.\npages.paths\nApply a custom path for all pages of a Section.\npages:\n  paths:\n    - section: &lt;section’s ID&gt;\n      path: &lt;path of pages&gt;\nPath placeholders\n\n:year\n:month\n:day\n:section\n:slug\n\nExample:\npages:\n  paths:\n    - section: Blog\n      path: :section\/:year\/:month\/:day\/:slug # e.g.: \/blog\/2020\/12\/01\/my-post\/\n# localized\nlanguages:\n  - code: fr\n    name: Français\n    locale: fr_FR\n    config:\n      pages:\n        paths:\n          - section: Blog\n            path: blogue\/:year\/:month\/:day\/:slug # e.g.: \/blogue\/2020\/12\/01\/mon-billet\/\npages.frontmatter\nPage front matter format (yaml by default, also accepts ini, toml and json).\npages:\n  frontmatter: yaml\npages.validation\nBehavior when the front matter of a page does not match its schema:\n\nwarning: logs a warning and keeps the page;\nerror (default): logs an error and skips the page;\nstrict: the build fails;\nfalse: disables the validation.\n\npages:\n  validation: error\nThe predefined variables (date, menu, schedule, output, etc.) are always checked against a built-in schema, even without pages.schema.\npages.schema\nSchemas of the front matter, by Section or by page (* applies to all pages).\nSchemas can also be written in the schemas directory, one file by Section or by page.\nEach variable is defined by its type, or by a map of rules:\n\n\n\nRule\nDescription\n\n\n\n\ntype\nstring, int, number, bool, date, list, map, scalar or mixed (default).\n\n\nrequired\nThe variable must be defined (false by default).\n\n\nenum\nList of allowed values.\n\n\npattern\nRegular expression that the value must match (string and scalar).\n\n\nmin\nMinimum value (int, number), length (string) or count of items (list, map).\n\n\nmax\nMaximum value (int, number), length (string) or count of items (list, map).\n\n\nitems\nType or definition of the items of a list (see lists and maps).\n\n\nfields\nDefinitions of the variables of a map (see lists and maps).\n\n\ndefault\nValue applied when the variable is not defined.\n\n\nwhen\nCondition on the values of other variables of the same map (see conditional variables).\n\n\nformat\nWhat a string holds: text, markdown, url, email or path (see description of the variables).\n\n\nlabel\nName of the variable, for the tools that edit the front matter.\n\n\ndescription\nHelp text of the variable, for the tools that edit the front matter.\n\n\n\npages:\n  schema:\n    '*':\n      title:\n        type: string\n        required: true\n    blog:\n      author: string # type shorthand\n      rating:\n        type: int\n        min: 1\n        max: 5\n      category:\n        type: string\n        enum: [news, tutorial]\n        default: news\n      tags:\n        type: list\n        items: string\n        max: 5\nThe length of a string (min and max rules) is counted in characters, not in bytes.\nSchemas are open: variables that are not declared are allowed. Variables of a section override variables of *, and variables of a page override both. An optional variable can be empty (null).\nLists and maps\nThe structure of a map and of the items of a list can be validated, at any depth:\n\nfields: definitions of the variables of a map, with the same syntax as the variables of a page (type shorthand or map of rules, including fields and items). As a page, a map is open: undeclared variables are allowed.\nitems: the type of the items (items: string), or the definition of the items (items: {type: map, fields: …}).\n\nScope of the rules:\n\nWith a type of items (items: string), the enum and pattern rules of the list apply to its items.\nWith a definition of items, only the rules of this definition apply to the items (min and max of the definition apply to each item: length of a string, value of a number, etc.). An item can't be empty (null), except with items: mixed, and the required and default rules don't apply to items.\nThe min and max rules of a list apply to its count of items.\nA map with fields doesn't accept the min, max, enum and pattern rules (without fields, min and max apply to its count of variables).\nA default value of a variable of a map is applied when the map is defined but the variable is not (a missing map is not created), including in each item of a list.\n\nExample: each image of an illustration must have a file name and an alternative text of 20 characters at least.\npages:\n  schema:\n    illustrations:\n      description: {type: string, required: true}\n      images:\n        type: list\n        min: 1\n        items:\n          type: map\n          fields:\n            file: {type: string, required: true, pattern: '^[\\w-]+\\.(png|jpe?g|gif|webp)$'}\n            alt: {type: string, required: true, min: 20}\nAn error gives the path of the invalid variable, from 0 for the first item of a list: The mandatory variable 'images › 1 › alt' is missing. (alternative text of the second image).\nConditional variables\nThe when rule allows a variable only when other variables of the same map (or of the page) have the given values:\n\nwhen: {type: links}: the variable is allowed only if type is links;\nwhen: {type: [links, gallery]}: only if type is links or gallery;\nwhen: {type: links, featured: true}: only if both conditions are met.\n\nBehavior:\n\nIf the variable is set (not null, an empty list or string is set) while the condition is not met, the validation fails: The variable 'blocks › 2 › items' is allowed only when `type` is `links`.\nThe required rule applies only when the condition is met, and the default value is applied only when the condition is met.\nThe condition only looks at the other variables of the same map (or at the variables of the page, for a variable of the page), as defined in the front matter: a missing or empty (null) variable doesn't meet it, and the default values of the other variables are not taken into account. Values are compared strictly (1 is not '1'), except booleans strings (yes, no, true, false, on, off), which are booleans.\nThe when rule is not allowed on the definition of the items of a list (items: {…}): it applies to the variables of a map.\nThe conditions of a map are checked once its variables are valid: a condition error can show up after the other errors of the map are fixed.\n\nExample: blocks of the home page, each one rendered by its own template; only the links blocks accept items and options.\npages:\n  schema:\n    index:\n      blocks:\n        type: list\n        items:\n          type: map\n          fields:\n            type: {type: string, required: true, enum: [content, links, social]}\n            items:\n              type: list\n              when: {type: links}\n              required: true # required for the `links` blocks only\n              items: {type: map, fields: {title: string, url: {type: string, format: url}}}\n            options:\n              type: map\n              when: {type: links}\n              fields: {columns: int}\nTools that edit the front matter can use the when rule to show only the relevant variables.\nSchema of a page\nA key of pages.schema can also be a page, for the pages that have their own variables (a home page, a résumé, etc.). The key is the ID of the page, without its language: the path of its file in the pages directory, without prefix, language and extension.\n\n\n\nFile\nKey\n\n\n\n\nindex.md\nindex\n\n\ncv.md, cv.en.md\ncv\n\n\n1-My project.md\nmy-project\n\n\nblog\/2024-05-01_post.md\nblog\/post\n\n\nblog\/index.md\nblog\/index\n\n\n\nThe variables are those of *, then of the section of the page, then of the page: the last ones override the others.\npages:\n  schema:\n    blog:        # pages of the \"blog\" section\n      author: {type: string, required: true}\n    blog\/index:  # index of the \"blog\" section\n      intro: string\n    cv:          # \"cv.md\" page, and its translations\n      skills:\n        type: list\n        items:\n          type: map\n          fields:\n            name: {type: string, required: true}\n            level: {type: int, min: 0, max: 100}\nThe schema of a section applies to its pages, not to its index (blog\/index.md), which has its own key (blog\/index).\nDescription of the variables\nThe format, label and description rules describe a variable to the tools that edit the front matter (e.g. Cecil Desktop builds its form from the schema). They are accepted on any variable, also in fields and items.\nformat tells what a string holds:\n\n\n\nFormat\nDescription\n\n\n\n\ntext\nText of several lines.\n\n\nmarkdown\nText of several lines, rendered as Markdown by the template.\n\n\nurl\nAbsolute URL (https:\/\/cecil.app): validated.\n\n\nemail\nEmail address: validated.\n\n\npath\nPath of a file of the site (asset or static file): not checked.\n\n\n\npages:\n  schema:\n    cv:\n      intro:\n        type: string\n        format: markdown\n        label: Introduction\n        description: Shown under the title of the page.\n      website: {type: string, format: url}\n      photo: {type: string, format: path, label: Photo}\nlabel and description have no effect on the validation, and neither have the text, markdown and path formats.\nSchemas directory\nInstead of writing them in the configuration, schemas can be written in the schemas directory, at the root of the site: one YAML file (.yml or .yaml) by key of pages.schema, loaded automatically.\n&lt;mywebsite&gt;\n├─ pages\n└─ schemas\n   ├─ _all.yml        &lt;- '*': all pages\n   ├─ blog.yml        &lt;- \"blog\" section\n   ├─ cv.yml          &lt;- \"cv.md\" page\n   ├─ index.yml       &lt;- home page\n   └─ blog\n      └─ index.yml    &lt;- \"blog\/index.md\" page (key \"blog\/index\")\n\nThe path of a file in the directory, without its extension, is the key of the schema: a Section, or a page (schemas\/blog\/post-1.yml is the schema of the blog\/post-1 page).\nThe schema of all pages (*) is the _all.yml file.\nA key can't have two files (blog.yml and blog.yaml): this is an error.\nA file holds the variables directly, as under pages.schema.&lt;key&gt;, and an empty file is an empty schema.\n\n# schemas\/cv.yml\nsections:\n  label: Sections\n  type: list\n  items:\n    type: map\n    fields:\n      title: {type: string, required: true}\n      text: {type: string, format: markdown}\nis the same as:\npages:\n  schema:\n    cv:\n      sections:\n        # …\nEach file is validated when the configuration is loaded: an error gives the name of the file and the path of the invalid variable in it (e.g. Invalid schema file \"schemas\/cv.yml\"). As in pages.schema, a file whose key matches no Section and no page is ignored.\nA theme can also have a schemas directory, for the variables its templates expect. Schemas are merged from the lowest to the highest priority:\n\nschemas directories of the themes (a theme overrides the themes after it in the list);\npages.schema of the config.yml of the themes (a theme overrides the themes after it in the list);\nschemas directory of the site;\npages.schema of the configuration of the site.\n\nFor a same key, variables are merged one by one, at each level and between themes: the definition of a variable replaces its previous definition as a whole (its rules are not merged, and enum lists are not combined), the other variables are kept.\n# schemas\/blog.yml\nauthor: {type: string, required: true}\ntags: {type: list, items: string}\n# cecil.yml\npages:\n  schema:\n    blog:\n      author: string # \"author\" is now optional, \"tags\" is kept\nWith cecil serve, a change in a schemas directory rebuilds the whole site with the schemas loaded again.\nTranslation of the descriptions\nThe label and description rules can be translated, for the tools that edit the front matter of a page in another language (e.g. a theme whose schemas are written in English, used by a site in French).\nThe text of a rule, as written in the schema, is the key of its translation in a schemas.&lt;locale&gt;.&lt;ext&gt; file (e.g. schemas.fr.yaml) of the translations directory of the site or of a theme: a separate domain from the messages of the templates.\n# themes\/links\/schemas\/index.yml\nblocks:\n  type: list\n  label: Blocks\n  description: Blocks of the page, rendered in order.\n# themes\/links\/translations\/schemas.fr.yaml\nBlocks: Blocs\n'Blocks of the page, rendered in order.': Blocs de la page, affichés dans l’ordre.\n\nAs for the templates, the schemas.&lt;language&gt;.&lt;ext&gt; file is also loaded for a locale with a region (schemas.fr.yaml for fr_FR).\nThe site overrides the themes, and a theme overrides the themes after it in the list.\nA text without translation is kept as written: there is no fallback on the default language.\nThe translations have no effect on the build: they are used by the tools, through the Cecil\\Config\\SchemaTranslator class.\n\nThe texts to translate are extracted by the util:translations:extract command, with the strings of the templates:\nphp cecil.phar util:translations:extract --locale=fr --save\npages.converter\nClass used to convert the front matter and the Markdown body of pages (Cecil\\Converter\\Converter by default).\npages:\n  converter: Cecil\\Converter\\Converter\nSee Markdown converter to use your own.\npages.body\nPage body options.\nTo know how these options impact your content see Content &gt; Markdown documentation.\npages.body.parser\nMarkdown parser class (Cecil\\Converter\\Parsedown by default). It must extend Cecil\\Converter\\Parsedown: see Markdown parser to add your own syntax.\npages:\n  body:\n    parser: Cecil\\Converter\\Parsedown\npages.body.toc\nHeaders used to build the table of contents ([h2, h3] by default).\npages:\n  body:\n    toc: [h2, h3]\npages.body.anchors\nHeadings with an anchor link ([h2, h3] by default): an empty &lt;a class=\"heading-anchor\" href=\"#&lt;id&gt;\"&gt; element is added at the end of each of these headings that have an ID, to be styled by templates (e.g.: a # displayed on hover).\npages:\n  body:\n    anchors: [h2, h3] # set to false to disable anchors\npages.body.highlight\nEnables code syntax highlighting (true by default).\npages:\n  body:\n    highlight: false # set to false to disable syntax highlighting\nThe highlighter engine can be changed with the engine option:\npages:\n  body:\n    highlight:\n      enabled: true    # `true` by default\n      engine: tempest  # `highlightjs` (default) or `tempest`\n\nhighlightjs: highlight.php, a PHP port of highlight.js (190+ languages, hljs-* CSS classes)\ntempest: tempest\/highlight, a fast server-side highlighter (web languages: PHP, HTML, CSS, JavaScript, JSON, YAML, Twig, SQL, XML, etc., hl-* CSS classes)\n\nThese options only apply to Markdown content: the highlight filter of templates uses the layouts.highlight.engine option.\npages.body.images\nImages handling options.\npages:\n  body:\n    images:\n      formats: []       # adds alternative image formats as `source` (e.g. `[avif, webp]`, empty array by default)\n      resize: 0         # resizes all images to &lt;width&gt; (in pixels, `0` to disable)\n      responsive: false # adds responsive image variants to the `srcset` attribute (`false` by default)\n      lazy: true        # adds `loading=\"lazy\"` attribute (`true` by default)\n      decoding: true    # adds `decoding=\"async\"` attribute (`true` by default)\n      caption: false    # puts the image in a &lt;figure&gt; element and adds a &lt;figcaption&gt; containing the title (`false` by default)\n      placeholder: ''   # fills the &lt;img&gt; background before loading ('color' or 'lqip', empty by default)\n      class: ''         # sets a default class on each image (empty by default)\n      dark_suffix: ~    # suffix of the dark variant image (e.g. `.dark`), disabled by default\n      mobile_suffix: ~  # suffix of the mobile variant image (e.g. `.mobile`), disabled by default\n      mobile_media_query: '(max-width: 767px)' # media query of the mobile variant `&lt;source&gt;`\n      remote:           # remote image handling (set to `false` to disable)\n        fallback:         # path to the fallback image, stored in assets dir (empty by default)\nSince version 8.41.0, the pages.body.images.resize option is used to resize images to a specific width, no more to enable the resize feature (enabled systematically).\nGlobal options, like responsive images widths and sizes, are configurable in the assets.images section.\nRemote images are downloaded and converted into Assets to be manipulated. You can disable this behavior by setting the option pages.body.images.remote.enabled to false.\nWhen dark_suffix is set (e.g. dark_suffix: .dark), Cecil automatically looks for a dark variant of each image (e.g. photo.dark.jpg alongside photo.jpg). If found, the image is wrapped in a &lt;picture&gt; element with a &lt;source media=\"(prefers-color-scheme: dark)\"&gt; for automatic light\/dark theme switching. Works in combination with formats and responsive.\nIn the same way, when mobile_suffix is set (e.g. mobile_suffix: .mobile), Cecil looks for a mobile variant of each image (e.g. photo.mobile.jpg alongside photo.jpg) and adds a &lt;source&gt; element with the mobile_media_query media query ((max-width: 767px) by default). If dark_suffix is also set, the dark variant of the mobile image (e.g. photo.mobile.dark.jpg) is used on mobile with dark color scheme. Mobile sources are placed before dark sources, so that a mobile variant takes precedence.\npages.body.links\nLinks handling options.\npages:\n  body:\n    links:\n      embed:\n        enabled: false     # turns links into embedded content if possible (`false` by default)\n        video: [mp4, webm] # video files extensions\n        audio: [mp3, ogg, wav] # audio files extensions\n      external:\n        blank: false     # if true open external link in new tab\n        noopener: true   # if true add \"noopener\" to `rel` attribute\n        noreferrer: true # if true add \"noreferrer\" to `rel` attribute\n        nofollow: false  # if true add \"nofollow\" to `rel` attribute\npages.body.excerpt\nExcerpt handling options.\npages:\n  body:\n    excerpt:\n      separator: excerpt|break # string to use as separator (`excerpt|break` by default)\n      capture: before          # part to capture, `before` or `after` the separator (`before` by default)\npages.default\nDefault pages are pages without content file (front matter only), indexed by ID, each one with a path and some front matter variables.\nCecil provides built-in default pages (from built-in templates):\npages:\n  default:\n    index:\n      path: ''\n      title: Home\n      published: true\n    404:\n      path: 404\n      title: Page not found\n      layout: 404\n      uglyurl: true\n      published: true\n      excluded: true\n    robots:\n      path: robots\n      title: Robots.txt\n      layout: robots\n      output: txt\n      published: true\n      excluded: true\n      multilingual: false\n    sitemap:\n      path: sitemap\n      title: XML sitemap\n      layout: sitemap\n      output: xml\n      changefreq: monthly\n      priority: 0.5\n      published: true\n      excluded: true\n      multilingual: false\n    xsl\/sitemap:\n      path: xsl\/sitemap\n      layout: sitemap\n      output: xsl\n      uglyurl: true\n      published: true\n      excluded: true\n    xsl\/atom:\n      path: xsl\/atom\n      layout: feed\n      output: xsl\n      uglyurl: true\n      published: true\n      excluded: true\n    xsl\/rss:\n      path: xsl\/rss\n      layout: feed\n      output: xsl\n      uglyurl: true\n      published: false\n      excluded: true\nEach one can be:\n\ndisabled: published: false\nexcluded from list pages: excluded: true\nexcluded from localization: multilingual: false\n\nYou can also add your own pages (a theme can do the same in its config.yml):\npages:\n  default:\n    code:\n      path: code\n      redirect: https:\/\/github.com\/ArnaudLigny\nLike any other page, a default page is listed (e.g.: in site.pages.showable, in the sitemap, on the homepage): set excluded: true to keep a technical page (JSON index, manifest, etc.) out of lists.\nSince version 9.19.0, pages.virtual is removed: move its pages to pages.default, indexed by ID (e.g.: the page path). Pages without content file are no longer excluded from lists by default.\nSince version 8.68.0, you can override the default robots.txt page by creating a page with the same path:\npages\/robots.md\n---\nlayout: robots\noutput: txt\n---\nUser-agent: AI-bot\nDisallow: \/\npages.generators\nGenerators are used by Cecil to create additional pages (e.g.: sitemap, feed, pagination, etc.) from existing pages, or from other sources like the configuration file or external sources.\nGenerators are indexed by name and run in ascending order of their priority. Below is the list of generators provided by Cecil:\npages:\n  generators:\n    DefaultPages: { class: Cecil\\Generator\\DefaultPages, priority: 10 }\n    ExternalBody: { class: Cecil\\Generator\\ExternalBody, priority: 30 }\n    Section:      { class: Cecil\\Generator\\Section, priority: 40 }\n    Taxonomy:     { class: Cecil\\Generator\\Taxonomy, priority: 50 }\n    Homepage:     { class: Cecil\\Generator\\Homepage, priority: 60 }\n    Pagination:   { class: Cecil\\Generator\\Pagination, priority: 70 }\n    Alias:        { class: Cecil\\Generator\\Alias, priority: 80 }\n    Redirect:     { class: Cecil\\Generator\\Redirect, priority: 90 }\nA built-in generator can be disabled or moved by its name:\npages:\n  generators:\n    Redirect: false            # disabled\n    Section: { priority: 45 }  # moved\nSee Extensions for the full syntax.\nYou can extend Cecil with Pages generator.\npages.subsets\nSubsets are used to render a part of the pages collection, based on a specific path, language or output format, with the command:\ncecil build --render-subset=&lt;name&gt;\npages:\n  subsets:\n    &lt;name&gt;:\n      path: &lt;path&gt; # glob or string path (e.g.: `blog\/*`, `blog`)\n      language: &lt;language&gt; # language code (e.g.: `en`, `fr`)\n      output: &lt;output&gt; # output format (e.g.: `html`, `atom`)\nExample:\npages:\n  subsets:\n    blog_en:\n      path: blog\n      language: en\n      output: html\n    search_index:\n      path: '*'\n      output: json\n",
      "content_html": "<h1>Pages</h1>\n<p>These options control how pages are loaded, sorted, paginated, routed and generated.</p>\n<h2 id=\"pages-dir\">pages.dir<a class=\"heading-anchor\" href=\"#pages-dir\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Source directory of pages (<code translate=\"no\">pages</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">dir:</span> <span class=\"hljs-string\">pages</span></code></pre>\n<h2 id=\"pages-ext\">pages.ext<a class=\"heading-anchor\" href=\"#pages-ext\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Extensions of pages files.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">ext:</span> <span class=\"hljs-string\">[md,</span> <span class=\"hljs-string\">markdown,</span> <span class=\"hljs-string\">mdown,</span> <span class=\"hljs-string\">mkdn,</span> <span class=\"hljs-string\">mkd,</span> <span class=\"hljs-string\">text,</span> <span class=\"hljs-string\">txt]</span></code></pre>\n<h2 id=\"pages-exclude\">pages.exclude<a class=\"heading-anchor\" href=\"#pages-exclude\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Directories, paths and files name to exclude (accepts globs, strings and regexes).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">exclude:</span> <span class=\"hljs-string\">['vendor',</span> <span class=\"hljs-string\">'node_modules'</span><span class=\"hljs-string\">,</span> <span class=\"hljs-string\">'*.scss'</span><span class=\"hljs-string\">,</span> <span class=\"hljs-string\">'/\\.bck$/'</span><span class=\"hljs-string\">]</span></code></pre>\n<h2 id=\"pages-prefix-separator\">pages.prefix.separator<a class=\"heading-anchor\" href=\"#pages-prefix-separator\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>List of characters used as separator between a filename prefix (<code translate=\"no\">date</code> or <code translate=\"no\">weight</code>) and the slug.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">prefix:</span>\n    <span class=\"hljs-attr\">separator:</span> <span class=\"hljs-string\">['-',</span> <span class=\"hljs-string\">'_'</span><span class=\"hljs-string\">]</span></code></pre>\n<h2 id=\"pages-sortby\">pages.sortby<a class=\"heading-anchor\" href=\"#pages-sortby\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Default collections sort method.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">sortby:</span> <span class=\"hljs-string\">date</span> <span class=\"hljs-comment\"># `date`, `updated`, `title` or `weight`</span>\n  <span class=\"hljs-comment\"># or</span>\n  <span class=\"hljs-attr\">sortby:</span>\n    <span class=\"hljs-attr\">variable:</span> <span class=\"hljs-string\">date</span>    <span class=\"hljs-comment\"># `date`, `updated`, `title` or `weight`</span>\n    <span class=\"hljs-attr\">desc_title:</span> <span class=\"hljs-literal\">false</span> <span class=\"hljs-comment\"># sort by title in descending order</span>\n    <span class=\"hljs-attr\">reverse:</span> <span class=\"hljs-literal\">false</span>    <span class=\"hljs-comment\"># reverse the sort order</span></code></pre>\n<h2 id=\"pages-pagination\">pages.pagination<a class=\"heading-anchor\" href=\"#pages-pagination\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Pagination is available for list pages (<em>type</em> is <code translate=\"no\">homepage</code>, <code translate=\"no\">section</code> or <code translate=\"no\">term</code>).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">pagination:</span>\n    <span class=\"hljs-attr\">max:</span> <span class=\"hljs-number\">5</span>     <span class=\"hljs-comment\"># maximum number of entries per page</span>\n    <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">page</span> <span class=\"hljs-comment\"># path to the paginated page</span></code></pre>\n<h3 id=\"disable-pagination\">Disable pagination<a class=\"heading-anchor\" href=\"#disable-pagination\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Pagination can be disabled:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">pagination:</span> <span class=\"hljs-literal\">false</span></code></pre>\n<p>Or:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">pagination:</span>\n    <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">false</span></code></pre>\n<aside class=\"note note-tip\"><p>When pagination is disabled globally, a list page can still enable it in its <a href=\"../content/1-pages.md#pagination\">front matter</a> with <code translate=\"no\">pagination.enabled: true</code>.</p></aside>\n<h2 id=\"pages-paths\">pages.paths<a class=\"heading-anchor\" href=\"#pages-paths\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Apply a custom <a href=\"../content/2-front-matter.md#predefined-variables\"><code translate=\"no\">path</code></a> for all pages of a <strong><em>Section</em></strong>.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">paths:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">section:</span> <span class=\"hljs-string\">&lt;section’s</span> <span class=\"hljs-string\">ID&gt;</span>\n      <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">&lt;path</span> <span class=\"hljs-string\">of</span> <span class=\"hljs-string\">pages&gt;</span></code></pre>\n<h3 id=\"path-placeholders\">Path placeholders<a class=\"heading-anchor\" href=\"#path-placeholders\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<ul>\n<li><code translate=\"no\">:year</code></li>\n<li><code translate=\"no\">:month</code></li>\n<li><code translate=\"no\">:day</code></li>\n<li><code translate=\"no\">:section</code></li>\n<li><code translate=\"no\">:slug</code></li>\n</ul>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">paths:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">section:</span> <span class=\"hljs-string\">Blog</span>\n      <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">:section/:year/:month/:day/:slug</span> <span class=\"hljs-comment\"># e.g.: /blog/2020/12/01/my-post/</span>\n<span class=\"hljs-comment\"># localized</span>\n<span class=\"hljs-attr\">languages:</span>\n  <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">code:</span> <span class=\"hljs-string\">fr</span>\n    <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">Français</span>\n    <span class=\"hljs-attr\">locale:</span> <span class=\"hljs-string\">fr_FR</span>\n    <span class=\"hljs-attr\">config:</span>\n      <span class=\"hljs-attr\">pages:</span>\n        <span class=\"hljs-attr\">paths:</span>\n          <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">section:</span> <span class=\"hljs-string\">Blog</span>\n            <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">blogue/:year/:month/:day/:slug</span> <span class=\"hljs-comment\"># e.g.: /blogue/2020/12/01/mon-billet/</span></code></pre>\n<h2 id=\"pages-frontmatter\">pages.frontmatter<a class=\"heading-anchor\" href=\"#pages-frontmatter\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Page front matter format (<code translate=\"no\">yaml</code> by default, also accepts <code translate=\"no\">ini</code>, <code translate=\"no\">toml</code> and <code translate=\"no\">json</code>).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">frontmatter:</span> <span class=\"hljs-string\">yaml</span></code></pre>\n<h2 id=\"pages-validation\">pages.validation<a class=\"heading-anchor\" href=\"#pages-validation\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Behavior when the front matter of a page does not match its <a href=\"#pages-schema\">schema</a>:</p>\n<ul>\n<li><code translate=\"no\">warning</code>: logs a warning and keeps the page;</li>\n<li><code translate=\"no\">error</code> (default): logs an error and skips the page;</li>\n<li><code translate=\"no\">strict</code>: the build fails;</li>\n<li><code translate=\"no\">false</code>: disables the validation.</li>\n</ul>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">validation:</span> <span class=\"hljs-string\">error</span></code></pre>\n<aside class=\"note note-info\"><p>The <a href=\"../content/2-front-matter.md#predefined-variables\">predefined variables</a> (<code translate=\"no\">date</code>, <code translate=\"no\">menu</code>, <code translate=\"no\">schedule</code>, <code translate=\"no\">output</code>, etc.) are always checked against a built-in schema, even without <code translate=\"no\">pages.schema</code>.</p></aside>\n<h2 id=\"pages-schema\">pages.schema<a class=\"heading-anchor\" href=\"#pages-schema\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Schemas of the front matter, by <em>Section</em> or by <a href=\"#schema-of-a-page\">page</a> (<code translate=\"no\">*</code> applies to all pages).</p>\n<p>Schemas can also be written in the <a href=\"#schemas-directory\"><code translate=\"no\">schemas</code> directory</a>, one file by <em>Section</em> or by page.</p>\n<p>Each variable is defined by its type, or by a map of rules:</p>\n<table>\n<thead>\n<tr>\n<th>Rule</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">type</code></td>\n<td><code translate=\"no\">string</code>, <code translate=\"no\">int</code>, <code translate=\"no\">number</code>, <code translate=\"no\">bool</code>, <code translate=\"no\">date</code>, <code translate=\"no\">list</code>, <code translate=\"no\">map</code>, <code translate=\"no\">scalar</code> or <code translate=\"no\">mixed</code> (default).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">required</code></td>\n<td>The variable must be defined (<code translate=\"no\">false</code> by default).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">enum</code></td>\n<td>List of allowed values.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">pattern</code></td>\n<td>Regular expression that the value must match (<code translate=\"no\">string</code> and <code translate=\"no\">scalar</code>).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">min</code></td>\n<td>Minimum value (<code translate=\"no\">int</code>, <code translate=\"no\">number</code>), length (<code translate=\"no\">string</code>) or count of items (<code translate=\"no\">list</code>, <code translate=\"no\">map</code>).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">max</code></td>\n<td>Maximum value (<code translate=\"no\">int</code>, <code translate=\"no\">number</code>), length (<code translate=\"no\">string</code>) or count of items (<code translate=\"no\">list</code>, <code translate=\"no\">map</code>).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">items</code></td>\n<td>Type or definition of the items of a <code translate=\"no\">list</code> (see <a href=\"#lists-and-maps\">lists and maps</a>).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">fields</code></td>\n<td>Definitions of the variables of a <code translate=\"no\">map</code> (see <a href=\"#lists-and-maps\">lists and maps</a>).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">default</code></td>\n<td>Value applied when the variable is not defined.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">when</code></td>\n<td>Condition on the values of other variables of the same map (see <a href=\"#conditional-variables\">conditional variables</a>).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">format</code></td>\n<td>What a <code translate=\"no\">string</code> holds: <code translate=\"no\">text</code>, <code translate=\"no\">markdown</code>, <code translate=\"no\">url</code>, <code translate=\"no\">email</code> or <code translate=\"no\">path</code> (see <a href=\"#description-of-the-variables\">description of the variables</a>).</td>\n</tr>\n<tr>\n<td><code translate=\"no\">label</code></td>\n<td>Name of the variable, for the tools that edit the front matter.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">description</code></td>\n<td>Help text of the variable, for the tools that edit the front matter.</td>\n</tr>\n</tbody>\n</table>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">schema:</span>\n    <span class=\"hljs-string\">'*'</span><span class=\"hljs-string\">:</span>\n      <span class=\"hljs-attr\">title:</span>\n        <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">string</span>\n        <span class=\"hljs-attr\">required:</span> <span class=\"hljs-literal\">true</span>\n    <span class=\"hljs-attr\">blog:</span>\n      <span class=\"hljs-attr\">author:</span> <span class=\"hljs-string\">string</span> <span class=\"hljs-comment\"># type shorthand</span>\n      <span class=\"hljs-attr\">rating:</span>\n        <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">int</span>\n        <span class=\"hljs-attr\">min:</span> <span class=\"hljs-number\">1</span>\n        <span class=\"hljs-attr\">max:</span> <span class=\"hljs-number\">5</span>\n      <span class=\"hljs-attr\">category:</span>\n        <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">string</span>\n        <span class=\"hljs-attr\">enum:</span> <span class=\"hljs-string\">[news,</span> <span class=\"hljs-string\">tutorial]</span>\n        <span class=\"hljs-attr\">default:</span> <span class=\"hljs-string\">news</span>\n      <span class=\"hljs-attr\">tags:</span>\n        <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">list</span>\n        <span class=\"hljs-attr\">items:</span> <span class=\"hljs-string\">string</span>\n        <span class=\"hljs-attr\">max:</span> <span class=\"hljs-number\">5</span></code></pre>\n<p>The length of a string (<code translate=\"no\">min</code> and <code translate=\"no\">max</code> rules) is counted in characters, not in bytes.</p>\n<aside class=\"note note-info\"><p>Schemas are open: variables that are not declared are allowed. Variables of a section override variables of <code translate=\"no\">*</code>, and variables of a page override both. An optional variable can be empty (<code translate=\"no\">null</code>).</p></aside>\n<h3 id=\"lists-and-maps\">Lists and maps<a class=\"heading-anchor\" href=\"#lists-and-maps\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>The structure of a <code translate=\"no\">map</code> and of the items of a <code translate=\"no\">list</code> can be validated, at any depth:</p>\n<ul>\n<li><code translate=\"no\">fields</code>: definitions of the variables of a <code translate=\"no\">map</code>, with the same syntax as the variables of a page (type shorthand or map of rules, including <code translate=\"no\">fields</code> and <code translate=\"no\">items</code>). As a page, a map is open: undeclared variables are allowed.</li>\n<li><code translate=\"no\">items</code>: the type of the items (<code translate=\"no\">items: string</code>), or the definition of the items (<code translate=\"no\">items: {type: map, fields: …}</code>).</li>\n</ul>\n<p>Scope of the rules:</p>\n<ul>\n<li>With a type of items (<code translate=\"no\">items: string</code>), the <code translate=\"no\">enum</code> and <code translate=\"no\">pattern</code> rules of the list apply to its items.</li>\n<li>With a definition of items, only the rules of this definition apply to the items (<code translate=\"no\">min</code> and <code translate=\"no\">max</code> of the definition apply to each item: length of a string, value of a number, etc.). An item can't be empty (<code translate=\"no\">null</code>), except with <code translate=\"no\">items: mixed</code>, and the <code translate=\"no\">required</code> and <code translate=\"no\">default</code> rules don't apply to items.</li>\n<li>The <code translate=\"no\">min</code> and <code translate=\"no\">max</code> rules of a list apply to its count of items.</li>\n<li>A <code translate=\"no\">map</code> with <code translate=\"no\">fields</code> doesn't accept the <code translate=\"no\">min</code>, <code translate=\"no\">max</code>, <code translate=\"no\">enum</code> and <code translate=\"no\">pattern</code> rules (without <code translate=\"no\">fields</code>, <code translate=\"no\">min</code> and <code translate=\"no\">max</code> apply to its count of variables).</li>\n<li>A <code translate=\"no\">default</code> value of a variable of a map is applied when the map is defined but the variable is not (a missing map is not created), including in each item of a list.</li>\n</ul>\n<p>Example: each image of an illustration must have a file name and an alternative text of 20 characters at least.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">schema:</span>\n    <span class=\"hljs-attr\">illustrations:</span>\n      <span class=\"hljs-attr\">description:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">string,</span> <span class=\"hljs-attr\">required:</span> <span class=\"hljs-literal\">true</span><span class=\"hljs-string\">}</span>\n      <span class=\"hljs-attr\">images:</span>\n        <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">list</span>\n        <span class=\"hljs-attr\">min:</span> <span class=\"hljs-number\">1</span>\n        <span class=\"hljs-attr\">items:</span>\n          <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">map</span>\n          <span class=\"hljs-attr\">fields:</span>\n            <span class=\"hljs-attr\">file:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">string,</span> <span class=\"hljs-attr\">required:</span> <span class=\"hljs-literal\">true</span><span class=\"hljs-string\">,</span> <span class=\"hljs-attr\">pattern:</span> <span class=\"hljs-string\">'^[\\w-]+\\.(png|jpe?g|gif|webp)$'</span><span class=\"hljs-string\">}</span>\n            <span class=\"hljs-attr\">alt:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">string,</span> <span class=\"hljs-attr\">required:</span> <span class=\"hljs-literal\">true</span><span class=\"hljs-string\">,</span> <span class=\"hljs-attr\">min:</span> <span class=\"hljs-number\">20</span><span class=\"hljs-string\">}</span></code></pre>\n<p>An error gives the path of the invalid variable, from <code translate=\"no\">0</code> for the first item of a list: <code translate=\"no\">The mandatory variable 'images › 1 › alt' is missing.</code> (alternative text of the second image).</p>\n<h3 id=\"conditional-variables\">Conditional variables<a class=\"heading-anchor\" href=\"#conditional-variables\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>The <code translate=\"no\">when</code> rule allows a variable only when other variables of the same map (or of the page) have the given values:</p>\n<ul>\n<li><code translate=\"no\">when: {type: links}</code>: the variable is allowed only if <code translate=\"no\">type</code> is <code translate=\"no\">links</code>;</li>\n<li><code translate=\"no\">when: {type: [links, gallery]}</code>: only if <code translate=\"no\">type</code> is <code translate=\"no\">links</code> or <code translate=\"no\">gallery</code>;</li>\n<li><code translate=\"no\">when: {type: links, featured: true}</code>: only if both conditions are met.</li>\n</ul>\n<p>Behavior:</p>\n<ul>\n<li>If the variable is set (not <code translate=\"no\">null</code>, an empty list or string is set) while the condition is not met, the validation fails: <code translate=\"no\">The variable 'blocks › 2 › items' is allowed only when `type` is `links`.</code></li>\n<li>The <code translate=\"no\">required</code> rule applies only when the condition is met, and the <code translate=\"no\">default</code> value is applied only when the condition is met.</li>\n<li>The condition only looks at the other variables of the same map (or at the variables of the page, for a variable of the page), as defined in the front matter: a missing or empty (<code translate=\"no\">null</code>) variable doesn't meet it, and the <code translate=\"no\">default</code> values of the other variables are not taken into account. Values are compared strictly (<code translate=\"no\">1</code> is not <code translate=\"no\">'1'</code>), except booleans strings (<code translate=\"no\">yes</code>, <code translate=\"no\">no</code>, <code translate=\"no\">true</code>, <code translate=\"no\">false</code>, <code translate=\"no\">on</code>, <code translate=\"no\">off</code>), which are booleans.</li>\n<li>The <code translate=\"no\">when</code> rule is not allowed on the definition of the items of a list (<code translate=\"no\">items: {…}</code>): it applies to the variables of a map.</li>\n<li>The conditions of a map are checked once its variables are valid: a condition error can show up after the other errors of the map are fixed.</li>\n</ul>\n<p>Example: blocks of the home page, each one rendered by its own template; only the <code translate=\"no\">links</code> blocks accept <code translate=\"no\">items</code> and <code translate=\"no\">options</code>.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">schema:</span>\n    <span class=\"hljs-attr\">index:</span>\n      <span class=\"hljs-attr\">blocks:</span>\n        <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">list</span>\n        <span class=\"hljs-attr\">items:</span>\n          <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">map</span>\n          <span class=\"hljs-attr\">fields:</span>\n            <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">string,</span> <span class=\"hljs-attr\">required:</span> <span class=\"hljs-literal\">true</span><span class=\"hljs-string\">,</span> <span class=\"hljs-attr\">enum:</span> <span class=\"hljs-string\">[content,</span> <span class=\"hljs-string\">links,</span> <span class=\"hljs-string\">social]}</span>\n            <span class=\"hljs-attr\">items:</span>\n              <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">list</span>\n              <span class=\"hljs-attr\">when:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">links}</span>\n              <span class=\"hljs-attr\">required:</span> <span class=\"hljs-literal\">true</span> <span class=\"hljs-comment\"># required for the `links` blocks only</span>\n              <span class=\"hljs-attr\">items:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">map,</span> <span class=\"hljs-attr\">fields:</span> <span class=\"hljs-string\">{title:</span> <span class=\"hljs-string\">string,</span> <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">string,</span> <span class=\"hljs-attr\">format:</span> <span class=\"hljs-string\">url}}}</span>\n            <span class=\"hljs-attr\">options:</span>\n              <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">map</span>\n              <span class=\"hljs-attr\">when:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">links}</span>\n              <span class=\"hljs-attr\">fields:</span> <span class=\"hljs-string\">{columns:</span> <span class=\"hljs-string\">int}</span></code></pre>\n<p>Tools that edit the front matter can use the <code translate=\"no\">when</code> rule to show only the relevant variables.</p>\n<h3 id=\"schema-of-a-page\">Schema of a page<a class=\"heading-anchor\" href=\"#schema-of-a-page\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>A key of <code translate=\"no\">pages.schema</code> can also be a page, for the pages that have their own variables (a home page, a résumé, etc.). The key is the ID of the page, without its language: the path of its file in the pages directory, without prefix, language and extension.</p>\n<table>\n<thead>\n<tr>\n<th>File</th>\n<th>Key</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">index.md</code></td>\n<td><code translate=\"no\">index</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">cv.md</code>, <code translate=\"no\">cv.en.md</code></td>\n<td><code translate=\"no\">cv</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">1-My project.md</code></td>\n<td><code translate=\"no\">my-project</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">blog/2024-05-01_post.md</code></td>\n<td><code translate=\"no\">blog/post</code></td>\n</tr>\n<tr>\n<td><code translate=\"no\">blog/index.md</code></td>\n<td><code translate=\"no\">blog/index</code></td>\n</tr>\n</tbody>\n</table>\n<p>The variables are those of <code translate=\"no\">*</code>, then of the section of the page, then of the page: the last ones override the others.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">schema:</span>\n    <span class=\"hljs-attr\">blog:</span>        <span class=\"hljs-comment\"># pages of the \"blog\" section</span>\n      <span class=\"hljs-attr\">author:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">string,</span> <span class=\"hljs-attr\">required:</span> <span class=\"hljs-literal\">true</span><span class=\"hljs-string\">}</span>\n    <span class=\"hljs-attr\">blog/index:</span>  <span class=\"hljs-comment\"># index of the \"blog\" section</span>\n      <span class=\"hljs-attr\">intro:</span> <span class=\"hljs-string\">string</span>\n    <span class=\"hljs-attr\">cv:</span>          <span class=\"hljs-comment\"># \"cv.md\" page, and its translations</span>\n      <span class=\"hljs-attr\">skills:</span>\n        <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">list</span>\n        <span class=\"hljs-attr\">items:</span>\n          <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">map</span>\n          <span class=\"hljs-attr\">fields:</span>\n            <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">string,</span> <span class=\"hljs-attr\">required:</span> <span class=\"hljs-literal\">true</span><span class=\"hljs-string\">}</span>\n            <span class=\"hljs-attr\">level:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">int,</span> <span class=\"hljs-attr\">min:</span> <span class=\"hljs-number\">0</span><span class=\"hljs-string\">,</span> <span class=\"hljs-attr\">max:</span> <span class=\"hljs-number\">100</span><span class=\"hljs-string\">}</span></code></pre>\n<aside class=\"note note-info\"><p>The schema of a section applies to its pages, not to its index (<code translate=\"no\">blog/index.md</code>), which has its own key (<code translate=\"no\">blog/index</code>).</p></aside>\n<h3 id=\"description-of-the-variables\">Description of the variables<a class=\"heading-anchor\" href=\"#description-of-the-variables\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>The <code translate=\"no\">format</code>, <code translate=\"no\">label</code> and <code translate=\"no\">description</code> rules describe a variable to the tools that edit the front matter (e.g. <a href=\"https://desktop.cecil.app\" target=\"_blank\" rel=\"noopener noreferrer\">Cecil Desktop</a> builds its form from the schema). They are accepted on any variable, also in <code translate=\"no\">fields</code> and <code translate=\"no\">items</code>.</p>\n<p><code translate=\"no\">format</code> tells what a <code translate=\"no\">string</code> holds:</p>\n<table>\n<thead>\n<tr>\n<th>Format</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">text</code></td>\n<td>Text of several lines.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">markdown</code></td>\n<td>Text of several lines, rendered as Markdown by the template.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">url</code></td>\n<td>Absolute URL (<code translate=\"no\">https://cecil.app</code>): validated.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">email</code></td>\n<td>Email address: validated.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">path</code></td>\n<td>Path of a file of the site (asset or static file): not checked.</td>\n</tr>\n</tbody>\n</table>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">schema:</span>\n    <span class=\"hljs-attr\">cv:</span>\n      <span class=\"hljs-attr\">intro:</span>\n        <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">string</span>\n        <span class=\"hljs-attr\">format:</span> <span class=\"hljs-string\">markdown</span>\n        <span class=\"hljs-attr\">label:</span> <span class=\"hljs-string\">Introduction</span>\n        <span class=\"hljs-attr\">description:</span> <span class=\"hljs-string\">Shown</span> <span class=\"hljs-string\">under</span> <span class=\"hljs-string\">the</span> <span class=\"hljs-string\">title</span> <span class=\"hljs-string\">of</span> <span class=\"hljs-string\">the</span> <span class=\"hljs-string\">page.</span>\n      <span class=\"hljs-attr\">website:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">string,</span> <span class=\"hljs-attr\">format:</span> <span class=\"hljs-string\">url}</span>\n      <span class=\"hljs-attr\">photo:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">string,</span> <span class=\"hljs-attr\">format:</span> <span class=\"hljs-string\">path,</span> <span class=\"hljs-attr\">label:</span> <span class=\"hljs-string\">Photo}</span></code></pre>\n<p><code translate=\"no\">label</code> and <code translate=\"no\">description</code> have no effect on the validation, and neither have the <code translate=\"no\">text</code>, <code translate=\"no\">markdown</code> and <code translate=\"no\">path</code> formats.</p>\n<h3 id=\"schemas-directory\">Schemas directory<a class=\"heading-anchor\" href=\"#schemas-directory\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Instead of writing them in the configuration, schemas can be written in the <code translate=\"no\">schemas</code> directory, at the root of the site: one YAML file (<code translate=\"no\">.yml</code> or <code translate=\"no\">.yaml</code>) by key of <code translate=\"no\">pages.schema</code>, loaded automatically.</p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">&lt;mywebsite&gt;\n├─ pages\n└─ schemas\n   ├─ _all.yml        &lt;- '*': all pages\n   ├─ blog.yml        &lt;- \"blog\" section\n   ├─ cv.yml          &lt;- \"cv.md\" page\n   ├─ index.yml       &lt;- home page\n   └─ blog\n      └─ index.yml    &lt;- \"blog/index.md\" page (key \"blog/index\")</code></pre>\n<ul>\n<li>The path of a file in the directory, without its extension, is the key of the schema: a <em>Section</em>, or a <a href=\"#schema-of-a-page\">page</a> (<code translate=\"no\">schemas/blog/post-1.yml</code> is the schema of the <code translate=\"no\">blog/post-1</code> page).</li>\n<li>The schema of all pages (<code translate=\"no\">*</code>) is the <code translate=\"no\">_all.yml</code> file.</li>\n<li>A key can't have two files (<code translate=\"no\">blog.yml</code> and <code translate=\"no\">blog.yaml</code>): this is an error.</li>\n<li>A file holds the variables directly, as under <code translate=\"no\">pages.schema.&lt;key&gt;</code>, and an empty file is an empty schema.</li>\n</ul>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-comment\"># schemas/cv.yml</span>\n<span class=\"hljs-attr\">sections:</span>\n  <span class=\"hljs-attr\">label:</span> <span class=\"hljs-string\">Sections</span>\n  <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">list</span>\n  <span class=\"hljs-attr\">items:</span>\n    <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">map</span>\n    <span class=\"hljs-attr\">fields:</span>\n      <span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">string,</span> <span class=\"hljs-attr\">required:</span> <span class=\"hljs-literal\">true</span><span class=\"hljs-string\">}</span>\n      <span class=\"hljs-attr\">text:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">string,</span> <span class=\"hljs-attr\">format:</span> <span class=\"hljs-string\">markdown}</span></code></pre>\n<p>is the same as:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">schema:</span>\n    <span class=\"hljs-attr\">cv:</span>\n      <span class=\"hljs-attr\">sections:</span>\n        <span class=\"hljs-comment\"># …</span></code></pre>\n<p>Each file is validated when the configuration is loaded: an error gives the name of the file and the path of the invalid variable in it (e.g. <code translate=\"no\">Invalid schema file \"schemas/cv.yml\"</code>). As in <code translate=\"no\">pages.schema</code>, a file whose key matches no <em>Section</em> and no page is ignored.</p>\n<p>A <a href=\"../templates/7-extend.md#theme\">theme</a> can also have a <code translate=\"no\">schemas</code> directory, for the variables its templates expect. Schemas are merged from the lowest to the highest priority:</p>\n<ol>\n<li><code translate=\"no\">schemas</code> directories of the themes (a theme overrides the themes after it in the list);</li>\n<li><code translate=\"no\">pages.schema</code> of the <code translate=\"no\">config.yml</code> of the themes (a theme overrides the themes after it in the list);</li>\n<li><code translate=\"no\">schemas</code> directory of the site;</li>\n<li><code translate=\"no\">pages.schema</code> of the configuration of the site.</li>\n</ol>\n<p>For a same key, variables are merged one by one, at each level and between themes: the definition of a variable replaces its previous definition as a whole (its rules are not merged, and <code translate=\"no\">enum</code> lists are not combined), the other variables are kept.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-comment\"># schemas/blog.yml</span>\n<span class=\"hljs-attr\">author:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">string,</span> <span class=\"hljs-attr\">required:</span> <span class=\"hljs-literal\">true</span><span class=\"hljs-string\">}</span>\n<span class=\"hljs-attr\">tags:</span> <span class=\"hljs-string\">{type:</span> <span class=\"hljs-string\">list,</span> <span class=\"hljs-attr\">items:</span> <span class=\"hljs-string\">string}</span></code></pre>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-comment\"># cecil.yml</span>\n<span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">schema:</span>\n    <span class=\"hljs-attr\">blog:</span>\n      <span class=\"hljs-attr\">author:</span> <span class=\"hljs-string\">string</span> <span class=\"hljs-comment\"># \"author\" is now optional, \"tags\" is kept</span></code></pre>\n<aside class=\"note note-info\"><p>With <code translate=\"no\">cecil serve</code>, a change in a <code translate=\"no\">schemas</code> directory rebuilds the whole site with the schemas loaded again.</p></aside>\n<h3 id=\"translation-of-the-descriptions\">Translation of the descriptions<a class=\"heading-anchor\" href=\"#translation-of-the-descriptions\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>The <code translate=\"no\">label</code> and <code translate=\"no\">description</code> rules can be translated, for the tools that edit the front matter of a page in another language (e.g. a theme whose schemas are written in English, used by a site in French).</p>\n<p>The text of a rule, as written in the schema, is the key of its translation in a <code translate=\"no\">schemas.&lt;locale&gt;.&lt;ext&gt;</code> file (e.g. <code translate=\"no\">schemas.fr.yaml</code>) of the <a href=\"7-layouts.md#layouts-translations\"><code translate=\"no\">translations</code></a> directory of the site or of a theme: a separate domain from the <code translate=\"no\">messages</code> of the templates.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-comment\"># themes/links/schemas/index.yml</span>\n<span class=\"hljs-attr\">blocks:</span>\n  <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">list</span>\n  <span class=\"hljs-attr\">label:</span> <span class=\"hljs-string\">Blocks</span>\n  <span class=\"hljs-attr\">description:</span> <span class=\"hljs-string\">Blocks</span> <span class=\"hljs-string\">of</span> <span class=\"hljs-string\">the</span> <span class=\"hljs-string\">page,</span> <span class=\"hljs-string\">rendered</span> <span class=\"hljs-string\">in</span> <span class=\"hljs-string\">order.</span></code></pre>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-comment\"># themes/links/translations/schemas.fr.yaml</span>\n<span class=\"hljs-attr\">Blocks:</span> <span class=\"hljs-string\">Blocs</span>\n<span class=\"hljs-string\">'Blocks of the page, rendered in order.'</span><span class=\"hljs-string\">:</span> <span class=\"hljs-string\">Blocs</span> <span class=\"hljs-string\">de</span> <span class=\"hljs-string\">la</span> <span class=\"hljs-string\">page,</span> <span class=\"hljs-string\">affichés</span> <span class=\"hljs-string\">dans</span> <span class=\"hljs-string\">l’ordre.</span></code></pre>\n<ul>\n<li>As for the templates, the <code translate=\"no\">schemas.&lt;language&gt;.&lt;ext&gt;</code> file is also loaded for a locale with a region (<code translate=\"no\">schemas.fr.yaml</code> for <code translate=\"no\">fr_FR</code>).</li>\n<li>The site overrides the themes, and a theme overrides the themes after it in the list.</li>\n<li>A text without translation is kept as written: there is no fallback on the default language.</li>\n<li>The translations have no effect on the build: they are used by the tools, through the <code translate=\"no\">Cecil\\Config\\SchemaTranslator</code> class.</li>\n</ul>\n<p>The texts to translate are extracted by the <a href=\"../commands/index.md\"><code translate=\"no\">util:translations:extract</code></a> command, with the strings of the templates:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar util:translations:extract --locale=fr --save</code></pre>\n<h2 id=\"pages-converter\">pages.converter<a class=\"heading-anchor\" href=\"#pages-converter\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Class used to convert the front matter and the Markdown body of pages (<code translate=\"no\">Cecil\\Converter\\Converter</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">converter:</span> <span class=\"hljs-string\">Cecil\\Converter\\Converter</span></code></pre>\n<p>See <a href=\"../developers/1-extend.md#markdown-converter\">Markdown converter</a> to use your own.</p>\n<h2 id=\"pages-body\">pages.body<a class=\"heading-anchor\" href=\"#pages-body\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Page body options.</p>\n<aside class=\"note note-info\"><p>To know how these options impact your content see <em><a href=\"../content/3-markdown.md\">Content &gt; Markdown</a></em> documentation.</p></aside>\n<h3 id=\"pages-body-parser\">pages.body.parser<a class=\"heading-anchor\" href=\"#pages-body-parser\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Markdown parser class (<code translate=\"no\">Cecil\\Converter\\Parsedown</code> by default). It must extend <code translate=\"no\">Cecil\\Converter\\Parsedown</code>: see <a href=\"../developers/1-extend.md#markdown-parser\">Markdown parser</a> to add your own syntax.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">body:</span>\n    <span class=\"hljs-attr\">parser:</span> <span class=\"hljs-string\">Cecil\\Converter\\Parsedown</span></code></pre>\n<h3 id=\"pages-body-toc\">pages.body.toc<a class=\"heading-anchor\" href=\"#pages-body-toc\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Headers used to build the table of contents (<code translate=\"no\">[h2, h3]</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">body:</span>\n    <span class=\"hljs-attr\">toc:</span> <span class=\"hljs-string\">[h2,</span> <span class=\"hljs-string\">h3]</span></code></pre>\n<h3 id=\"pages-body-anchors\">pages.body.anchors<a class=\"heading-anchor\" href=\"#pages-body-anchors\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Headings with an anchor link (<code translate=\"no\">[h2, h3]</code> by default): an empty <code translate=\"no\">&lt;a class=\"heading-anchor\" href=\"#&lt;id&gt;\"&gt;</code> element is added at the end of each of these headings that have an ID, to be styled by templates (e.g.: a <code translate=\"no\">#</code> displayed on hover).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">body:</span>\n    <span class=\"hljs-attr\">anchors:</span> <span class=\"hljs-string\">[h2,</span> <span class=\"hljs-string\">h3]</span> <span class=\"hljs-comment\"># set to false to disable anchors</span></code></pre>\n<h3 id=\"pages-body-highlight\">pages.body.highlight<a class=\"heading-anchor\" href=\"#pages-body-highlight\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Enables code syntax highlighting (<code translate=\"no\">true</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">body:</span>\n    <span class=\"hljs-attr\">highlight:</span> <span class=\"hljs-literal\">false</span> <span class=\"hljs-comment\"># set to false to disable syntax highlighting</span></code></pre>\n<p>The highlighter engine can be changed with the <code translate=\"no\">engine</code> option:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">body:</span>\n    <span class=\"hljs-attr\">highlight:</span>\n      <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">true</span>    <span class=\"hljs-comment\"># `true` by default</span>\n      <span class=\"hljs-attr\">engine:</span> <span class=\"hljs-string\">tempest</span>  <span class=\"hljs-comment\"># `highlightjs` (default) or `tempest`</span></code></pre>\n<ul>\n<li><code translate=\"no\">highlightjs</code>: <a href=\"https://github.com/scrivo/highlight.php\" target=\"_blank\" rel=\"noopener noreferrer\">highlight.php</a>, a PHP port of highlight.js (190+ languages, <code translate=\"no\">hljs-*</code> CSS classes)</li>\n<li><code translate=\"no\">tempest</code>: <a href=\"https://github.com/tempestphp/highlight\" target=\"_blank\" rel=\"noopener noreferrer\">tempest/highlight</a>, a fast server-side highlighter (web languages: PHP, HTML, CSS, JavaScript, JSON, YAML, Twig, SQL, XML, etc., <code translate=\"no\">hl-*</code> CSS classes)</li>\n</ul>\n<aside class=\"note note-info\"><p>These options only apply to Markdown content: the <a href=\"../templates/reference/3-filters.md#highlight\"><code translate=\"no\">highlight</code></a> filter of templates uses the <a href=\"7-layouts.md#layouts-highlight\"><code translate=\"no\">layouts.highlight.engine</code></a> option.</p></aside>\n<h3 id=\"pages-body-images\">pages.body.images<a class=\"heading-anchor\" href=\"#pages-body-images\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Images handling options.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">body:</span>\n    <span class=\"hljs-attr\">images:</span>\n      <span class=\"hljs-attr\">formats:</span> <span class=\"hljs-string\">[]</span>       <span class=\"hljs-comment\"># adds alternative image formats as `source` (e.g. `[avif, webp]`, empty array by default)</span>\n      <span class=\"hljs-attr\">resize:</span> <span class=\"hljs-number\">0</span>         <span class=\"hljs-comment\"># resizes all images to &lt;width&gt; (in pixels, `0` to disable)</span>\n      <span class=\"hljs-attr\">responsive:</span> <span class=\"hljs-literal\">false</span> <span class=\"hljs-comment\"># adds responsive image variants to the `srcset` attribute (`false` by default)</span>\n      <span class=\"hljs-attr\">lazy:</span> <span class=\"hljs-literal\">true</span>        <span class=\"hljs-comment\"># adds `loading=\"lazy\"` attribute (`true` by default)</span>\n      <span class=\"hljs-attr\">decoding:</span> <span class=\"hljs-literal\">true</span>    <span class=\"hljs-comment\"># adds `decoding=\"async\"` attribute (`true` by default)</span>\n      <span class=\"hljs-attr\">caption:</span> <span class=\"hljs-literal\">false</span>    <span class=\"hljs-comment\"># puts the image in a &lt;figure&gt; element and adds a &lt;figcaption&gt; containing the title (`false` by default)</span>\n      <span class=\"hljs-attr\">placeholder:</span> <span class=\"hljs-string\">''</span>   <span class=\"hljs-comment\"># fills the &lt;img&gt; background before loading ('color' or 'lqip', empty by default)</span>\n      <span class=\"hljs-attr\">class:</span> <span class=\"hljs-string\">''</span>         <span class=\"hljs-comment\"># sets a default class on each image (empty by default)</span>\n      <span class=\"hljs-attr\">dark_suffix:</span> <span class=\"hljs-string\">~</span>    <span class=\"hljs-comment\"># suffix of the dark variant image (e.g. `.dark`), disabled by default</span>\n      <span class=\"hljs-attr\">mobile_suffix:</span> <span class=\"hljs-string\">~</span>  <span class=\"hljs-comment\"># suffix of the mobile variant image (e.g. `.mobile`), disabled by default</span>\n      <span class=\"hljs-attr\">mobile_media_query:</span> <span class=\"hljs-string\">'(max-width: 767px)'</span> <span class=\"hljs-comment\"># media query of the mobile variant `&lt;source&gt;`</span>\n      <span class=\"hljs-attr\">remote:</span>           <span class=\"hljs-comment\"># remote image handling (set to `false` to disable)</span>\n        <span class=\"hljs-attr\">fallback:</span>         <span class=\"hljs-comment\"># path to the fallback image, stored in assets dir (empty by default)</span></code></pre>\n<aside class=\"note note-warning\"><p>Since version <ins>8.41.0</ins>, the <code translate=\"no\">pages.body.images.resize</code> option is used to resize images to a specific width, no more to enable the resize feature (enabled systematically).</p></aside>\n<aside class=\"note note-important\"><p>Global options, like responsive images widths and sizes, are configurable in the <a href=\"6-assets.md#assets-images\"><code translate=\"no\">assets.images</code></a> section.</p></aside>\n<aside class=\"note note-info\"><p>Remote images are downloaded and converted into <em>Assets</em> to be manipulated. You can disable this behavior by setting the option <code translate=\"no\">pages.body.images.remote.enabled</code> to <code translate=\"no\">false</code>.</p></aside>\n<aside class=\"note note-tip\"><p>When <code translate=\"no\">dark_suffix</code> is set (e.g. <code translate=\"no\">dark_suffix: .dark</code>), Cecil automatically looks for a dark variant of each image (e.g. <code translate=\"no\">photo.dark.jpg</code> alongside <code translate=\"no\">photo.jpg</code>). If found, the image is wrapped in a <code translate=\"no\">&lt;picture&gt;</code> element with a <code translate=\"no\">&lt;source media=\"(prefers-color-scheme: dark)\"&gt;</code> for automatic light/dark theme switching. Works in combination with <code translate=\"no\">formats</code> and <code translate=\"no\">responsive</code>.</p>\n<p>In the same way, when <code translate=\"no\">mobile_suffix</code> is set (e.g. <code translate=\"no\">mobile_suffix: .mobile</code>), Cecil looks for a mobile variant of each image (e.g. <code translate=\"no\">photo.mobile.jpg</code> alongside <code translate=\"no\">photo.jpg</code>) and adds a <code translate=\"no\">&lt;source&gt;</code> element with the <code translate=\"no\">mobile_media_query</code> media query (<code translate=\"no\">(max-width: 767px)</code> by default). If <code translate=\"no\">dark_suffix</code> is also set, the dark variant of the mobile image (e.g. <code translate=\"no\">photo.mobile.dark.jpg</code>) is used on mobile with dark color scheme. Mobile sources are placed before dark sources, so that a mobile variant takes precedence.</p></aside>\n<h3 id=\"pages-body-links\">pages.body.links<a class=\"heading-anchor\" href=\"#pages-body-links\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Links handling options.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">body:</span>\n    <span class=\"hljs-attr\">links:</span>\n      <span class=\"hljs-attr\">embed:</span>\n        <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">false</span>     <span class=\"hljs-comment\"># turns links into embedded content if possible (`false` by default)</span>\n        <span class=\"hljs-attr\">video:</span> <span class=\"hljs-string\">[mp4,</span> <span class=\"hljs-string\">webm]</span> <span class=\"hljs-comment\"># video files extensions</span>\n        <span class=\"hljs-attr\">audio:</span> <span class=\"hljs-string\">[mp3,</span> <span class=\"hljs-string\">ogg,</span> <span class=\"hljs-string\">wav]</span> <span class=\"hljs-comment\"># audio files extensions</span>\n      <span class=\"hljs-attr\">external:</span>\n        <span class=\"hljs-attr\">blank:</span> <span class=\"hljs-literal\">false</span>     <span class=\"hljs-comment\"># if true open external link in new tab</span>\n        <span class=\"hljs-attr\">noopener:</span> <span class=\"hljs-literal\">true</span>   <span class=\"hljs-comment\"># if true add \"noopener\" to `rel` attribute</span>\n        <span class=\"hljs-attr\">noreferrer:</span> <span class=\"hljs-literal\">true</span> <span class=\"hljs-comment\"># if true add \"noreferrer\" to `rel` attribute</span>\n        <span class=\"hljs-attr\">nofollow:</span> <span class=\"hljs-literal\">false</span>  <span class=\"hljs-comment\"># if true add \"nofollow\" to `rel` attribute</span></code></pre>\n<h3 id=\"pages-body-excerpt\">pages.body.excerpt<a class=\"heading-anchor\" href=\"#pages-body-excerpt\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Excerpt handling options.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">body:</span>\n    <span class=\"hljs-attr\">excerpt:</span>\n      <span class=\"hljs-attr\">separator:</span> <span class=\"hljs-string\">excerpt|break</span> <span class=\"hljs-comment\"># string to use as separator (`excerpt|break` by default)</span>\n      <span class=\"hljs-attr\">capture:</span> <span class=\"hljs-string\">before</span>          <span class=\"hljs-comment\"># part to capture, `before` or `after` the separator (`before` by default)</span></code></pre>\n<h2 id=\"pages-default\">pages.default<a class=\"heading-anchor\" href=\"#pages-default\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Default pages are pages without content file (<strong>front matter only</strong>), indexed by ID, each one with a <code translate=\"no\">path</code> and some front matter variables.</p>\n<p>Cecil provides built-in default pages (from built-in templates):</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">default:</span>\n    <span class=\"hljs-attr\">index:</span>\n      <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">''</span>\n      <span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">Home</span>\n      <span class=\"hljs-attr\">published:</span> <span class=\"hljs-literal\">true</span>\n    <span class=\"hljs-attr\">404:</span>\n      <span class=\"hljs-attr\">path:</span> <span class=\"hljs-number\">404</span>\n      <span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">Page</span> <span class=\"hljs-string\">not</span> <span class=\"hljs-string\">found</span>\n      <span class=\"hljs-attr\">layout:</span> <span class=\"hljs-number\">404</span>\n      <span class=\"hljs-attr\">uglyurl:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">published:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">excluded:</span> <span class=\"hljs-literal\">true</span>\n    <span class=\"hljs-attr\">robots:</span>\n      <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">robots</span>\n      <span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">Robots.txt</span>\n      <span class=\"hljs-attr\">layout:</span> <span class=\"hljs-string\">robots</span>\n      <span class=\"hljs-attr\">output:</span> <span class=\"hljs-string\">txt</span>\n      <span class=\"hljs-attr\">published:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">excluded:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">multilingual:</span> <span class=\"hljs-literal\">false</span>\n    <span class=\"hljs-attr\">sitemap:</span>\n      <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">sitemap</span>\n      <span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">XML</span> <span class=\"hljs-string\">sitemap</span>\n      <span class=\"hljs-attr\">layout:</span> <span class=\"hljs-string\">sitemap</span>\n      <span class=\"hljs-attr\">output:</span> <span class=\"hljs-string\">xml</span>\n      <span class=\"hljs-attr\">changefreq:</span> <span class=\"hljs-string\">monthly</span>\n      <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-number\">0.5</span>\n      <span class=\"hljs-attr\">published:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">excluded:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">multilingual:</span> <span class=\"hljs-literal\">false</span>\n    <span class=\"hljs-attr\">xsl/sitemap:</span>\n      <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">xsl/sitemap</span>\n      <span class=\"hljs-attr\">layout:</span> <span class=\"hljs-string\">sitemap</span>\n      <span class=\"hljs-attr\">output:</span> <span class=\"hljs-string\">xsl</span>\n      <span class=\"hljs-attr\">uglyurl:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">published:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">excluded:</span> <span class=\"hljs-literal\">true</span>\n    <span class=\"hljs-attr\">xsl/atom:</span>\n      <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">xsl/atom</span>\n      <span class=\"hljs-attr\">layout:</span> <span class=\"hljs-string\">feed</span>\n      <span class=\"hljs-attr\">output:</span> <span class=\"hljs-string\">xsl</span>\n      <span class=\"hljs-attr\">uglyurl:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">published:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">excluded:</span> <span class=\"hljs-literal\">true</span>\n    <span class=\"hljs-attr\">xsl/rss:</span>\n      <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">xsl/rss</span>\n      <span class=\"hljs-attr\">layout:</span> <span class=\"hljs-string\">feed</span>\n      <span class=\"hljs-attr\">output:</span> <span class=\"hljs-string\">xsl</span>\n      <span class=\"hljs-attr\">uglyurl:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">published:</span> <span class=\"hljs-literal\">false</span>\n      <span class=\"hljs-attr\">excluded:</span> <span class=\"hljs-literal\">true</span></code></pre>\n<p>Each one can be:</p>\n<ol>\n<li>disabled: <code translate=\"no\">published: false</code></li>\n<li>excluded from list pages: <code translate=\"no\">excluded: true</code></li>\n<li>excluded from localization: <code translate=\"no\">multilingual: false</code></li>\n</ol>\n<p>You can also add your own pages (a theme can do the same in its <code translate=\"no\">config.yml</code>):</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">default:</span>\n    <span class=\"hljs-attr\">code:</span>\n      <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">code</span>\n      <span class=\"hljs-attr\">redirect:</span> <span class=\"hljs-string\">https://github.com/ArnaudLigny</span></code></pre>\n<p>Like any other page, a default page is listed (e.g.: in <code translate=\"no\">site.pages.showable</code>, in the sitemap, on the homepage): set <code translate=\"no\">excluded: true</code> to keep a technical page (JSON index, manifest, etc.) out of lists.</p>\n<aside class=\"note note-important\"><p>Since version <ins>9.19.0</ins>, <code translate=\"no\">pages.virtual</code> is removed: move its pages to <code translate=\"no\">pages.default</code>, indexed by ID (e.g.: the page path). Pages without content file are no longer excluded from lists by default.</p></aside>\n<aside class=\"note note-tip\"><p>Since version <ins>8.68.0</ins>, you can override the default <code translate=\"no\">robots.txt</code> page by creating a page with the same <code translate=\"no\">path</code>:</p>\n<p><em>pages/robots.md</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">layout:</span> <span class=\"hljs-string\">robots</span>\n<span class=\"hljs-attr\">output:</span> <span class=\"hljs-string\">txt</span>\n<span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">User-agent:</span> <span class=\"hljs-string\">AI-bot</span>\n<span class=\"hljs-attr\">Disallow:</span> <span class=\"hljs-string\">/</span></code></pre></aside>\n<h2 id=\"pages-generators\">pages.generators<a class=\"heading-anchor\" href=\"#pages-generators\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Generators are used by Cecil to create additional pages (e.g.: sitemap, feed, pagination, etc.) from existing pages, or from other sources like the configuration file or external sources.</p>\n<p>Generators are indexed by name and run in ascending order of their priority. Below is the list of generators provided by Cecil:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">generators:</span>\n    <span class=\"hljs-attr\">DefaultPages:</span> <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">class:</span> <span class=\"hljs-string\">Cecil\\Generator\\DefaultPages,</span> <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-number\">10</span> <span class=\"hljs-string\">}</span>\n    <span class=\"hljs-attr\">ExternalBody:</span> <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">class:</span> <span class=\"hljs-string\">Cecil\\Generator\\ExternalBody,</span> <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-number\">30</span> <span class=\"hljs-string\">}</span>\n    <span class=\"hljs-attr\">Section:</span>      <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">class:</span> <span class=\"hljs-string\">Cecil\\Generator\\Section,</span> <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-number\">40</span> <span class=\"hljs-string\">}</span>\n    <span class=\"hljs-attr\">Taxonomy:</span>     <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">class:</span> <span class=\"hljs-string\">Cecil\\Generator\\Taxonomy,</span> <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-number\">50</span> <span class=\"hljs-string\">}</span>\n    <span class=\"hljs-attr\">Homepage:</span>     <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">class:</span> <span class=\"hljs-string\">Cecil\\Generator\\Homepage,</span> <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-number\">60</span> <span class=\"hljs-string\">}</span>\n    <span class=\"hljs-attr\">Pagination:</span>   <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">class:</span> <span class=\"hljs-string\">Cecil\\Generator\\Pagination,</span> <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-number\">70</span> <span class=\"hljs-string\">}</span>\n    <span class=\"hljs-attr\">Alias:</span>        <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">class:</span> <span class=\"hljs-string\">Cecil\\Generator\\Alias,</span> <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-number\">80</span> <span class=\"hljs-string\">}</span>\n    <span class=\"hljs-attr\">Redirect:</span>     <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">class:</span> <span class=\"hljs-string\">Cecil\\Generator\\Redirect,</span> <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-number\">90</span> <span class=\"hljs-string\">}</span></code></pre>\n<p>A built-in generator can be disabled or moved by its name:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">generators:</span>\n    <span class=\"hljs-attr\">Redirect:</span> <span class=\"hljs-literal\">false</span>            <span class=\"hljs-comment\"># disabled</span>\n    <span class=\"hljs-attr\">Section:</span> <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-number\">45</span> <span class=\"hljs-string\">}</span>  <span class=\"hljs-comment\"># moved</span></code></pre>\n<p>See <a href=\"../developers/1-extend.md#configuration\">Extensions</a> for the full syntax.</p>\n<aside class=\"note note-tip\"><p>You can extend Cecil with <a href=\"../developers/1-extend.md#page-generators\">Pages generator</a>.</p></aside>\n<h2 id=\"pages-subsets\">pages.subsets<a class=\"heading-anchor\" href=\"#pages-subsets\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Subsets are used to render a part of the pages collection, based on a specific path, language or output format, with the command:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">cecil build --render-subset=&lt;name&gt;</code></pre>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">subsets:</span>\n    <span class=\"hljs-string\">&lt;name&gt;:</span>\n      <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">&lt;path&gt;</span> <span class=\"hljs-comment\"># glob or string path (e.g.: `blog/*`, `blog`)</span>\n      <span class=\"hljs-attr\">language:</span> <span class=\"hljs-string\">&lt;language&gt;</span> <span class=\"hljs-comment\"># language code (e.g.: `en`, `fr`)</span>\n      <span class=\"hljs-attr\">output:</span> <span class=\"hljs-string\">&lt;output&gt;</span> <span class=\"hljs-comment\"># output format (e.g.: `html`, `atom`)</span></code></pre>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">subsets:</span>\n    <span class=\"hljs-attr\">blog_en:</span>\n      <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">blog</span>\n      <span class=\"hljs-attr\">language:</span> <span class=\"hljs-string\">en</span>\n      <span class=\"hljs-attr\">output:</span> <span class=\"hljs-string\">html</span>\n    <span class=\"hljs-attr\">search_index:</span>\n      <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">'*'</span>\n      <span class=\"hljs-attr\">output:</span> <span class=\"hljs-string\">json</span></code></pre>\n<hr>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/content/multilingual/",
      "url": "https://cloudflare.cecil.app/documentation/content/multilingual/",
      "title": "Multilingual",
      "summary": "Translate pages through file name or front matter and link translated pages.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-24T00:00:00+00:00","content_text": "Multilingual\nIf your pages are available in multiple languages, there are two ways to define them:\nThrough file name\nThis is the most common way to translate a page from the main language to another language.\nYou just need to duplicate the reference page and add the target language code as a suffix, before the extension (e.g.: about.fr.md). The code must be one of the declared languages (format fr or fr-FR).\nExample:\n├─ about.md    # the reference page\n└─ about.fr.md # the French version (`fr`)\nYou can change the URL of the translated page with the slug variable in its front matter. For example, in about.fr.md:\n---\nslug: a-propos\n---\n# about.md    -&gt; \/about\/\n# about.fr.md -&gt; \/fr\/a-propos\/\nThrough front matter\nIf you want to create a page in a language other than the main language, without it being a translation of an existing page, you can use the language variable in its front matter.\nExample:\n---\nlanguage: fr\n---\nLink translated pages\nEach translated page references its versions in other languages.\nThis collection of pages is available in templates with the following variable:\n{{ page.translations }}\nTranslations are linked by their langref variable: by default, the page path without language (e.g.: about for about.md and about.fr.md).\nYou can change it in the front matter, for example to link translated pages with different file names:\n---\nlangref: my-page-ref\n---\nSearch engines\nThe built-in templates declare translated pages to search engines with hreflang alternates, in the HTML &lt;head&gt; and in the XML sitemap:\n\neach page lists itself and its translations\nx-default points to the version in the default language, and is omitted when the page has no version in the default language\n\nThe XML sitemap lists the pages of all languages, including pages that are not translated into the default language.",
      "content_html": "<h1>Multilingual</h1>\n<p>If your pages are available in multiple <a href=\"../configuration/2-languages.md#languages\">languages</a>, there are two ways to define them:</p>\n<h2 id=\"through-file-name\">Through file name<a class=\"heading-anchor\" href=\"#through-file-name\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>This is the most common way to translate a page from the main <a href=\"../configuration/2-languages.md#language\">language</a> to another language.</p>\n<p>You just need to duplicate the reference page and add the target language <code translate=\"no\">code</code> as a suffix, before the extension (e.g.: <code translate=\"no\">about.fr.md</code>). The code must be one of the declared <a href=\"../configuration/2-languages.md#languages\">languages</a> (format <code translate=\"no\">fr</code> or <code translate=\"no\">fr-FR</code>).</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">├─ about.md    # the reference page\n└─ about.fr.md # the French version (`fr`)</code></pre>\n<aside class=\"note note-tip\"><p>You can change the URL of the translated page with the <code translate=\"no\">slug</code> variable in its front matter. For example, in <code translate=\"no\">about.fr.md</code>:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">slug:</span> <span class=\"hljs-string\">a-propos</span>\n<span class=\"hljs-meta\">---</span>\n<span class=\"hljs-comment\"># about.md    -&gt; /about/</span>\n<span class=\"hljs-comment\"># about.fr.md -&gt; /fr/a-propos/</span></code></pre></aside>\n<h2 id=\"through-front-matter\">Through front matter<a class=\"heading-anchor\" href=\"#through-front-matter\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>If you want to create a page in a language other than the main language, without it being a translation of an existing page, you can use the <code translate=\"no\">language</code> variable in its front matter.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">language:</span> <span class=\"hljs-string\">fr</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<h2 id=\"link-translated-pages\">Link translated pages<a class=\"heading-anchor\" href=\"#link-translated-pages\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Each translated page references its versions in other languages.</p>\n<p>This collection of pages is available in <a href=\"../templates/2-variables.md#page\">templates</a> with the following variable:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ page.translations }}</span></code></pre>\n<aside class=\"note note-info\"><p>Translations are linked by their <code translate=\"no\">langref</code> variable: by default, the page path without language (e.g.: <code translate=\"no\">about</code> for <code translate=\"no\">about.md</code> and <code translate=\"no\">about.fr.md</code>).</p>\n<p>You can change it in the front matter, for example to link translated pages with different file names:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">langref:</span> <span class=\"hljs-string\">my-page-ref</span>\n<span class=\"hljs-meta\">---</span></code></pre></aside>\n<h2 id=\"search-engines\">Search engines<a class=\"heading-anchor\" href=\"#search-engines\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The built-in templates declare translated pages to search engines with <code translate=\"no\">hreflang</code> alternates, in the HTML <code translate=\"no\">&lt;head&gt;</code> and in the XML sitemap:</p>\n<ul>\n<li>each page lists itself and its translations</li>\n<li><code translate=\"no\">x-default</code> points to the version in the default language, and is omitted when the page has no version in the default language</li>\n</ul>\n<p>The XML sitemap lists the pages of all languages, including pages that are not translated into the default language.</p>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/templates/components/",
      "url": "https://cloudflare.cecil.app/documentation/templates/components/",
      "title": "Components",
      "summary": "Create reusable template components.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "Components\nCecil provides components to help you build reusable template \"units\".\nThe components feature is provided by the Twig components extension created by Giorgio Pogliani.\nComponents syntax\nComponents are Twig templates stored in the components\/ subdirectory of layouts\/ (e.g.: layouts\/components\/button.twig), and can be used anywhere in your templates:\n{# layouts\/components\/button.twig #}\n&lt;button {{ attributes.merge({class: 'rounded px-4'}) }}&gt;\n    {{ slot }}\n&lt;\/button&gt;\n\nThe slot variable contains any content you add between the opening and closing tags.\n\nTo use a component, use the dedicated tag x followed by : and the file name of your component without extension:\n{# layouts\/index.html.twig #}\n{% x:button with {class: 'text-white'} %}\n    &lt;strong&gt;Click me&lt;\/strong&gt;\n{% endx %}\nIt will render:\n&lt;button class=\"text-white rounded px-4\"&gt;\n    &lt;strong&gt;Click me&lt;\/strong&gt;\n&lt;\/button&gt;\nHTML syntax\nThe same component can be used with an HTML-like syntax:\n&lt;x-button class=\"text-white\"&gt;\n    &lt;strong&gt;Click me&lt;\/strong&gt;\n&lt;\/x-button&gt;\nTo evaluate an attribute value as a Twig expression, prefix its name with : (e.g.: &lt;x-button :label=\"page.title\"&gt;).\nSubfolders\nComponents stored in subfolders are reached with the dot notation:\n{# layouts\/components\/button\/primary.twig #}\n{% x:button.primary %}Click me{% endx %}\n{# or #}\n&lt;x-button.primary&gt;Click me&lt;\/x-button.primary&gt;\nNamed slots\nA component can expose several named slots:\n{# layouts\/components\/card.twig #}\n&lt;div {{ attributes.class('card') }}&gt;\n    &lt;h2 {{ title.attributes.class('card-title') }}&gt;{{ title }}&lt;\/h2&gt;\n    &lt;div&gt;{{ body }}&lt;\/div&gt;\n&lt;\/div&gt;\n{% x:card %}\n    {% slot:title with {class: 'text-2xl'} %}Title{% endslot %}\n    {% slot:body %}Body{% endslot %}\n{% endx %}\n{# or #}\n&lt;x-card&gt;\n    &lt;x-slot name=\"title\" class=\"text-2xl\"&gt;Title&lt;\/x-slot&gt;\n    &lt;x-slot name=\"body\"&gt;Body&lt;\/x-slot&gt;\n&lt;\/x-card&gt;\nConfiguration\nThe components directory and file extension can be changed with the layouts.components options (dir, components by default, and ext, twig by default).",
      "content_html": "<h1>Components</h1>\n<p>Cecil provides components to help you build reusable template \"units\".</p>\n<aside class=\"note note-info\"><p>The components feature is provided by the <a href=\"https://github.com/giorgiopogliani/twig-components\" target=\"_blank\" rel=\"noopener noreferrer\"><em>Twig components extension</em></a> created by Giorgio Pogliani.</p></aside>\n<h2 id=\"components-syntax\">Components syntax<a class=\"heading-anchor\" href=\"#components-syntax\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Components are Twig templates stored in the <code translate=\"no\">components/</code> subdirectory of <code translate=\"no\">layouts/</code> (e.g.: <code translate=\"no\">layouts/components/button.twig</code>), and can be used anywhere in your templates:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# layouts/components/button.twig #}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">button</span> </span></span><span class=\"hljs-template-variable\">{{ attributes.merge({class: 'rounded px-4'}) }}</span><span class=\"xml\"><span class=\"hljs-tag\">&gt;</span>\n    </span><span class=\"hljs-template-variable\">{{ slot }}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">button</span>&gt;</span></span></code></pre>\n<blockquote>\n<p>The <code translate=\"no\">slot</code> variable contains any content you add between the opening and closing tags.</p>\n</blockquote>\n<p>To use a component, use the dedicated tag <code translate=\"no\">x</code> followed by <code translate=\"no\">:</code> and the file name of your component without extension:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# layouts/index.html.twig #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">x</span>:button with {class: 'text-white'} %}</span><span class=\"xml\">\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">strong</span>&gt;</span>Click me<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">strong</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">endx</span> %}</span></code></pre>\n<p>It will render:</p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">button</span> <span class=\"hljs-attr\">class</span>=<span class=\"hljs-string\">\"text-white rounded px-4\"</span>&gt;</span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">strong</span>&gt;</span>Click me<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">strong</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">button</span>&gt;</span></code></pre>\n<h3 id=\"html-syntax\">HTML syntax<a class=\"heading-anchor\" href=\"#html-syntax\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>The same component can be used with an HTML-like syntax:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">x-button</span> <span class=\"hljs-attr\">class</span>=<span class=\"hljs-string\">\"text-white\"</span>&gt;</span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">strong</span>&gt;</span>Click me<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">strong</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">x-button</span>&gt;</span></span></code></pre>\n<p>To evaluate an attribute value as a Twig expression, prefix its name with <code translate=\"no\">:</code> (e.g.: <code translate=\"no\">&lt;x-button :label=\"page.title\"&gt;</code>).</p>\n<h3 id=\"subfolders\">Subfolders<a class=\"heading-anchor\" href=\"#subfolders\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Components stored in subfolders are reached with the <em>dot notation</em>:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# layouts/components/button/primary.twig #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">x</span>:button.primary %}</span><span class=\"xml\">Click me</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">endx</span> %}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# or #}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">x-button.primary</span>&gt;</span>Click me<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">x-button.primary</span>&gt;</span></span></code></pre>\n<h3 id=\"named-slots\">Named slots<a class=\"heading-anchor\" href=\"#named-slots\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>A component can expose several named slots:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# layouts/components/card.twig #}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span> </span></span><span class=\"hljs-template-variable\">{{ attributes.class('card') }}</span><span class=\"xml\"><span class=\"hljs-tag\">&gt;</span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2</span> </span></span><span class=\"hljs-template-variable\">{{ title.attributes.class('card-title') }}</span><span class=\"xml\"><span class=\"hljs-tag\">&gt;</span></span><span class=\"hljs-template-variable\">{{ title }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">h2</span>&gt;</span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ body }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span></span></code></pre>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">x</span>:card %}</span><span class=\"xml\">\n    </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">slot</span>:title with {class: 'text-2xl'} %}</span><span class=\"xml\">Title</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">endslot</span> %}</span><span class=\"xml\">\n    </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">slot</span>:body %}</span><span class=\"xml\">Body</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">endslot</span> %}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">endx</span> %}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# or #}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">x-card</span>&gt;</span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">x-slot</span> <span class=\"hljs-attr\">name</span>=<span class=\"hljs-string\">\"title\"</span> <span class=\"hljs-attr\">class</span>=<span class=\"hljs-string\">\"text-2xl\"</span>&gt;</span>Title<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">x-slot</span>&gt;</span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">x-slot</span> <span class=\"hljs-attr\">name</span>=<span class=\"hljs-string\">\"body\"</span>&gt;</span>Body<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">x-slot</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">x-card</span>&gt;</span></span></code></pre>\n<h2 id=\"configuration\">Configuration<a class=\"heading-anchor\" href=\"#configuration\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The components directory and file extension can be changed with the <a href=\"../configuration/7-layouts.md#layouts-components\"><code translate=\"no\">layouts.components</code></a> options (<code translate=\"no\">dir</code>, <code translate=\"no\">components</code> by default, and <code translate=\"no\">ext</code>, <code translate=\"no\">twig</code> by default).</p>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/configuration/data-static/",
      "url": "https://cloudflare.cecil.app/documentation/configuration/data-static/",
      "title": "Data and static files",
      "summary": "Data files and static files options.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "Data and static files\nThese options define where data files and static files are stored and how they are handled.\nData\nWhere data files are stored and what extensions are handled.\nSupported formats: YAML, JSON, XML and CSV.\ndata.dir\nData source directory (data by default).\ndata:\n  dir: data\ndata.ext\nList of file extensions.\ndata:\n  ext: [yaml, yml, json, xml, csv]\ndata.load\nEnables site.data collection (true by default).\ndata:\n  load: true\n\nStatic\nManagement of static files, copied as is (PDF, fonts, etc.).\nYou should put your assets files, used by asset(), in the assets directory to avoid unnecessary files copy.\nstatic.dir\nStatic files source directory (static by default).\nstatic:\n  dir: static\nstatic.target\nDirectory where static files are copied (root by default).\nstatic:\n  target: ''\nstatic.exclude\nList of excluded files. Accepts globs, strings and regexes.\nstatic:\n  exclude: ['sass', 'scss', '*.scss', 'package*.json', 'node_modules']\nIf you use Bootstrap Icons you can exclude the node_modules except node_modules\/bootstrap-icons with a regular expression:\nstatic:\n  exclude: ['sass', 'scss', '*.scss', 'package*.json', '#node_modules\/(?!bootstrap-icons)#']\nstatic.load\nEnables site.static collection (false by default).\nstatic:\n  load: false\nstatic.mounts\nCopies specific files or directories to a specific destination: each entry maps a source path, relative to the static.dir directory, to a destination path, relative to the output directory.\nstatic:\n  mounts:\n    &lt;source&gt;: &lt;destination&gt;\nstatic example\nstatic:\n  dir: docs\n  target: docs\n  exclude: ['sass', '*.scss', '\/\\.bck$\/']\n  load: true\n  mounts:\n    source\/path\/file.ext: dest\/path\/file.ext\n    vendor\/icons\/fonts: fonts\n",
      "content_html": "<h1>Data and static files</h1>\n<p>These options define where data files and static files are stored and how they are handled.</p>\n<h2 id=\"data\">Data<a class=\"heading-anchor\" href=\"#data\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Where data files are stored and what extensions are handled.</p>\n<p>Supported formats: YAML, JSON, XML and CSV.</p>\n<h3 id=\"data-dir\">data.dir<a class=\"heading-anchor\" href=\"#data-dir\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Data source directory (<code translate=\"no\">data</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">data:</span>\n  <span class=\"hljs-attr\">dir:</span> <span class=\"hljs-string\">data</span></code></pre>\n<h3 id=\"data-ext\">data.ext<a class=\"heading-anchor\" href=\"#data-ext\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>List of file extensions.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">data:</span>\n  <span class=\"hljs-attr\">ext:</span> <span class=\"hljs-string\">[yaml,</span> <span class=\"hljs-string\">yml,</span> <span class=\"hljs-string\">json,</span> <span class=\"hljs-string\">xml,</span> <span class=\"hljs-string\">csv]</span></code></pre>\n<h3 id=\"data-load\">data.load<a class=\"heading-anchor\" href=\"#data-load\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Enables <code translate=\"no\">site.data</code> collection (<code translate=\"no\">true</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">data:</span>\n  <span class=\"hljs-attr\">load:</span> <span class=\"hljs-literal\">true</span></code></pre>\n<hr>\n<h2 id=\"static\">Static<a class=\"heading-anchor\" href=\"#static\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Management of static files, copied as is (PDF, fonts, etc.).</p>\n<aside class=\"note note-important\"><p>You should put your assets files, used by <a href=\"../assets/index.md#asset\"><code translate=\"no\">asset()</code></a>, in the <a href=\"6-assets.md#assets-dir\"><code translate=\"no\">assets</code> directory</a> to avoid unnecessary files copy.</p></aside>\n<h3 id=\"static-dir\">static.dir<a class=\"heading-anchor\" href=\"#static-dir\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Static files source directory (<code translate=\"no\">static</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">static:</span>\n  <span class=\"hljs-attr\">dir:</span> <span class=\"hljs-string\">static</span></code></pre>\n<h3 id=\"static-target\">static.target<a class=\"heading-anchor\" href=\"#static-target\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Directory where static files are copied (root by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">static:</span>\n  <span class=\"hljs-attr\">target:</span> <span class=\"hljs-string\">''</span></code></pre>\n<h3 id=\"static-exclude\">static.exclude<a class=\"heading-anchor\" href=\"#static-exclude\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>List of excluded files. Accepts globs, strings and regexes.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">static:</span>\n  <span class=\"hljs-attr\">exclude:</span> <span class=\"hljs-string\">['sass',</span> <span class=\"hljs-string\">'scss'</span><span class=\"hljs-string\">,</span> <span class=\"hljs-string\">'*.scss'</span><span class=\"hljs-string\">,</span> <span class=\"hljs-string\">'package*.json'</span><span class=\"hljs-string\">,</span> <span class=\"hljs-string\">'node_modules'</span><span class=\"hljs-string\">]</span></code></pre>\n<aside class=\"note note-tip\"><p>If you use <a href=\"https://icons.getbootstrap.com\" target=\"_blank\" rel=\"noopener noreferrer\">Bootstrap Icons</a> you can exclude the <code translate=\"no\">node_modules</code> except <code translate=\"no\">node_modules/bootstrap-icons</code> with a regular expression:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">static:</span>\n  <span class=\"hljs-attr\">exclude:</span> <span class=\"hljs-string\">['sass',</span> <span class=\"hljs-string\">'scss'</span><span class=\"hljs-string\">,</span> <span class=\"hljs-string\">'*.scss'</span><span class=\"hljs-string\">,</span> <span class=\"hljs-string\">'package*.json'</span><span class=\"hljs-string\">,</span> <span class=\"hljs-string\">'#node_modules/(?!bootstrap-icons)#'</span><span class=\"hljs-string\">]</span></code></pre></aside>\n<h3 id=\"static-load\">static.load<a class=\"heading-anchor\" href=\"#static-load\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Enables <code translate=\"no\">site.static</code> collection (<code translate=\"no\">false</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">static:</span>\n  <span class=\"hljs-attr\">load:</span> <span class=\"hljs-literal\">false</span></code></pre>\n<h3 id=\"static-mounts\">static.mounts<a class=\"heading-anchor\" href=\"#static-mounts\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Copies specific files or directories to a specific destination: each entry maps a source path, relative to the <a href=\"#static-dir\"><code translate=\"no\">static.dir</code></a> directory, to a destination path, relative to the output directory.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">static:</span>\n  <span class=\"hljs-attr\">mounts:</span>\n    <span class=\"hljs-string\">&lt;source&gt;:</span> <span class=\"hljs-string\">&lt;destination&gt;</span></code></pre>\n<h3 id=\"static-example\">static example<a class=\"heading-anchor\" href=\"#static-example\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">static:</span>\n  <span class=\"hljs-attr\">dir:</span> <span class=\"hljs-string\">docs</span>\n  <span class=\"hljs-attr\">target:</span> <span class=\"hljs-string\">docs</span>\n  <span class=\"hljs-attr\">exclude:</span> <span class=\"hljs-string\">['sass',</span> <span class=\"hljs-string\">'*.scss'</span><span class=\"hljs-string\">,</span> <span class=\"hljs-string\">'/\\.bck$/'</span><span class=\"hljs-string\">]</span>\n  <span class=\"hljs-attr\">load:</span> <span class=\"hljs-literal\">true</span>\n  <span class=\"hljs-attr\">mounts:</span>\n    <span class=\"hljs-attr\">source/path/file.ext:</span> <span class=\"hljs-string\">dest/path/file.ext</span>\n    <span class=\"hljs-attr\">vendor/icons/fonts:</span> <span class=\"hljs-string\">fonts</span></code></pre>\n<hr>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/content/dynamic-content/",
      "url": "https://cloudflare.cecil.app/documentation/content/dynamic-content/",
      "title": "Dynamic content",
      "summary": "Use variables and Twig expressions inside page content.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "Dynamic content\nBy default, the body of a page is static: Twig syntax written in a Markdown file is output as is.\nYou can create dynamic content in a page by using the template_from_string Twig function, which renders the page content as a Twig template.\n{{ include(template_from_string(page.content, \"dynamic content for page \" ~ page.id)) }}\nWith this, you can use any page variable in the body of the page.\n---\nvar: 'value'\n---\nThe value of `var` is {{ page.var }}.\nEnable dynamic content\nThe recommended way is to create a dedicated layout that overrides the content block, and to use it only for pages that need it.\n{# layouts\/dynamic.html.twig #}\n{% extends '_default\/page.html.twig' %}\n\n{% block content %}\n{{ include(template_from_string(page.content, \"dynamic content for page \" ~ page.id)) }}\n{% endblock content %}\nThen set the layout variable in the front matter of the page:\n---\ntitle: \"My dynamic page\"\nlayout: dynamic\n---\nThe second argument of template_from_string is the name of the template: it is displayed in error messages, so including page.id helps to find the page in error.\nAvailable variables\nThe page content is rendered with the same context as the layout, so you can use:\n\npage variables: page.title, page.date, page.&lt;custom variable&gt;, etc.\nsite variables: site.title, site.pages, site.data, etc.\nall functions, filters and sorts available in templates\nTwig tags: {% set %}, {% if %}, {% for %}, {% include %}, etc.\n\nHow it works\nThe Markdown body is converted to HTML first, then the result (page.content) is rendered by Twig. This order has some consequences:\n\nMarkdown escapes the &lt; and &gt; characters, so comparison operators (&gt;, &lt;=) and arrow functions (=&gt;) can’t be used in the body: the build fails with an Unexpected character \"&amp;\" error.\nA Twig expression used in an HTML attribute (e.g.: href=\"{{ url(post) }}\") is URL encoded by the Markdown converter and won’t be evaluated.\nA Twig expression alone on its own line is wrapped in a &lt;p&gt; element.\nTwig syntax written inside a code span or a code block is evaluated too.\n\nKeep the body simple (variables, filters, short conditions) and move complex markup and logic into a partial template or a macro.\nTo display Twig syntax as is, wrap it in a verbatim tag:\n{% verbatim %}`{{ page.title }}`{% endverbatim %}\nTo avoid an extra &lt;p&gt; element around a block of HTML, wrap the expression in an HTML element, separated by line breaks:\n&lt;div&gt;\n{{ include('partials\/latest-posts.html.twig') }}\n&lt;\/div&gt;\nExample: variables, data and partial template\nThis example shows a page displaying site and page variables, data from a data file, and the latest blog posts through a reusable partial template.\nData file:\n# data\/team.yml\n- name: Alice\n  role: Developer\n- name: Bob\n  role: Designer\nPartial template, which receives section and limit as parameters:\n{# layouts\/partials\/latest-posts.html.twig #}\n{% set posts = site.pages.showable|filter_by('section', section|default('blog'))|sort_by_date|slice(0, limit|default(5)) %}\n{% if posts|length &gt; 0 %}\n&lt;ul class=\"latest-posts\"&gt;\n  {% for post in posts %}\n  &lt;li&gt;&lt;a href=\"{{ url(post) }}\"&gt;{{ post.title }}&lt;\/a&gt; &lt;time datetime=\"{{ post.date|date('Y-m-d') }}\"&gt;{{ post.date|format_date('long') }}&lt;\/time&gt;&lt;\/li&gt;\n  {% endfor %}\n&lt;\/ul&gt;\n{% else %}\n&lt;p&gt;No posts yet.&lt;\/p&gt;\n{% endif %}\nPage:\n---\ntitle: About\nlayout: dynamic\n---\nWelcome to **{{ site.title }}**! This page was published on {{ page.date|format_date('long') }}.\n\nOur team has {{ site.data.team|length }} members: {{ site.data.team|column('name')|join(', ') }}.\n\n## Latest posts\n\n&lt;div&gt;\n{{ include('partials\/latest-posts.html.twig', {section: 'blog', limit: 3}) }}\n&lt;\/div&gt;\nOutput:\n&lt;p&gt;Welcome to &lt;strong&gt;My site&lt;\/strong&gt;! This page was published on October 9, 2026.&lt;\/p&gt;\n&lt;p&gt;Our team has 2 members: Alice, Bob.&lt;\/p&gt;\n&lt;h2 id=\"latest-posts\"&gt;Latest posts&lt;\/h2&gt;\n&lt;div&gt;\n&lt;ul class=\"latest-posts\"&gt;\n  &lt;li&gt;&lt;a href=\"\/blog\/post-3\/\"&gt;Post 3&lt;\/a&gt; &lt;time datetime=\"2026-03-01\"&gt;March 1, 2026&lt;\/time&gt;&lt;\/li&gt;\n  &lt;li&gt;&lt;a href=\"\/blog\/post-2\/\"&gt;Post 2&lt;\/a&gt; &lt;time datetime=\"2026-02-01\"&gt;February 1, 2026&lt;\/time&gt;&lt;\/li&gt;\n  &lt;li&gt;&lt;a href=\"\/blog\/post-1\/\"&gt;Post 1&lt;\/a&gt; &lt;time datetime=\"2026-01-01\"&gt;January 1, 2026&lt;\/time&gt;&lt;\/li&gt;\n&lt;\/ul&gt;\n&lt;\/div&gt;\nThe &gt; operator and the href=\"{{ … }}\" attribute work here because they are written in the partial template, not in the Markdown body.\nExample: shortcodes with macros\nTwig macros can be used as shortcodes to insert rich HTML snippets in the body of a page.\nCreate the macros:\n{# layouts\/macros\/shortcodes.html.twig #}\n{% macro youtube(id, title = 'YouTube video') %}\n&lt;iframe src=\"https:\/\/www.youtube-nocookie.com\/embed\/{{ id }}\" title=\"{{ title }}\" width=\"560\" height=\"315\" loading=\"lazy\" allowfullscreen&gt;&lt;\/iframe&gt;\n{% endmacro %}\n\n{% macro alert(message, type = 'info') %}\n&lt;div class=\"alert alert-{{ type }}\" role=\"alert\"&gt;{{ message }}&lt;\/div&gt;\n{% endmacro %}\nCreate a layout that imports the macros before rendering the content:\n{# layouts\/shortcodes.html.twig #}\n{% extends '_default\/page.html.twig' %}\n\n{% block content %}\n{% set imports = \"{% import 'macros\/shortcodes.html.twig' as sc %}\" %}\n{{ include(template_from_string(imports ~ page.content, \"dynamic content for page \" ~ page.id)) }}\n{% endblock content %}\nUse the shortcodes in a page:\n---\ntitle: \"Demo video\"\nlayout: shortcodes\n---\n&lt;div&gt;\n  {{ sc.alert('This video is in English.', 'warning') }}\n&lt;\/div&gt;\n\n## Demo\n\n&lt;div&gt;\n  {{ sc.youtube('NaB8JBfE7DY', 'Cecil demo') }}\n&lt;\/div&gt;\nOutput:\n&lt;div&gt;\n  &lt;div class=\"alert alert-warning\" role=\"alert\"&gt;This video is in English.&lt;\/div&gt;\n&lt;\/div&gt;\n&lt;h2 id=\"demo\"&gt;Demo&lt;\/h2&gt;\n&lt;div&gt;\n  &lt;iframe src=\"https:\/\/www.youtube-nocookie.com\/embed\/NaB8JBfE7DY\" title=\"Cecil demo\" width=\"560\" height=\"315\" loading=\"lazy\" allowfullscreen&gt;&lt;\/iframe&gt;\n&lt;\/div&gt;\nTo reuse UI elements across templates and pages, see also components.",
      "content_html": "<h1>Dynamic content</h1>\n<p>By default, the body of a page is static: Twig syntax written in a Markdown file is output as is.</p>\n<p>You can create dynamic content in a page by using the <a href=\"https://twig.symfony.com/doc/3.x/functions/template_from_string.html\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">template_from_string</code></a> Twig function, which renders the page content as a Twig template.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ <span class=\"hljs-name\">include</span><span class=\"hljs-params\">(template_from_string(page.content, \"dynamic content for page \" ~ page.id)</span>) }}</span></code></pre>\n<p>With this, you can use any page variable in the <em>body</em> of the page.</p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">---\n<span class=\"hljs-section\">var: 'value'\n---</span>\nThe value of <span class=\"hljs-code\">`var`</span> is {{ page.var }}.</code></pre>\n<h2 id=\"enable-dynamic-content\">Enable dynamic content<a class=\"heading-anchor\" href=\"#enable-dynamic-content\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The recommended way is to create a dedicated layout that overrides the <code translate=\"no\">content</code> block, and to use it only for pages that need it.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# layouts/dynamic.html.twig #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">extends</span></span> '_default/page.html.twig' %}</span><span class=\"xml\">\n\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">block</span></span> content %}</span><span class=\"xml\">\n</span><span class=\"hljs-template-variable\">{{ <span class=\"hljs-name\">include</span><span class=\"hljs-params\">(template_from_string(page.content, \"dynamic content for page \" ~ page.id)</span>) }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endblock</span></span> content %}</span></code></pre>\n<p>Then set the <a href=\"2-front-matter.md#predefined-variables\"><code translate=\"no\">layout</code></a> variable in the front matter of the page:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-meta\">---</span>\n<span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">\"My dynamic page\"</span>\n<span class=\"hljs-attr\">layout:</span> <span class=\"hljs-string\">dynamic</span>\n<span class=\"hljs-meta\">---</span></code></pre>\n<aside class=\"note note-tip\"><p>The second argument of <code translate=\"no\">template_from_string</code> is the name of the template: it is displayed in error messages, so including <code translate=\"no\">page.id</code> helps to find the page in error.</p></aside>\n<h2 id=\"available-variables\">Available variables<a class=\"heading-anchor\" href=\"#available-variables\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The page content is rendered with the same context as the layout, so you can use:</p>\n<ul>\n<li>page variables: <code translate=\"no\">page.title</code>, <code translate=\"no\">page.date</code>, <code translate=\"no\">page.&lt;custom variable&gt;</code>, etc.</li>\n<li>site variables: <code translate=\"no\">site.title</code>, <code translate=\"no\">site.pages</code>, <a href=\"../templates/2-variables.md#site-data\"><code translate=\"no\">site.data</code></a>, etc.</li>\n<li>all <a href=\"../templates/reference/1-functions.md\">functions</a>, <a href=\"../templates/reference/3-filters.md\">filters</a> and <a href=\"../templates/reference/2-sorts.md\">sorts</a> available in templates</li>\n<li>Twig tags: <code translate=\"no\">{% set %}</code>, <code translate=\"no\">{% if %}</code>, <code translate=\"no\">{% for %}</code>, <code translate=\"no\">{% include %}</code>, etc.</li>\n</ul>\n<h2 id=\"how-it-works\">How it works<a class=\"heading-anchor\" href=\"#how-it-works\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The Markdown body is <strong>converted to HTML first</strong>, then the result (<code translate=\"no\">page.content</code>) is rendered by Twig. This order has some consequences:</p>\n<ul>\n<li>Markdown escapes the <code translate=\"no\">&lt;</code> and <code translate=\"no\">&gt;</code> characters, so comparison operators (<code translate=\"no\">&gt;</code>, <code translate=\"no\">&lt;=</code>) and arrow functions (<code translate=\"no\">=&gt;</code>) can’t be used in the body: the build fails with an <code translate=\"no\">Unexpected character \"&amp;\"</code> error.</li>\n<li>A Twig expression used in an HTML attribute (e.g.: <code translate=\"no\">href=\"{{ url(post) }}\"</code>) is URL encoded by the Markdown converter and won’t be evaluated.</li>\n<li>A Twig expression alone on its own line is wrapped in a <code translate=\"no\">&lt;p&gt;</code> element.</li>\n<li>Twig syntax written inside a code span or a code block <strong>is</strong> evaluated too.</li>\n</ul>\n<aside class=\"note note-tip\"><p>Keep the body simple (variables, filters, short conditions) and move complex markup and logic into a <a href=\"#example-include-a-partial-template\">partial template</a> or a <a href=\"#example-shortcodes-with-macros\">macro</a>.</p></aside>\n<p>To display Twig syntax as is, wrap it in a <code translate=\"no\">verbatim</code> tag:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">verbatim</span></span> %}</span><span class=\"xml\">`</span><span class=\"hljs-template-variable\">{{ page.title }}</span><span class=\"xml\">`</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endverbatim</span></span> %}</span></code></pre>\n<p>To avoid an extra <code translate=\"no\">&lt;p&gt;</code> element around a block of HTML, wrap the expression in an HTML element, separated by line breaks:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span>&gt;</span>\n</span><span class=\"hljs-template-variable\">{{ <span class=\"hljs-name\">include</span><span class=\"hljs-params\">('partials/latest-posts.html.twig')</span> }}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span></span></code></pre>\n<h2 id=\"example-include-a-partial-template\">Example: variables, data and partial template<a class=\"heading-anchor\" href=\"#example-include-a-partial-template\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>This example shows a page displaying site and page variables, data from a <a href=\"../templates/2-variables.md#site-data\">data file</a>, and the latest blog posts through a reusable partial template.</p>\n<p>Data file:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-comment\"># data/team.yml</span>\n<span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">Alice</span>\n  <span class=\"hljs-attr\">role:</span> <span class=\"hljs-string\">Developer</span>\n<span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">Bob</span>\n  <span class=\"hljs-attr\">role:</span> <span class=\"hljs-string\">Designer</span></code></pre>\n<p>Partial template, which receives <code translate=\"no\">section</code> and <code translate=\"no\">limit</code> as parameters:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# layouts/partials/latest-posts.html.twig #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> posts = site.pages.showable|filter_by('section', section|<span class=\"hljs-keyword\">default</span>('blog'))|sort_by_date|<span class=\"hljs-keyword\">slice</span>(0, limit|<span class=\"hljs-keyword\">default</span>(5)) %}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">if</span></span> posts|<span class=\"hljs-keyword\">length</span> &gt; 0 %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">ul</span> <span class=\"hljs-attr\">class</span>=<span class=\"hljs-string\">\"latest-posts\"</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">for</span></span> post in posts %}</span><span class=\"xml\">\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li</span>&gt;</span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ url(post) }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ post.title }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span> <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">time</span> <span class=\"hljs-attr\">datetime</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ post.<span class=\"hljs-name\">date</span>|<span class=\"hljs-keyword\">date</span>('Y-m-d') }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ post.<span class=\"hljs-name\">date</span>|format_date('long') }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">time</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">li</span>&gt;</span>\n  </span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endfor</span></span> %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">ul</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">else</span> %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p</span>&gt;</span>No posts yet.<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">p</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endif</span></span> %}</span></code></pre>\n<p>Page:</p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">---\ntitle: About\n<span class=\"hljs-section\">layout: dynamic\n---</span>\nWelcome to <span class=\"hljs-strong\">**{{ site.title }}**</span>! This page was published on {{ page.date|format_date('long') }}.\n\nOur team has {{ site.data.team|length }} members: {{ site.data.team|column('name')|join(', ') }}.\n\n<span class=\"hljs-section\">## Latest posts</span>\n\n<span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span>&gt;</span></span>\n{{ include('partials/latest-posts.html.twig', {section: 'blog', limit: 3}) }}\n<span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span></span></code></pre>\n<p>Output:</p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p</span>&gt;</span>Welcome to <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">strong</span>&gt;</span>My site<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">strong</span>&gt;</span>! This page was published on October 9, 2026.<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">p</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p</span>&gt;</span>Our team has 2 members: Alice, Bob.<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">p</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2</span> <span class=\"hljs-attr\">id</span>=<span class=\"hljs-string\">\"latest-posts\"</span>&gt;</span>Latest posts<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">h2</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">ul</span> <span class=\"hljs-attr\">class</span>=<span class=\"hljs-string\">\"latest-posts\"</span>&gt;</span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li</span>&gt;</span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"/blog/post-3/\"</span>&gt;</span>Post 3<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span> <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">time</span> <span class=\"hljs-attr\">datetime</span>=<span class=\"hljs-string\">\"2026-03-01\"</span>&gt;</span>March 1, 2026<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">time</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">li</span>&gt;</span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li</span>&gt;</span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"/blog/post-2/\"</span>&gt;</span>Post 2<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span> <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">time</span> <span class=\"hljs-attr\">datetime</span>=<span class=\"hljs-string\">\"2026-02-01\"</span>&gt;</span>February 1, 2026<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">time</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">li</span>&gt;</span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li</span>&gt;</span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">\"/blog/post-1/\"</span>&gt;</span>Post 1<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">a</span>&gt;</span> <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">time</span> <span class=\"hljs-attr\">datetime</span>=<span class=\"hljs-string\">\"2026-01-01\"</span>&gt;</span>January 1, 2026<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">time</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">li</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">ul</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span></code></pre>\n<aside class=\"note note-info\"><p>The <code translate=\"no\">&gt;</code> operator and the <code translate=\"no\">href=\"{{ … }}\"</code> attribute work here because they are written in the partial template, not in the Markdown body.</p></aside>\n<h2 id=\"example-shortcodes-with-macros\">Example: shortcodes with macros<a class=\"heading-anchor\" href=\"#example-shortcodes-with-macros\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p><a href=\"https://twig.symfony.com/doc/3.x/tags/macro.html\" target=\"_blank\" rel=\"noopener noreferrer\">Twig macros</a> can be used as <em>shortcodes</em> to insert rich HTML snippets in the body of a page.</p>\n<p>Create the macros:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# layouts/macros/shortcodes.html.twig #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">macro</span></span> youtube(id, title = 'YouTube video') %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">iframe</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">\"https://www.youtube-nocookie.com/embed/</span></span></span><span class=\"hljs-template-variable\">{{ id }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">title</span>=<span class=\"hljs-string\">\"</span></span></span><span class=\"hljs-template-variable\">{{ title }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">width</span>=<span class=\"hljs-string\">\"560\"</span> <span class=\"hljs-attr\">height</span>=<span class=\"hljs-string\">\"315\"</span> <span class=\"hljs-attr\">loading</span>=<span class=\"hljs-string\">\"lazy\"</span> <span class=\"hljs-attr\">allowfullscreen</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">iframe</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endmacro</span></span> %}</span><span class=\"xml\">\n\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">macro</span></span> alert(message, type = 'info') %}</span><span class=\"xml\">\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span> <span class=\"hljs-attr\">class</span>=<span class=\"hljs-string\">\"alert alert-</span></span></span><span class=\"hljs-template-variable\">{{ type }}</span><span class=\"xml\"><span class=\"hljs-tag\"><span class=\"hljs-string\">\"</span> <span class=\"hljs-attr\">role</span>=<span class=\"hljs-string\">\"alert\"</span>&gt;</span></span><span class=\"hljs-template-variable\">{{ message }}</span><span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span>\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endmacro</span></span> %}</span></code></pre>\n<p>Create a layout that imports the macros before rendering the content:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-comment\">{# layouts/shortcodes.html.twig #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">extends</span></span> '_default/page.html.twig' %}</span><span class=\"xml\">\n\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">block</span></span> content %}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">set</span></span> imports = \"{% import 'macros/shortcodes.html.twig' as sc %}</span><span class=\"xml\">\" %}\n</span><span class=\"hljs-template-variable\">{{ <span class=\"hljs-name\">include</span><span class=\"hljs-params\">(template_from_string(imports ~ page.content, \"dynamic content for page \" ~ page.id)</span>) }}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\"><span class=\"hljs-keyword\">endblock</span></span> content %}</span></code></pre>\n<p>Use the shortcodes in a page:</p>\n<pre data-lang=\"markdown\"><code class=\"language-markdown hljs markdown\" translate=\"no\">---\ntitle: \"Demo video\"\n<span class=\"hljs-section\">layout: shortcodes\n---</span>\n<span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span>&gt;</span></span>\n  {{ sc.alert('This video is in English.', 'warning') }}\n<span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span></span>\n\n<span class=\"hljs-section\">## Demo</span>\n\n<span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span>&gt;</span></span>\n  {{ sc.youtube('NaB8JBfE7DY', 'Cecil demo') }}\n<span class=\"xml\"><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span></span></code></pre>\n<p>Output:</p>\n<pre data-lang=\"html\"><code class=\"language-html hljs xml\" translate=\"no\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span>&gt;</span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span> <span class=\"hljs-attr\">class</span>=<span class=\"hljs-string\">\"alert alert-warning\"</span> <span class=\"hljs-attr\">role</span>=<span class=\"hljs-string\">\"alert\"</span>&gt;</span>This video is in English.<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2</span> <span class=\"hljs-attr\">id</span>=<span class=\"hljs-string\">\"demo\"</span>&gt;</span>Demo<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">h2</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div</span>&gt;</span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">iframe</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">\"https://www.youtube-nocookie.com/embed/NaB8JBfE7DY\"</span> <span class=\"hljs-attr\">title</span>=<span class=\"hljs-string\">\"Cecil demo\"</span> <span class=\"hljs-attr\">width</span>=<span class=\"hljs-string\">\"560\"</span> <span class=\"hljs-attr\">height</span>=<span class=\"hljs-string\">\"315\"</span> <span class=\"hljs-attr\">loading</span>=<span class=\"hljs-string\">\"lazy\"</span> <span class=\"hljs-attr\">allowfullscreen</span>&gt;</span><span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">iframe</span>&gt;</span>\n<span class=\"hljs-tag\">&lt;/<span class=\"hljs-name\">div</span>&gt;</span></code></pre>\n<aside class=\"note note-tip\"><p>To reuse UI elements across templates and pages, see also <a href=\"../templates/4-components.md\">components</a>.</p></aside>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/templates/localization/",
      "url": "https://cloudflare.cecil.app/documentation/templates/localization/",
      "title": "Localization",
      "summary": "Translate texts and localize dates in templates.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-12-04T00:00:00+00:00","content_text": "Localization\nCecil supports text translation and date localization.\nText translation\nUse the trans tag or filter to translate texts in templates.\n{% trans with variables into locale %}{% endtrans %}\n{{ message|trans(variables = []) }}\nExamples\n{% trans %}Hello World!{% endtrans %}\n{{ message|trans }}\nInclude variables:\n{% trans with {'%name%': 'Arnaud'} %}Hello %name%!{% endtrans %}\n{{ message|trans({'%name%': 'Arnaud'}) }}\nForce locale:\n{% trans into 'fr_FR' %}Hello World!{% endtrans %}\nPluralize:\n{% trans with {'%count%': 42} %}{0}I don't have apples|{1}I have one apple|]1,Inf[I have %count% apples{% endtrans %}\nTranslation files\nTranslation files must be named messages.&lt;locale&gt;.&lt;extension&gt; and stored in the translations directory.\nSupported file extensions are defined by each translation format in layouts.translations.formats.\nThe locale code (e.g.: fr_FR) of a language is defined in the languages entries of the configuration. A file named with the language code only (e.g.: messages.fr.yaml) is also loaded, and the translations of the themes are merged with those of the site.\nExample:\n&lt;my-site&gt;\n└─ translations\n   ├─ messages.fr_FR.mo   &lt;- Machine Object format\n   └─ messages.fr_FR.yaml &lt;- YAML format\nYou can easily extract translations from your templates with the following command:\nphp cecil.phar util:translations:extract --locale=&lt;code&gt; --show\nUse --save instead of (or in addition to) --show to save the translations to a file. The --locale option is required. The default output format is yaml, saved in .yml files (use --extension=yaml for .yaml files, or --format=po for gettext PO format).\nThe labels and descriptions of the front matter schemas are extracted too, into the schemas file (e.g. schemas.fr.yml).\nPoedit is a simple and cross-platform translation editor for gettext (PO), and Poedit Pro supports extraction of translation strings from templates out of the box.\nTranslations are cached: the cache is refreshed when a translation file is updated or removed, but not when a new one is added.\nCache can be cleared with the following command:\nphp cecil.phar cache:clear:translations\nDate localization\nUse the Twig format_date filter to localize a date in templates.\n{{ page.date|format_date('long') }}\n{# September 30, 2022 #}\nSupported values are: none, short, medium, long, and full.\nThe format_datetime and format_time filters are also available.\nIf you want to use these filters with locales other than \"en\", you should install the intl PHP extension.",
      "content_html": "<h1>Localization</h1>\n<p>Cecil supports <a href=\"#text-translation\">text translation</a> and <a href=\"#date-localization\">date localization</a>.</p>\n<h2 id=\"text-translation\">Text translation<a class=\"heading-anchor\" href=\"#text-translation\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Use the <code translate=\"no\">trans</code> <em>tag</em> or <em>filter</em> to translate texts in templates.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">trans</span> with variables into locale %}</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">endtrans</span> %}</span></code></pre>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ message|trans(variables = []) }}</span></code></pre>\n<h3 id=\"examples\">Examples<a class=\"heading-anchor\" href=\"#examples\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">trans</span> %}</span><span class=\"xml\">Hello World!</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">endtrans</span> %}</span></code></pre>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ message|trans }}</span></code></pre>\n<p>Include variables:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">trans</span> with {'%name%': 'Arnaud'} %}</span><span class=\"xml\">Hello %name%!</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">endtrans</span> %}</span></code></pre>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ message|trans({'%name%': 'Arnaud'}) }}</span></code></pre>\n<p>Force locale:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">trans</span> into 'fr_FR' %}</span><span class=\"xml\">Hello World!</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">endtrans</span> %}</span></code></pre>\n<p>Pluralize:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">trans</span> with {'%count%': 42} %}</span><span class=\"xml\">{0}I don't have apples|{1}I have one apple|]1,Inf[I have %count% apples</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">endtrans</span> %}</span></code></pre>\n<h2 id=\"translation-files\">Translation files<a class=\"heading-anchor\" href=\"#translation-files\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Translation files must be named <code translate=\"no\">messages.&lt;locale&gt;.&lt;extension&gt;</code> and stored in the <a href=\"../configuration/7-layouts.md#layouts-translations\"><code translate=\"no\">translations</code></a> directory.<br>\nSupported file extensions are defined by each translation format in <a href=\"../configuration/7-layouts.md#layouts-translations\"><code translate=\"no\">layouts.translations.formats</code></a>.</p>\n<p>The locale code (e.g.: <code translate=\"no\">fr_FR</code>) of a language is defined in the <a href=\"../configuration/2-languages.md#languages\"><code translate=\"no\">languages</code></a> entries of the configuration. A file named with the language code only (e.g.: <code translate=\"no\">messages.fr.yaml</code>) is also loaded, and the translations of the <a href=\"7-extend.md#theme\">themes</a> are merged with those of the site.</p>\n<p><em>Example:</em></p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">&lt;my-site&gt;\n└─ translations\n   ├─ messages.fr_FR.mo   &lt;- Machine Object format\n   └─ messages.fr_FR.yaml &lt;- YAML format</code></pre>\n<aside class=\"note note-info\"><p>You can easily extract translations from your templates with the following command:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar util:translations:extract --locale=&lt;code&gt; --show</code></pre>\n<p>Use <code translate=\"no\">--save</code> instead of (or in addition to) <code translate=\"no\">--show</code> to save the translations to a file. The <code translate=\"no\">--locale</code> option is required. The default output format is <code translate=\"no\">yaml</code>, saved in <code translate=\"no\">.yml</code> files (use <code translate=\"no\">--extension=yaml</code> for <code translate=\"no\">.yaml</code> files, or <code translate=\"no\">--format=po</code> for gettext PO format).</p>\n<p>The labels and descriptions of the <a href=\"../configuration/4-pages.md#translation-of-the-descriptions\">front matter schemas</a> are extracted too, into the <code translate=\"no\">schemas</code> file (e.g. <code translate=\"no\">schemas.fr.yml</code>).</p></aside>\n<aside class=\"note note-tip\"><p><a href=\"https://poedit.net\" target=\"_blank\" rel=\"noopener noreferrer\"><em>Poedit</em></a> is a simple and cross-platform translation editor for gettext (PO), and <a href=\"https://poedit.net/pro\" target=\"_blank\" rel=\"noopener noreferrer\"><em>Poedit Pro</em></a> supports extraction of translation strings from templates out of the box.</p></aside>\n<aside class=\"note note-important\"><p>Translations are <a href=\"6-cache.md\">cached</a>: the cache is refreshed when a translation file is updated or removed, but not when a new one is added.</p>\n<p>Cache can be cleared with the following command:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar cache:clear:translations</code></pre></aside>\n<h2 id=\"date-localization\">Date localization<a class=\"heading-anchor\" href=\"#date-localization\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Use the Twig <a href=\"https://twig.symfony.com/doc/3.x/filters/format_date.html\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">format_date</code></a> filter to localize a date in templates.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-variable\">{{ page.<span class=\"hljs-name\">date</span>|format_date('long') }}</span><span class=\"xml\">\n</span><span class=\"hljs-comment\">{# September 30, 2022 #}</span></code></pre>\n<p>Supported values are: <code translate=\"no\">none</code>, <code translate=\"no\">short</code>, <code translate=\"no\">medium</code>, <code translate=\"no\">long</code>, and <code translate=\"no\">full</code>.</p>\n<p>The <a href=\"https://twig.symfony.com/doc/3.x/filters/format_datetime.html\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">format_datetime</code></a> and <a href=\"https://twig.symfony.com/doc/3.x/filters/format_time.html\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">format_time</code></a> filters are also available.</p>\n<aside class=\"note note-important\"><p>If you want to use these filters <strong>with locales other than \"en\"</strong>, you should <a href=\"https://php.net/intl.setup\" target=\"_blank\" rel=\"noopener noreferrer\">install the intl PHP extension</a>.</p></aside>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/configuration/assets/",
      "url": "https://cloudflare.cecil.app/documentation/configuration/assets/",
      "title": "Assets",
      "summary": "Assets directory, compilation, minification, images and CDN.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "Assets\nAssets management (images, CSS and JS files).\nassets.dir\nAssets source directory (assets by default).\nassets:\n  dir: assets\nassets.target\nDirectory where remote and resized assets files are saved (root by default).\nassets:\n  target: ''\nassets.fingerprint\nEnables fingerprinting (cache busting) for assets files (true by default).\nassets:\n  fingerprint: true\nassets.compile\nSass files compilation options. See the documentation of scssphp for options details.\nassets:\n  compile:\n    style: expanded      # compilation style (`expanded` or `compressed`. `expanded` by default)\n    import: [sass, scss] # list of imported paths (`[sass, scss, node_modules]` by default)\n    sourcemap: false     # enables sourcemap in debug mode (`false` by default)\n    variables: {}        # preset variables, as `name: value` pairs (empty by default)\nsourcemap is used to debug SCSS compilation (debug mode must be enabled).\nassets.minify\nEnables CSS and JS minification (true by default).\nassets:\n  minify: true\nassets.images\nImages management.\nassets:\n  images:\n    optimize: false # enables images optimization with JpegOptim, Optipng, Pngquant 2, SVGO 1, Gifsicle, cwebp, avifenc (`false` by default)\n    quality: 75     # image quality used by optimization and resizing (`75` by default)\n    responsive:\n      widths: [480, 640, 768, 1024, 1366, 1600, 1920] # `srcset` attribute images widths\n      sizes:\n        default: '100vw' # default `sizes` attribute (`100vw` by default)\n      densities: [1, 2, 3] # `srcset` attribute pixel densities\nassets.images.cdn\nURL of image assets can be easily replaced by a provided CDN url.\nassets:\n  images:\n    cdn:\n      enabled: false  # enables Image CDN (`false` by default)\n      svg: false      # includes SVG images (`false` by default)\n      canonical: true # `image_url` is canonical (instead of a relative path) (`true` by default)\n      remote: true    # also handles remote images (`true` by default)\n      account: 'xxxx' # provider account\n      url: 'https:\/\/provider.tld\/%account%\/%image_url%?w=%width%&amp;q=%quality%&amp;format=%format%'\nurl is a pattern that contains variables:\n\n%account% replaced by the assets.images.cdn.account option\n%image_url% replaced by the image canonical URL or path\n%width% replaced by the image width\n%quality% replaced by the assets.images.quality option\n%format% replaced by the image format\n\nSee CDN providers.\nassets.remote.useragent\nUser agent used to download remote assets.\nassets:\n  remote:\n    useragent:\n      default: &lt;string&gt; # user agent of HTTP requests\nFor a given asset, the user agent can be replaced with the useragent option of the asset() function.\nassets.remote.timeout\nTimeout of remote assets downloads, in seconds (30 by default).\nassets:\n  remote:\n    timeout: 30\n",
      "content_html": "<h1>Assets</h1>\n<p>Assets management (images, CSS and JS files).</p>\n<h2 id=\"assets-dir\">assets.dir<a class=\"heading-anchor\" href=\"#assets-dir\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Assets source directory (<code translate=\"no\">assets</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">dir:</span> <span class=\"hljs-string\">assets</span></code></pre>\n<h2 id=\"assets-target\">assets.target<a class=\"heading-anchor\" href=\"#assets-target\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Directory where remote and resized assets files are saved (root by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">target:</span> <span class=\"hljs-string\">''</span></code></pre>\n<h2 id=\"assets-fingerprint\">assets.fingerprint<a class=\"heading-anchor\" href=\"#assets-fingerprint\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Enables fingerprinting (cache busting) for assets files (<code translate=\"no\">true</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">fingerprint:</span> <span class=\"hljs-literal\">true</span></code></pre>\n<h2 id=\"assets-compile\">assets.compile<a class=\"heading-anchor\" href=\"#assets-compile\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p><a href=\"https://sass-lang.com\" target=\"_blank\" rel=\"noopener noreferrer\">Sass</a> files compilation options. See the <a href=\"https://scssphp.github.io/scssphp/docs/#output-formatting\" target=\"_blank\" rel=\"noopener noreferrer\">documentation of scssphp</a> for options details.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">compile:</span>\n    <span class=\"hljs-attr\">style:</span> <span class=\"hljs-string\">expanded</span>      <span class=\"hljs-comment\"># compilation style (`expanded` or `compressed`. `expanded` by default)</span>\n    <span class=\"hljs-attr\">import:</span> <span class=\"hljs-string\">[sass,</span> <span class=\"hljs-string\">scss]</span> <span class=\"hljs-comment\"># list of imported paths (`[sass, scss, node_modules]` by default)</span>\n    <span class=\"hljs-attr\">sourcemap:</span> <span class=\"hljs-literal\">false</span>     <span class=\"hljs-comment\"># enables sourcemap in debug mode (`false` by default)</span>\n    <span class=\"hljs-attr\">variables:</span> <span class=\"hljs-string\">{}</span>        <span class=\"hljs-comment\"># preset variables, as `name: value` pairs (empty by default)</span></code></pre>\n<aside class=\"note note-info\"><p><code translate=\"no\">sourcemap</code> is used to debug SCSS compilation (<a href=\"1-site.md#debug\">debug mode</a> must be enabled).</p></aside>\n<h2 id=\"assets-minify\">assets.minify<a class=\"heading-anchor\" href=\"#assets-minify\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Enables CSS and JS minification (<code translate=\"no\">true</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">minify:</span> <span class=\"hljs-literal\">true</span></code></pre>\n<h2 id=\"assets-images\">assets.images<a class=\"heading-anchor\" href=\"#assets-images\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Images management.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">images:</span>\n    <span class=\"hljs-attr\">optimize:</span> <span class=\"hljs-literal\">false</span> <span class=\"hljs-comment\"># enables images optimization with JpegOptim, Optipng, Pngquant 2, SVGO 1, Gifsicle, cwebp, avifenc (`false` by default)</span>\n    <span class=\"hljs-attr\">quality:</span> <span class=\"hljs-number\">75</span>     <span class=\"hljs-comment\"># image quality used by optimization and resizing (`75` by default)</span>\n    <span class=\"hljs-attr\">responsive:</span>\n      <span class=\"hljs-attr\">widths:</span> <span class=\"hljs-string\">[480,</span> <span class=\"hljs-number\">640</span><span class=\"hljs-string\">,</span> <span class=\"hljs-number\">768</span><span class=\"hljs-string\">,</span> <span class=\"hljs-number\">1024</span><span class=\"hljs-string\">,</span> <span class=\"hljs-number\">1366</span><span class=\"hljs-string\">,</span> <span class=\"hljs-number\">1600</span><span class=\"hljs-string\">,</span> <span class=\"hljs-number\">1920</span><span class=\"hljs-string\">]</span> <span class=\"hljs-comment\"># `srcset` attribute images widths</span>\n      <span class=\"hljs-attr\">sizes:</span>\n        <span class=\"hljs-attr\">default:</span> <span class=\"hljs-string\">'100vw'</span> <span class=\"hljs-comment\"># default `sizes` attribute (`100vw` by default)</span>\n      <span class=\"hljs-attr\">densities:</span> <span class=\"hljs-string\">[1,</span> <span class=\"hljs-number\">2</span><span class=\"hljs-string\">,</span> <span class=\"hljs-number\">3</span><span class=\"hljs-string\">]</span> <span class=\"hljs-comment\"># `srcset` attribute pixel densities</span></code></pre>\n<h2 id=\"assets-images-cdn\">assets.images.cdn<a class=\"heading-anchor\" href=\"#assets-images-cdn\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>URL of image assets can be easily replaced by a provided CDN <code translate=\"no\">url</code>.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">images:</span>\n    <span class=\"hljs-attr\">cdn:</span>\n      <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">false</span>  <span class=\"hljs-comment\"># enables Image CDN (`false` by default)</span>\n      <span class=\"hljs-attr\">svg:</span> <span class=\"hljs-literal\">false</span>      <span class=\"hljs-comment\"># includes SVG images (`false` by default)</span>\n      <span class=\"hljs-attr\">canonical:</span> <span class=\"hljs-literal\">true</span> <span class=\"hljs-comment\"># `image_url` is canonical (instead of a relative path) (`true` by default)</span>\n      <span class=\"hljs-attr\">remote:</span> <span class=\"hljs-literal\">true</span>    <span class=\"hljs-comment\"># also handles remote images (`true` by default)</span>\n      <span class=\"hljs-attr\">account:</span> <span class=\"hljs-string\">'xxxx'</span> <span class=\"hljs-comment\"># provider account</span>\n      <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">'https://provider.tld/%account%/%image_url%?w=%width%&amp;q=%quality%&amp;format=%format%'</span></code></pre>\n<p><code translate=\"no\">url</code> is a pattern that contains variables:</p>\n<ul>\n<li><code translate=\"no\">%account%</code> replaced by the <code translate=\"no\">assets.images.cdn.account</code> option</li>\n<li><code translate=\"no\">%image_url%</code> replaced by the image canonical URL or <code translate=\"no\">path</code></li>\n<li><code translate=\"no\">%width%</code> replaced by the image width</li>\n<li><code translate=\"no\">%quality%</code> replaced by the <code translate=\"no\">assets.images.quality</code> option</li>\n<li><code translate=\"no\">%format%</code> replaced by the image format</li>\n</ul>\n<p>See <a href=\"../assets/3-cdn-providers.md\"><strong>CDN providers</strong></a>.</p>\n<h2 id=\"assets-remote-useragent\">assets.remote.useragent<a class=\"heading-anchor\" href=\"#assets-remote-useragent\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>User agent used to download remote assets.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">remote:</span>\n    <span class=\"hljs-attr\">useragent:</span>\n      <span class=\"hljs-attr\">default:</span> <span class=\"hljs-string\">&lt;string&gt;</span> <span class=\"hljs-comment\"># user agent of HTTP requests</span></code></pre>\n<aside class=\"note note-info\"><p>For a given asset, the user agent can be replaced with the <code translate=\"no\">useragent</code> option of the <a href=\"../assets/index.md#asset\"><code translate=\"no\">asset()</code></a> function.</p></aside>\n<h2 id=\"assets-remote-timeout\">assets.remote.timeout<a class=\"heading-anchor\" href=\"#assets-remote-timeout\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Timeout of remote assets downloads, in seconds (<code translate=\"no\">30</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">assets:</span>\n  <span class=\"hljs-attr\">remote:</span>\n    <span class=\"hljs-attr\">timeout:</span> <span class=\"hljs-number\">30</span></code></pre>\n<hr>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/templates/cache/",
      "url": "https://cloudflare.cecil.app/documentation/templates/cache/",
      "title": "Cache",
      "summary": "Templates cache and fragments cache.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "Cache\nCecil uses a cache system to speed up the generation process; it can be disabled or cleared.\nThere are three cache types involved in template rendering: templates, assets, and translations.\nClear cache\nYou can clear the cache with the following commands:\nphp cecil.phar cache:clear               # clear all caches\nphp cecil.phar cache:clear:assets        # clear assets cache\nphp cecil.phar cache:clear:templates     # clear templates cache\nphp cecil.phar cache:clear:translations  # clear translations cache\nIn practice you don’t need to clear the cache manually: Cecil does it for you when needed (e.g. when files change).\nFragments cache\nCecil provides a way to cache parts of templates rendering to avoid re-rendering the same partial content multiple times.\nTo use fragments cache, wrap the content you want to cache with the cache tag.\n{% cache 'unique-key' %}\n  {# cacheable content #}\n{% endcache %}\nYou should use the cache_key function to be sure to have a unique cache key for each content you want to cache.\nFragments cache is persistent, so if the cache key is too generic, you may end up with wrong content displayed.\nTo clear fragments cache only, use the following command:\nphp cecil.phar cache:clear:templates --fragments\nDisable cache\nYou can disable cache with the configuration.\nDisabling cache can slow down the generation process, so it’s not recommended.\nDuring local development, if you need to clear cache before each generation, you can use the following option:\nphp cecil.phar serve --clear-cache          # clear all caches\nphp cecil.phar serve --clear-cache=&lt;regex&gt;  # clear cache for cache keys matching the regular expression &lt;regex&gt;\nExample:\nphp cecil.phar serve --clear-cache=css  # clear cache for all CSS files",
      "content_html": "<h1>Cache</h1>\n<p>Cecil uses a cache system to speed up the generation process; it can be disabled or cleared.</p>\n<p>There are three cache types involved in template rendering: templates, <a href=\"../assets/index.md#asset\">assets</a>, and <a href=\"5-localization.md#translation-files\">translations</a>.</p>\n<h2 id=\"clear-cache\">Clear cache<a class=\"heading-anchor\" href=\"#clear-cache\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>You can clear the cache with the following commands:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar cache:clear               <span class=\"hljs-comment\"># clear all caches</span>\nphp cecil.phar cache:clear:assets        <span class=\"hljs-comment\"># clear assets cache</span>\nphp cecil.phar cache:clear:templates     <span class=\"hljs-comment\"># clear templates cache</span>\nphp cecil.phar cache:clear:translations  <span class=\"hljs-comment\"># clear translations cache</span></code></pre>\n<aside class=\"note note-important\"><p>In practice you don’t need to clear the cache manually: Cecil does it for you when needed (e.g. when files change).</p></aside>\n<h2 id=\"fragments-cache\">Fragments cache<a class=\"heading-anchor\" href=\"#fragments-cache\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Cecil provides a way to cache parts of templates rendering to avoid re-rendering the same partial content multiple times.</p>\n<p>To use <em>fragments</em> cache, wrap the content you want to cache with the <a href=\"https://twig.symfony.com/doc/tags/cache.html\" target=\"_blank\" rel=\"noopener noreferrer\"><code translate=\"no\">cache</code> tag</a>.</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">cache</span> 'unique-key' %}</span><span class=\"xml\">\n  </span><span class=\"hljs-comment\">{# cacheable content #}</span><span class=\"xml\">\n</span><span class=\"hljs-template-tag\">{% <span class=\"hljs-name\">endcache</span> %}</span></code></pre>\n<aside class=\"note note-tip\"><p>You should use the <a href=\"reference/1-functions.md#cache-key\"><code translate=\"no\">cache_key</code> function</a> to be sure to have a unique cache key for each content you want to cache.</p></aside>\n<aside class=\"note note-warning\"><p><em>Fragments</em> cache is persistent, so if the cache key is too generic, you may end up with wrong content displayed.</p></aside>\n<p>To clear fragments cache only, use the following command:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar cache:clear:templates --fragments</code></pre>\n<h2 id=\"disable-cache\">Disable cache<a class=\"heading-anchor\" href=\"#disable-cache\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>You can disable cache with the <a href=\"../configuration/9-cache.md\">configuration</a>.</p>\n<aside class=\"note note-warning\"><p>Disabling cache can slow down the generation process, so it’s not recommended.</p>\n<p>During local development, if you need to clear cache before each generation, you can use the following option:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar serve --clear-cache          <span class=\"hljs-comment\"># clear all caches</span>\nphp cecil.phar serve --clear-cache=&lt;regex&gt;  <span class=\"hljs-comment\"># clear cache for cache keys matching the regular expression &lt;regex&gt;</span></code></pre>\n<p>Example:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar serve --clear-cache=css  <span class=\"hljs-comment\"># clear cache for all CSS files</span></code></pre></aside>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/configuration/layouts/",
      "url": "https://cloudflare.cecil.app/documentation/configuration/layouts/",
      "title": "Layouts",
      "summary": "Templates directory, auto-escaping, images, highlight, translations and components.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-26T00:00:00+00:00","content_text": "Layouts\nTemplates options.\nlayouts.dir\nTemplates source directory (layouts by default).\nlayouts:\n  dir: layouts\nlayouts.autoescape\nOverrides Twig autoescape option (false by default).\nIf set to null, Cecil uses an extension-based strategy:\n\n*.js.twig -&gt; js\n*.css.twig -&gt; css\n*.html.twig and *.twig -&gt; html\nany other extension -&gt; false\n\nlayouts:\n  autoescape: false  # disables automatic escaping (default)\n  #autoescape: null  # use Cecil automatic strategy by template filename extension\n  #autoescape: html\n  #autoescape: js\nlayouts.images\nImages handling options.\nlayouts:\n  images:\n    formats: []       # used by `html` function: adds alternative image formats as `source` (e.g. `[avif, webp]`, empty array by default)\n    responsive: false # used by `html` function: adds responsive images ('width' or 'density', `false` by default)\n    placeholder: ''   # used by `html` function: fills image background before loading (`color` or `lqip`, disabled by default)\n    dark_suffix: ~    # suffix of the dark variant image (e.g. `.dark`), disabled by default\n    mobile_suffix: ~  # suffix of the mobile variant image (e.g. `.mobile`), disabled by default\n    mobile_media_query: '(max-width: 767px)' # media query of the mobile variant `&lt;source&gt;`\nlayouts.highlight\nCode syntax highlighting options of templates.\nlayouts:\n  highlight:\n    engine: highlightjs # used by `highlight` filter: `highlightjs` (default) or `tempest`\nSee the highlight filter.\nThis option only applies to templates: Markdown content uses the pages.body.highlight.engine option.\nlayouts.translations\nTranslations handling options.\nlayouts:\n  translations:\n    dir: translations # translations source directory (`translations` by default)\n    formats:          # translations supported formats\n      yaml:\n        loader: Symfony\\Component\\Translation\\Loader\\YamlFileLoader\n        ext: [yml, yaml]\n      mo:\n        loader: Symfony\\Component\\Translation\\Loader\\MoFileLoader\n        ext: [mo]\nEach translation format defines:\n\nloader: Symfony translation loader class\next: one or more file extensions associated with this format\n\nlayouts.extensions\nTwig extensions to load, indexed by name (empty by default).\nlayouts:\n  extensions:\n    &lt;name&gt;: &lt;class&gt;\nSee Extensions for the full syntax.\nlayouts.components\nTemplates Components options.\nlayouts:\n  components:\n    dir: components # components source directory (`components` by default)\n    ext: twig       # components files extension (`twig` by default)\nlayouts.sections\nMaps a section to the layouts of another section: the mapped name is used in place of &lt;section&gt; by the lookup rules of the section and of its pages.\nlayouts:\n  sections:\n    news: blog # the \"news\" section is rendered with `blog\/list.html.twig` and its pages with `blog\/page.html.twig`\nA sub-section already falls back to the layouts of its parent sections: no mapping is needed for that.\n",
      "content_html": "<h1>Layouts</h1>\n<p>Templates options.</p>\n<h2 id=\"layouts-dir\">layouts.dir<a class=\"heading-anchor\" href=\"#layouts-dir\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Templates source directory (<code translate=\"no\">layouts</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">layouts:</span>\n  <span class=\"hljs-attr\">dir:</span> <span class=\"hljs-string\">layouts</span></code></pre>\n<h2 id=\"layouts-autoescape\">layouts.autoescape<a class=\"heading-anchor\" href=\"#layouts-autoescape\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Overrides Twig <code translate=\"no\">autoescape</code> option (<code translate=\"no\">false</code> by default).</p>\n<p>If set to <code translate=\"no\">null</code>, Cecil uses an extension-based strategy:</p>\n<ul>\n<li><code translate=\"no\">*.js.twig</code> -&gt; <code translate=\"no\">js</code></li>\n<li><code translate=\"no\">*.css.twig</code> -&gt; <code translate=\"no\">css</code></li>\n<li><code translate=\"no\">*.html.twig</code> and <code translate=\"no\">*.twig</code> -&gt; <code translate=\"no\">html</code></li>\n<li>any other extension -&gt; <code translate=\"no\">false</code></li>\n</ul>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">layouts:</span>\n  <span class=\"hljs-attr\">autoescape:</span> <span class=\"hljs-literal\">false</span>  <span class=\"hljs-comment\"># disables automatic escaping (default)</span>\n  <span class=\"hljs-comment\">#autoescape: null  # use Cecil automatic strategy by template filename extension</span>\n  <span class=\"hljs-comment\">#autoescape: html</span>\n  <span class=\"hljs-comment\">#autoescape: js</span></code></pre>\n<h2 id=\"layouts-images\">layouts.images<a class=\"heading-anchor\" href=\"#layouts-images\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Images handling options.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">layouts:</span>\n  <span class=\"hljs-attr\">images:</span>\n    <span class=\"hljs-attr\">formats:</span> <span class=\"hljs-string\">[]</span>       <span class=\"hljs-comment\"># used by `html` function: adds alternative image formats as `source` (e.g. `[avif, webp]`, empty array by default)</span>\n    <span class=\"hljs-attr\">responsive:</span> <span class=\"hljs-literal\">false</span> <span class=\"hljs-comment\"># used by `html` function: adds responsive images ('width' or 'density', `false` by default)</span>\n    <span class=\"hljs-attr\">placeholder:</span> <span class=\"hljs-string\">''</span>   <span class=\"hljs-comment\"># used by `html` function: fills image background before loading (`color` or `lqip`, disabled by default)</span>\n    <span class=\"hljs-attr\">dark_suffix:</span> <span class=\"hljs-string\">~</span>    <span class=\"hljs-comment\"># suffix of the dark variant image (e.g. `.dark`), disabled by default</span>\n    <span class=\"hljs-attr\">mobile_suffix:</span> <span class=\"hljs-string\">~</span>  <span class=\"hljs-comment\"># suffix of the mobile variant image (e.g. `.mobile`), disabled by default</span>\n    <span class=\"hljs-attr\">mobile_media_query:</span> <span class=\"hljs-string\">'(max-width: 767px)'</span> <span class=\"hljs-comment\"># media query of the mobile variant `&lt;source&gt;`</span></code></pre>\n<h2 id=\"layouts-highlight\">layouts.highlight<a class=\"heading-anchor\" href=\"#layouts-highlight\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Code syntax highlighting options of templates.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">layouts:</span>\n  <span class=\"hljs-attr\">highlight:</span>\n    <span class=\"hljs-attr\">engine:</span> <span class=\"hljs-string\">highlightjs</span> <span class=\"hljs-comment\"># used by `highlight` filter: `highlightjs` (default) or `tempest`</span></code></pre>\n<p>See the <a href=\"../templates/reference/3-filters.md#highlight\"><code translate=\"no\">highlight</code></a> filter.</p>\n<aside class=\"note note-info\"><p>This option only applies to templates: Markdown content uses the <a href=\"4-pages.md#pages-body-highlight\"><code translate=\"no\">pages.body.highlight.engine</code></a> option.</p></aside>\n<h2 id=\"layouts-translations\">layouts.translations<a class=\"heading-anchor\" href=\"#layouts-translations\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Translations handling options.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">layouts:</span>\n  <span class=\"hljs-attr\">translations:</span>\n    <span class=\"hljs-attr\">dir:</span> <span class=\"hljs-string\">translations</span> <span class=\"hljs-comment\"># translations source directory (`translations` by default)</span>\n    <span class=\"hljs-attr\">formats:</span>          <span class=\"hljs-comment\"># translations supported formats</span>\n      <span class=\"hljs-attr\">yaml:</span>\n        <span class=\"hljs-attr\">loader:</span> <span class=\"hljs-string\">Symfony\\Component\\Translation\\Loader\\YamlFileLoader</span>\n        <span class=\"hljs-attr\">ext:</span> <span class=\"hljs-string\">[yml,</span> <span class=\"hljs-string\">yaml]</span>\n      <span class=\"hljs-attr\">mo:</span>\n        <span class=\"hljs-attr\">loader:</span> <span class=\"hljs-string\">Symfony\\Component\\Translation\\Loader\\MoFileLoader</span>\n        <span class=\"hljs-attr\">ext:</span> <span class=\"hljs-string\">[mo]</span></code></pre>\n<p>Each translation format defines:</p>\n<ul>\n<li><code translate=\"no\">loader</code>: Symfony translation loader class</li>\n<li><code translate=\"no\">ext</code>: one or more file extensions associated with this format</li>\n</ul>\n<h2 id=\"layouts-extensions\">layouts.extensions<a class=\"heading-anchor\" href=\"#layouts-extensions\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p><a href=\"../developers/1-extend.md#twig-extension\">Twig extensions</a> to load, indexed by name (empty by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">layouts:</span>\n  <span class=\"hljs-attr\">extensions:</span>\n    <span class=\"hljs-string\">&lt;name&gt;:</span> <span class=\"hljs-string\">&lt;class&gt;</span></code></pre>\n<p>See <a href=\"../developers/1-extend.md#configuration\">Extensions</a> for the full syntax.</p>\n<h2 id=\"layouts-components\">layouts.components<a class=\"heading-anchor\" href=\"#layouts-components\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p><a href=\"../templates/4-components.md\">Templates Components</a> options.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">layouts:</span>\n  <span class=\"hljs-attr\">components:</span>\n    <span class=\"hljs-attr\">dir:</span> <span class=\"hljs-string\">components</span> <span class=\"hljs-comment\"># components source directory (`components` by default)</span>\n    <span class=\"hljs-attr\">ext:</span> <span class=\"hljs-string\">twig</span>       <span class=\"hljs-comment\"># components files extension (`twig` by default)</span></code></pre>\n<h2 id=\"layouts-sections\">layouts.sections<a class=\"heading-anchor\" href=\"#layouts-sections\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Maps a section to the layouts of another section: the mapped name is used in place of <code translate=\"no\">&lt;section&gt;</code> by the <a href=\"../templates/1-lookup-rules.md#lookup-rules\">lookup rules</a> of the section and of its pages.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">layouts:</span>\n  <span class=\"hljs-attr\">sections:</span>\n    <span class=\"hljs-attr\">news:</span> <span class=\"hljs-string\">blog</span> <span class=\"hljs-comment\"># the \"news\" section is rendered with `blog/list.html.twig` and its pages with `blog/page.html.twig`</span></code></pre>\n<aside class=\"note note-tip\"><p>A <a href=\"../content/1-pages.md#sub-section\">sub-section</a> already falls back to the layouts of its parent sections: no mapping is needed for that.</p></aside>\n<hr>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/templates/extend/",
      "url": "https://cloudflare.cecil.app/documentation/templates/extend/",
      "title": "Extend templates",
      "summary": "Add custom functions and filters, or use a theme.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-11-15T00:00:00+00:00","content_text": "Extend templates\nTemplates can be extended with custom functions and filters, or packaged as a reusable theme.\nFunctions and filters\nYou can add custom functions and custom filters with a Twig extension.\nTheme\nIt’s easy to build a theme: create a folder &lt;theme&gt; with the following structure (like a website but without pages):\n&lt;my-site&gt;\n└─ themes\n   └─ &lt;theme&gt;\n      ├─ config.yml\n      ├─ assets\n      ├─ layouts\n      ├─ schemas\n      ├─ static\n      └─ translations\nThen enable it with the theme configuration option.\nThe 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}).\nThe schemas directory of the theme holds the front matter schemas of the variables its templates expect: the schemas of the site override them variable by variable.\nRequired themes\nA theme can require other themes (e.g. a component theme providing a search box, or a plugin) with the theme option of its config.yml:\n\/themes\/&lt;theme&gt;\/config.yml\ntheme:\n  - &lt;required-theme&gt;\nRequired themes are enabled with the theme, with no other configuration of the site: their layouts, assets, static files, translations, extensions and config.yml are loaded. They are added after the themes of the site, so the theme (like the site) overrides the themes it requires.\nRequired themes must be installed too, in the themes directory of the site: declare them as dependencies in the composer.json of the theme.",
      "content_html": "<h1>Extend templates</h1>\n<p>Templates can be extended with custom functions and filters, or packaged as a reusable theme.</p>\n<h2 id=\"functions-and-filters\">Functions and filters<a class=\"heading-anchor\" href=\"#functions-and-filters\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>You can add custom <a href=\"reference/1-functions.md\">functions</a> and custom <a href=\"reference/3-filters.md\">filters</a> with a <a href=\"../developers/1-extend.md#twig-extension\"><strong><em>Twig extension</em></strong></a>.</p>\n<h2 id=\"theme\">Theme<a class=\"heading-anchor\" href=\"#theme\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>It’s easy to build a theme: create a folder <code translate=\"no\">&lt;theme&gt;</code> with the following structure (like a website but without pages):</p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">&lt;my-site&gt;\n└─ themes\n   └─ &lt;theme&gt;\n      ├─ config.yml\n      ├─ assets\n      ├─ layouts\n      ├─ schemas\n      ├─ static\n      └─ translations</code></pre>\n<p>Then enable it with the <a href=\"../configuration/1-site.md#theme\"><code translate=\"no\">theme</code></a> configuration option.</p>\n<p>The theme <code translate=\"no\">config.yml</code> overrides the <a href=\"../configuration/index.md#priority\">default configuration</a> and is merged with the site configuration, which takes precedence, except for <a href=\"../configuration/index.md#lists\">lists of values</a>: the site values are added to the theme ones, and a theme value can only be removed with <code translate=\"no\">false</code> (e.g. <code translate=\"no\">homepage: {atom: false}</code>).</p>\n<p>The <code translate=\"no\">schemas</code> directory of the theme holds the <a href=\"../configuration/4-pages.md#schemas-directory\">front matter schemas</a> of the variables its templates expect: the schemas of the site override them variable by variable.</p>\n<h3 id=\"required-themes\">Required themes<a class=\"heading-anchor\" href=\"#required-themes\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>A theme can require other themes (e.g. a component theme providing a search box, or a <a href=\"../developers/1-extend.md#plugins\">plugin</a>) with the <code translate=\"no\">theme</code> option of its <code translate=\"no\">config.yml</code>:</p>\n<p><em>/themes/&lt;theme&gt;/config.yml</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">theme:</span>\n  <span class=\"hljs-bullet\">-</span> <span class=\"hljs-string\">&lt;required-theme&gt;</span></code></pre>\n<p>Required themes are enabled with the theme, with no other configuration of the site: their layouts, assets, static files, translations, extensions and <code translate=\"no\">config.yml</code> are loaded. They are added after the themes of the site, so the theme (like the site) overrides the themes it requires.</p>\n<aside class=\"note note-important\"><p>Required themes must be installed too, in the <code translate=\"no\">themes</code> directory of the site: declare them as dependencies in the <code translate=\"no\">composer.json</code> of the theme.</p></aside>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/configuration/output/",
      "url": "https://cloudflare.cecil.app/documentation/configuration/output/",
      "title": "Output",
      "summary": "Output directory, formats and post-processing.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-26T00:00:00+00:00","content_text": "Output\nDefines where and in what format pages are rendered.\noutput.dir\nDirectory where rendered pages’ files are saved (_site by default).\noutput:\n  dir: _site\noutput.formats\nList of output formats definition, which are used to render pages (e.g. HTML, Atom, RSS, JSON, XML, etc.).\noutput:\n  formats:\n    - name: &lt;name&gt;            # name of the format, e.g.: `html` (required)\n      mediatype: &lt;media type&gt; # media type (MIME type), e.g.: `text\/html` (required)\n      rel: &lt;rel&gt;              # `rel` attribute of the page alternate link, e.g.: `canonical` (optional, `alternate` by default)\n      subpath: &lt;sub path&gt;     # sub path, e.g.: `amp` in `path\/amp\/index.html` (optional)\n      filename: &lt;file name&gt;   # file name, e.g.: `index` in `path\/index.html` (optional)\n      extension: &lt;extension&gt;  # file extension, e.g.: `html` in `path\/index.html` (required)\n      exclude: [&lt;variable&gt;]   # don’t apply this format to pages identified by listed variables, e.g.: `[redirect, paginated]` (optional)\nThose formats are used in the output.pagetypeformats configuration and in the output page variable.\nDefault formats\nCecil provides some default formats, which can be overridden in the configuration file: html (default), atom, rss, json, xml, txt, amp, js, webmanifest, xsl, jsonfeed, oembed, embed, markdown, llms.\nFormats are merged by name: to override a default format, only define its name and the properties to change.\noutput:\n  formats:\n    - name: rss\n      filename: feed # `feed.xml` instead of `rss.xml`\noutput.pagetypeformats\nIt’s not required to set output variable for each page, as Cecil automatically applies the formats defined for each page type (homepage, page, section, vocabulary and term).\noutput:\n  pagetypeformats:\n    page: [&lt;format&gt;]\n    homepage: [&lt;format&gt;]\n    section: [&lt;format&gt;]\n    vocabulary: [&lt;format&gt;]\n    term: [&lt;format&gt;]\nSeveral formats can be defined for a single page type. For example, the section page type can be automatically rendered in HTML and Atom:\noutput:\n  pagetypeformats:\n    section: [html, atom]\nA list replaces the default formats of the page type (and is added to the formats defined by the theme). To add or remove a format instead, use a map of booleans:\noutput:\n  pagetypeformats:\n    homepage:\n      rss: true   # adds RSS\n      atom: false # removes Atom\nTo render a page, Cecil looks up a template named &lt;layout&gt;.&lt;format&gt;.twig (e.g. page.html.twig).\noutput example\noutput:\n  dir: _site\n  formats:\n    - name: html\n      mediatype: text\/html\n      filename: index\n      extension: html\n    - name: atom\n      mediatype: application\/atom+xml\n      filename: atom\n      extension: xml\n      exclude: [redirect, paginated]\n  pagetypeformats:\n    page: [html]\n    homepage: [html, atom]\n    section: [html, atom]\n    vocabulary: [html]\n    term: [html, atom]\noutput.postprocessors\nOutput post processors, indexed by name and run in ascending order of their priority, used to modify the output files after they have been generated.\nDefault post processors:\noutput:\n  postprocessors:\n    GeneratorMetaTag: { class: Cecil\\Renderer\\PostProcessor\\GeneratorMetaTag, priority: 10 }\n    HtmlExcerpt:      { class: Cecil\\Renderer\\PostProcessor\\HtmlExcerpt, priority: 20 }\n    MarkdownLink:     { class: Cecil\\Renderer\\PostProcessor\\MarkdownLink, priority: 30 }\nA post processor can be disabled by its name (e.g.: GeneratorMetaTag: false). See Extensions for the full syntax.\nYou can extend Cecil capabilities with an Output post processor.\n",
      "content_html": "<h1>Output</h1>\n<p>Defines where and in what format pages are rendered.</p>\n<h2 id=\"output-dir\">output.dir<a class=\"heading-anchor\" href=\"#output-dir\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Directory where rendered pages’ files are saved (<code translate=\"no\">_site</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">output:</span>\n  <span class=\"hljs-attr\">dir:</span> <span class=\"hljs-string\">_site</span></code></pre>\n<h2 id=\"output-formats\">output.formats<a class=\"heading-anchor\" href=\"#output-formats\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>List of output formats definition, which are used to render pages (e.g. HTML, Atom, RSS, JSON, XML, etc.).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">output:</span>\n  <span class=\"hljs-attr\">formats:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">&lt;name&gt;</span>            <span class=\"hljs-comment\"># name of the format, e.g.: `html` (required)</span>\n      <span class=\"hljs-attr\">mediatype:</span> <span class=\"hljs-string\">&lt;media</span> <span class=\"hljs-string\">type&gt;</span> <span class=\"hljs-comment\"># media type (MIME type), e.g.: `text/html` (required)</span>\n      <span class=\"hljs-attr\">rel:</span> <span class=\"hljs-string\">&lt;rel&gt;</span>              <span class=\"hljs-comment\"># `rel` attribute of the page alternate link, e.g.: `canonical` (optional, `alternate` by default)</span>\n      <span class=\"hljs-attr\">subpath:</span> <span class=\"hljs-string\">&lt;sub</span> <span class=\"hljs-string\">path&gt;</span>     <span class=\"hljs-comment\"># sub path, e.g.: `amp` in `path/amp/index.html` (optional)</span>\n      <span class=\"hljs-attr\">filename:</span> <span class=\"hljs-string\">&lt;file</span> <span class=\"hljs-string\">name&gt;</span>   <span class=\"hljs-comment\"># file name, e.g.: `index` in `path/index.html` (optional)</span>\n      <span class=\"hljs-attr\">extension:</span> <span class=\"hljs-string\">&lt;extension&gt;</span>  <span class=\"hljs-comment\"># file extension, e.g.: `html` in `path/index.html` (required)</span>\n      <span class=\"hljs-attr\">exclude:</span> <span class=\"hljs-string\">[&lt;variable&gt;]</span>   <span class=\"hljs-comment\"># don’t apply this format to pages identified by listed variables, e.g.: `[redirect, paginated]` (optional)</span></code></pre>\n<p>Those formats are used in the <a href=\"#output-pagetypeformats\"><code translate=\"no\">output.pagetypeformats</code></a> configuration and in the <a href=\"../content/2-front-matter.md#output\"><code translate=\"no\">output</code> page variable</a>.</p>\n<h3 id=\"default-formats\">Default formats<a class=\"heading-anchor\" href=\"#default-formats\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Cecil provides some <a href=\"https://github.com/Cecilapp/Cecil/blob/main/config/default.php#L287-L394\" target=\"_blank\" rel=\"noopener noreferrer\">default formats</a>, which can be overridden in the configuration file: <code translate=\"no\">html</code> (default), <code translate=\"no\">atom</code>, <code translate=\"no\">rss</code>, <code translate=\"no\">json</code>, <code translate=\"no\">xml</code>, <code translate=\"no\">txt</code>, <code translate=\"no\">amp</code>, <code translate=\"no\">js</code>, <code translate=\"no\">webmanifest</code>, <code translate=\"no\">xsl</code>, <code translate=\"no\">jsonfeed</code>, <code translate=\"no\">oembed</code>, <code translate=\"no\">embed</code>, <code translate=\"no\">markdown</code>, <code translate=\"no\">llms</code>.</p>\n<p>Formats are merged by <code translate=\"no\">name</code>: to override a default format, only define its <code translate=\"no\">name</code> and the properties to change.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">output:</span>\n  <span class=\"hljs-attr\">formats:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">rss</span>\n      <span class=\"hljs-attr\">filename:</span> <span class=\"hljs-string\">feed</span> <span class=\"hljs-comment\"># `feed.xml` instead of `rss.xml`</span></code></pre>\n<h2 id=\"output-pagetypeformats\">output.pagetypeformats<a class=\"heading-anchor\" href=\"#output-pagetypeformats\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>It’s not required to set <code translate=\"no\">output</code> variable for each page, as Cecil automatically applies the formats defined for each page type (<code translate=\"no\">homepage</code>, <code translate=\"no\">page</code>, <code translate=\"no\">section</code>, <code translate=\"no\">vocabulary</code> and <code translate=\"no\">term</code>).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">output:</span>\n  <span class=\"hljs-attr\">pagetypeformats:</span>\n    <span class=\"hljs-attr\">page:</span> <span class=\"hljs-string\">[&lt;format&gt;]</span>\n    <span class=\"hljs-attr\">homepage:</span> <span class=\"hljs-string\">[&lt;format&gt;]</span>\n    <span class=\"hljs-attr\">section:</span> <span class=\"hljs-string\">[&lt;format&gt;]</span>\n    <span class=\"hljs-attr\">vocabulary:</span> <span class=\"hljs-string\">[&lt;format&gt;]</span>\n    <span class=\"hljs-attr\">term:</span> <span class=\"hljs-string\">[&lt;format&gt;]</span></code></pre>\n<p>Several formats can be defined for a single page type. For example, the <code translate=\"no\">section</code> page type can be automatically rendered in HTML and Atom:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">output:</span>\n  <span class=\"hljs-attr\">pagetypeformats:</span>\n    <span class=\"hljs-attr\">section:</span> <span class=\"hljs-string\">[html,</span> <span class=\"hljs-string\">atom]</span></code></pre>\n<p>A list replaces the default formats of the page type (and is added to the formats defined by the theme). To add or remove a format instead, use a <a href=\"index.md#lists\">map of booleans</a>:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">output:</span>\n  <span class=\"hljs-attr\">pagetypeformats:</span>\n    <span class=\"hljs-attr\">homepage:</span>\n      <span class=\"hljs-attr\">rss:</span> <span class=\"hljs-literal\">true</span>   <span class=\"hljs-comment\"># adds RSS</span>\n      <span class=\"hljs-attr\">atom:</span> <span class=\"hljs-literal\">false</span> <span class=\"hljs-comment\"># removes Atom</span></code></pre>\n<aside class=\"note note-info\"><p>To render a page, <a href=\"../templates/1-lookup-rules.md#lookup-rules\">Cecil looks up a template</a> named <code translate=\"no\">&lt;layout&gt;.&lt;format&gt;.twig</code> (e.g. <code translate=\"no\">page.html.twig</code>).</p></aside>\n<h2 id=\"output-example\">output example<a class=\"heading-anchor\" href=\"#output-example\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">output:</span>\n  <span class=\"hljs-attr\">dir:</span> <span class=\"hljs-string\">_site</span>\n  <span class=\"hljs-attr\">formats:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">html</span>\n      <span class=\"hljs-attr\">mediatype:</span> <span class=\"hljs-string\">text/html</span>\n      <span class=\"hljs-attr\">filename:</span> <span class=\"hljs-string\">index</span>\n      <span class=\"hljs-attr\">extension:</span> <span class=\"hljs-string\">html</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">atom</span>\n      <span class=\"hljs-attr\">mediatype:</span> <span class=\"hljs-string\">application/atom+xml</span>\n      <span class=\"hljs-attr\">filename:</span> <span class=\"hljs-string\">atom</span>\n      <span class=\"hljs-attr\">extension:</span> <span class=\"hljs-string\">xml</span>\n      <span class=\"hljs-attr\">exclude:</span> <span class=\"hljs-string\">[redirect,</span> <span class=\"hljs-string\">paginated]</span>\n  <span class=\"hljs-attr\">pagetypeformats:</span>\n    <span class=\"hljs-attr\">page:</span> <span class=\"hljs-string\">[html]</span>\n    <span class=\"hljs-attr\">homepage:</span> <span class=\"hljs-string\">[html,</span> <span class=\"hljs-string\">atom]</span>\n    <span class=\"hljs-attr\">section:</span> <span class=\"hljs-string\">[html,</span> <span class=\"hljs-string\">atom]</span>\n    <span class=\"hljs-attr\">vocabulary:</span> <span class=\"hljs-string\">[html]</span>\n    <span class=\"hljs-attr\">term:</span> <span class=\"hljs-string\">[html,</span> <span class=\"hljs-string\">atom]</span></code></pre>\n<h2 id=\"output-postprocessors\">output.postprocessors<a class=\"heading-anchor\" href=\"#output-postprocessors\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Output post processors, indexed by name and run in ascending order of their priority, used to modify the output files after they have been generated.</p>\n<p>Default post processors:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">output:</span>\n  <span class=\"hljs-attr\">postprocessors:</span>\n    <span class=\"hljs-attr\">GeneratorMetaTag:</span> <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">class:</span> <span class=\"hljs-string\">Cecil\\Renderer\\PostProcessor\\GeneratorMetaTag,</span> <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-number\">10</span> <span class=\"hljs-string\">}</span>\n    <span class=\"hljs-attr\">HtmlExcerpt:</span>      <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">class:</span> <span class=\"hljs-string\">Cecil\\Renderer\\PostProcessor\\HtmlExcerpt,</span> <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-number\">20</span> <span class=\"hljs-string\">}</span>\n    <span class=\"hljs-attr\">MarkdownLink:</span>     <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">class:</span> <span class=\"hljs-string\">Cecil\\Renderer\\PostProcessor\\MarkdownLink,</span> <span class=\"hljs-attr\">priority:</span> <span class=\"hljs-number\">30</span> <span class=\"hljs-string\">}</span></code></pre>\n<p>A post processor can be disabled by its name (e.g.: <code translate=\"no\">GeneratorMetaTag: false</code>). See <a href=\"../developers/1-extend.md#configuration\">Extensions</a> for the full syntax.</p>\n<aside class=\"note note-tip\"><p>You can extend Cecil capabilities with an <a href=\"../developers/1-extend.md#output-post-processors\">Output post processor</a>.</p></aside>\n<hr>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/configuration/cache/",
      "url": "https://cloudflare.cecil.app/documentation/configuration/cache/",
      "title": "Cache",
      "summary": "Assets, templates and translations cache.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "Cache\nCache options.\ncache.enabled\nCache is enabled by default (true), but you can disable it with:\ncache:\n  enabled: false\nOr with the shorthand:\ncache: false\nIt’s not recommended to disable the cache for performance reasons.\ncache.dir\nDirectory where cache files are stored (.cache by default).\ncache:\n  dir: '.cache'\nThe cache directory is relative to the site directory, but you can use an absolute path: it can be useful to store the cache in a shared directory.\ncache.assets\nAssets cache options.\ncache.assets.ttl\nTime to live of assets cache in seconds (null by default = no expiration).\ncache:\n  assets:\n    ttl: ~\ncache.assets.remote.ttl\nTime to live of remote assets cache in seconds (7 days by default).\ncache:\n  assets:\n    remote:\n      ttl: 604800 # 7 days\ncache.templates\nDisables templates cache with false (true by default).\ncache:\n  templates: true\nSee templates cache documentation for more details.\ncache.translations\nDisables translations cache with false (true by default).\ncache:\n  translations: true\n",
      "content_html": "<h1>Cache</h1>\n<p>Cache options.</p>\n<h2 id=\"cache-enabled\">cache.enabled<a class=\"heading-anchor\" href=\"#cache-enabled\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Cache is enabled by default (<code translate=\"no\">true</code>), but you can disable it with:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">cache:</span>\n  <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">false</span></code></pre>\n<p>Or with the shorthand:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">cache:</span> <span class=\"hljs-literal\">false</span></code></pre>\n<aside class=\"note note-warning\"><p>It’s not recommended to disable the cache for performance reasons.</p></aside>\n<h2 id=\"cache-dir\">cache.dir<a class=\"heading-anchor\" href=\"#cache-dir\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Directory where cache files are stored (<code translate=\"no\">.cache</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">cache:</span>\n  <span class=\"hljs-attr\">dir:</span> <span class=\"hljs-string\">'.cache'</span></code></pre>\n<aside class=\"note note-info\"><p>The cache directory is relative to the site directory, but you can use an absolute path: it can be useful to store the cache in a shared directory.</p></aside>\n<h2 id=\"cache-assets\">cache.assets<a class=\"heading-anchor\" href=\"#cache-assets\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Assets cache options.</p>\n<h3 id=\"cache-assets-ttl\">cache.assets.ttl<a class=\"heading-anchor\" href=\"#cache-assets-ttl\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Time to live of assets cache in seconds (<code translate=\"no\">null</code> by default = no expiration).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">cache:</span>\n  <span class=\"hljs-attr\">assets:</span>\n    <span class=\"hljs-attr\">ttl:</span> <span class=\"hljs-string\">~</span></code></pre>\n<h3 id=\"cache-assets-remote-ttl\">cache.assets.remote.ttl<a class=\"heading-anchor\" href=\"#cache-assets-remote-ttl\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Time to live of remote assets cache in seconds (7 days by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">cache:</span>\n  <span class=\"hljs-attr\">assets:</span>\n    <span class=\"hljs-attr\">remote:</span>\n      <span class=\"hljs-attr\">ttl:</span> <span class=\"hljs-number\">604800</span> <span class=\"hljs-comment\"># 7 days</span></code></pre>\n<h2 id=\"cache-templates\">cache.templates<a class=\"heading-anchor\" href=\"#cache-templates\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Disables templates cache with <code translate=\"no\">false</code> (<code translate=\"no\">true</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">cache:</span>\n  <span class=\"hljs-attr\">templates:</span> <span class=\"hljs-literal\">true</span></code></pre>\n<aside class=\"note note-info\"><p>See <a href=\"../templates/6-cache.md\">templates cache documentation</a> for more details.</p></aside>\n<h2 id=\"cache-translations\">cache.translations<a class=\"heading-anchor\" href=\"#cache-translations\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Disables translations cache with <code translate=\"no\">false</code> (<code translate=\"no\">true</code> by default).</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">cache:</span>\n  <span class=\"hljs-attr\">translations:</span> <span class=\"hljs-literal\">true</span></code></pre>\n<hr>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/configuration/server/",
      "url": "https://cloudflare.cecil.app/documentation/configuration/server/",
      "title": "Server and optimization",
      "summary": "Local server headers and output optimization.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "Server and optimization\nThese options configure the local preview server and the optimization of the generated files.\nServer\nserver.headers\nYou can define custom HTTP headers, used by the local preview server.\nSince version 8.38.0, the headers option has been moved to the server.headers section.\nserver:\n  headers:\n    - path: &lt;path&gt; # Relative path, prefixed with a slash. Supports the `*` wildcard.\n      headers:\n        - key: &lt;key&gt;\n          value: \"&lt;value&gt;\"\nIt’s useful to test custom Content Security Policy or Cache-Control.\nExample:\nserver:\n  headers:\n    - path: \/*\n      headers:\n        - key: X-Frame-Options\n          value: \"SAMEORIGIN\"\n        - key: X-XSS-Protection\n          value: \"1; mode=block\"\n        - key: X-Content-Type-Options\n          value: \"nosniff\"\n        - key: Content-Security-Policy\n          value: \"default-src 'self'; object-src 'self'; img-src 'self'\"\n        - key: Strict-Transport-Security\n          value: \"max-age=31536000; includeSubDomains; preload\"\n    - path: \/assets\/*\n      headers:\n        - key: Cache-Control\n          value: \"public, max-age=31536000\"\n    - path: \/foo.html\n      headers:\n        - key: Foo\n          value: \"bar\"\n\nOptimize\nThe optimization options enable compression of output files: HTML, CSS, JavaScript and images.\noptimize:\n  enabled: false     # enables files optimization (`false` by default)\n  html:\n    enabled: true    # enables HTML files optimization\n    ext: [html, htm]   # supported files extensions\n  css:\n    enabled: true    # enables CSS files optimization\n    ext: [css]         # supported files extensions\n  js:\n    enabled: true    # enables JavaScript files optimization\n    ext: [js]          # supported files extensions\n  images:\n    enabled: true    # enables images files optimization\n    ext: [jpeg, jpg, png, gif, webp, svg, avif] # supported files extensions\nThis option is disabled by default and can be enabled via:\noptimize: true\nOnce the global option is enabled, the 4 file types will be processed.\nIt is possible to disable each of them via enabled: false and change the processed file extensions via ext.\nIt is also possible to enable (or disable) this option through CLI when using the build and serve commands, with the --optimize (or --no-optimize) option.\nImages compressor will use these binaries if they are present in the system: JpegOptim, Optipng, Pngquant 2, SVGO, Gifsicle, cwebp and avifenc.\n",
      "content_html": "<h1>Server and optimization</h1>\n<p>These options configure the local preview server and the optimization of the generated files.</p>\n<h2 id=\"server\">Server<a class=\"heading-anchor\" href=\"#server\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<h3 id=\"server-headers\">server.headers<a class=\"heading-anchor\" href=\"#server-headers\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>You can define custom <a href=\"https://developer.mozilla.org/docs/Glossary/Response_header\" target=\"_blank\" rel=\"noopener noreferrer\">HTTP headers</a>, used by the local preview server.</p>\n<aside class=\"note note-warning\"><p>Since version <ins>8.38.0</ins>, the <code translate=\"no\">headers</code> option has been moved to the <code translate=\"no\">server.headers</code> section.</p></aside>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">server:</span>\n  <span class=\"hljs-attr\">headers:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">&lt;path&gt;</span> <span class=\"hljs-comment\"># Relative path, prefixed with a slash. Supports the `*` wildcard.</span>\n      <span class=\"hljs-attr\">headers:</span>\n        <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">key:</span> <span class=\"hljs-string\">&lt;key&gt;</span>\n          <span class=\"hljs-attr\">value:</span> <span class=\"hljs-string\">\"&lt;value&gt;\"</span></code></pre>\n<aside class=\"note note-tip\"><p>It’s useful to test custom <a href=\"https://developer.mozilla.org/docs/Web/HTTP/CSP\" target=\"_blank\" rel=\"noopener noreferrer\">Content Security Policy</a> or <a href=\"https://developer.mozilla.org/docs/Web/HTTP/Headers/Cache-Control\" target=\"_blank\" rel=\"noopener noreferrer\">Cache-Control</a>.</p></aside>\n<p><em>Example:</em></p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">server:</span>\n  <span class=\"hljs-attr\">headers:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">/*</span>\n      <span class=\"hljs-attr\">headers:</span>\n        <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">key:</span> <span class=\"hljs-string\">X-Frame-Options</span>\n          <span class=\"hljs-attr\">value:</span> <span class=\"hljs-string\">\"SAMEORIGIN\"</span>\n        <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">key:</span> <span class=\"hljs-string\">X-XSS-Protection</span>\n          <span class=\"hljs-attr\">value:</span> <span class=\"hljs-string\">\"1; mode=block\"</span>\n        <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">key:</span> <span class=\"hljs-string\">X-Content-Type-Options</span>\n          <span class=\"hljs-attr\">value:</span> <span class=\"hljs-string\">\"nosniff\"</span>\n        <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">key:</span> <span class=\"hljs-string\">Content-Security-Policy</span>\n          <span class=\"hljs-attr\">value:</span> <span class=\"hljs-string\">\"default-src 'self'; object-src 'self'; img-src 'self'\"</span>\n        <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">key:</span> <span class=\"hljs-string\">Strict-Transport-Security</span>\n          <span class=\"hljs-attr\">value:</span> <span class=\"hljs-string\">\"max-age=31536000; includeSubDomains; preload\"</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">/assets/*</span>\n      <span class=\"hljs-attr\">headers:</span>\n        <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">key:</span> <span class=\"hljs-string\">Cache-Control</span>\n          <span class=\"hljs-attr\">value:</span> <span class=\"hljs-string\">\"public, max-age=31536000\"</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">/foo.html</span>\n      <span class=\"hljs-attr\">headers:</span>\n        <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">key:</span> <span class=\"hljs-string\">Foo</span>\n          <span class=\"hljs-attr\">value:</span> <span class=\"hljs-string\">\"bar\"</span></code></pre>\n<hr>\n<h2 id=\"optimize\">Optimize<a class=\"heading-anchor\" href=\"#optimize\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The optimization options enable compression of output files: HTML, CSS, JavaScript and images.</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">optimize:</span>\n  <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">false</span>     <span class=\"hljs-comment\"># enables files optimization (`false` by default)</span>\n  <span class=\"hljs-attr\">html:</span>\n    <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">true</span>    <span class=\"hljs-comment\"># enables HTML files optimization</span>\n    <span class=\"hljs-attr\">ext:</span> <span class=\"hljs-string\">[html,</span> <span class=\"hljs-string\">htm]</span>   <span class=\"hljs-comment\"># supported files extensions</span>\n  <span class=\"hljs-attr\">css:</span>\n    <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">true</span>    <span class=\"hljs-comment\"># enables CSS files optimization</span>\n    <span class=\"hljs-attr\">ext:</span> <span class=\"hljs-string\">[css]</span>         <span class=\"hljs-comment\"># supported files extensions</span>\n  <span class=\"hljs-attr\">js:</span>\n    <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">true</span>    <span class=\"hljs-comment\"># enables JavaScript files optimization</span>\n    <span class=\"hljs-attr\">ext:</span> <span class=\"hljs-string\">[js]</span>          <span class=\"hljs-comment\"># supported files extensions</span>\n  <span class=\"hljs-attr\">images:</span>\n    <span class=\"hljs-attr\">enabled:</span> <span class=\"hljs-literal\">true</span>    <span class=\"hljs-comment\"># enables images files optimization</span>\n    <span class=\"hljs-attr\">ext:</span> <span class=\"hljs-string\">[jpeg,</span> <span class=\"hljs-string\">jpg,</span> <span class=\"hljs-string\">png,</span> <span class=\"hljs-string\">gif,</span> <span class=\"hljs-string\">webp,</span> <span class=\"hljs-string\">svg,</span> <span class=\"hljs-string\">avif]</span> <span class=\"hljs-comment\"># supported files extensions</span></code></pre>\n<p>This option is disabled by default and can be enabled via:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">optimize:</span> <span class=\"hljs-literal\">true</span></code></pre>\n<p>Once the global option is enabled, the 4 file types will be processed.<br>\nIt is possible to disable each of them via <code translate=\"no\">enabled: false</code> and change the processed file extensions via <code translate=\"no\">ext</code>.</p>\n<aside class=\"note note-tip\"><p>It is also possible to enable (or disable) this option through CLI when using the <code translate=\"no\">build</code> and <code translate=\"no\">serve</code> commands, with the <code translate=\"no\">--optimize</code> (or <code translate=\"no\">--no-optimize</code>) option.</p></aside>\n<aside class=\"note note-important\"><p><strong>Images</strong> compressor will use these binaries if they are present in the system: <a href=\"https://github.com/tjko/jpegoptim\" target=\"_blank\" rel=\"noopener noreferrer\">JpegOptim</a>, <a href=\"http://optipng.sourceforge.net/\" target=\"_blank\" rel=\"noopener noreferrer\">Optipng</a>, <a href=\"https://pngquant.org/\" target=\"_blank\" rel=\"noopener noreferrer\">Pngquant 2</a>, <a href=\"https://github.com/svg/svgo\" target=\"_blank\" rel=\"noopener noreferrer\">SVGO</a>, <a href=\"http://www.lcdf.org/gifsicle/\" target=\"_blank\" rel=\"noopener noreferrer\">Gifsicle</a>, <a href=\"https://developers.google.com/speed/webp/docs/cwebp\" target=\"_blank\" rel=\"noopener noreferrer\">cwebp</a> and <a href=\"https://github.com/AOMediaCodec/libavif\" target=\"_blank\" rel=\"noopener noreferrer\">avifenc</a>.</p></aside>\n<hr>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/configuration/override/",
      "url": "https://cloudflare.cecil.app/documentation/configuration/override/",
      "title": "Override configuration",
      "summary": "Override the configuration with environment variables or a CLI option.",
      "date_published": "2021-05-07T00:00:00+00:00",
      "date_modified": "2026-11-04T00:00:00+00:00","content_text": "Override configuration\nThe configuration can be overridden without editing the configuration file, through environment variables or a CLI option.\nEnvironment variables\nThe configuration can be overridden through environment variables.\nAt startup, Cecil also attempts to load a .env file from the current site path (the current working directory, or the &lt;path&gt; argument if provided).\n\nIf the .env file does not exist, Cecil continues normally.\nVariables already defined by the shell\/system are preserved.\n\nEach environment variable name must be prefixed with CECIL_ and the configuration key must be set in uppercase. Nested keys are separated with _ (e.g.: CECIL_PAGES_DIR sets pages.dir), so keys that contain an underscore can't be set this way. Boolean-like values (true\/false, 1\/0, yes\/no, on\/off) are converted to booleans, and numeric values are converted to numbers when the option expects a number (e.g.: CECIL_ASSETS_IMAGES_QUALITY=80).\nFor example, the following command sets the website’s baseurl:\nexport CECIL_BASEURL=\"https:\/\/example.com\/\"\nYou can store the same value in a .env file at your project root:\nCECIL_BASEURL=\"https:\/\/example.com\/\"\nCECIL_TITLE=\"My Cecil site\"\nCLI option\nYou can combine multiple configuration files with the --config option of the build and serve commands:\nphp cecil.phar build --config config-1.yml,config-2.yml\nThe files are merged from left to right, after the main configuration file: a scalar value is replaced by the last one defined, maps are merged key by key, lists of values are replaced (or adjusted with a map of booleans), output formats are merged by name and other lists of entries (e.g. menus) are concatenated.\n",
      "content_html": "<h1>Override configuration</h1>\n<p>The configuration can be overridden without editing the configuration file, through environment variables or a CLI option.</p>\n<h2 id=\"environment-variables\">Environment variables<a class=\"heading-anchor\" href=\"#environment-variables\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The configuration can be overridden through <a href=\"https://en.wikipedia.org/wiki/Environment_variable\" target=\"_blank\" rel=\"noopener noreferrer\">environment variables</a>.</p>\n<p>At startup, Cecil also attempts to load a <code translate=\"no\">.env</code> file from the current site path (the current working directory, or the <code translate=\"no\">&lt;path&gt;</code> argument if provided).</p>\n<ul>\n<li>If the <code translate=\"no\">.env</code> file does not exist, Cecil continues normally.</li>\n<li>Variables already defined by the shell/system are preserved.</li>\n</ul>\n<p>Each environment variable name must be prefixed with <code translate=\"no\">CECIL_</code> and the configuration key must be set in uppercase. Nested keys are separated with <code translate=\"no\">_</code> (e.g.: <code translate=\"no\">CECIL_PAGES_DIR</code> sets <code translate=\"no\">pages.dir</code>), so keys that contain an underscore can't be set this way. Boolean-like values (<code translate=\"no\">true</code>/<code translate=\"no\">false</code>, <code translate=\"no\">1</code>/<code translate=\"no\">0</code>, <code translate=\"no\">yes</code>/<code translate=\"no\">no</code>, <code translate=\"no\">on</code>/<code translate=\"no\">off</code>) are converted to booleans, and numeric values are converted to numbers when the option expects a number (e.g.: <code translate=\"no\">CECIL_ASSETS_IMAGES_QUALITY=80</code>).</p>\n<p>For example, the following command sets the website’s <code translate=\"no\">baseurl</code>:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\"><span class=\"hljs-built_in\">export</span> CECIL_BASEURL=<span class=\"hljs-string\">\"https://example.com/\"</span></code></pre>\n<p>You can store the same value in a <code translate=\"no\">.env</code> file at your project root:</p>\n<pre data-lang=\"dotenv\"><code class=\"language-dotenv\" translate=\"no\">CECIL_BASEURL=\"https://example.com/\"\nCECIL_TITLE=\"My Cecil site\"</code></pre>\n<h2 id=\"cli-option\">CLI option<a class=\"heading-anchor\" href=\"#cli-option\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>You can combine multiple configuration files with the <code translate=\"no\">--config</code> option of the <code translate=\"no\">build</code> and <code translate=\"no\">serve</code> commands:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar build --config config-1.yml,config-2.yml</code></pre>\n<p>The files are merged from left to right, after the main configuration file: a scalar value is replaced by the last one defined, maps are merged key by key, <a href=\"index.md#lists\">lists of values</a> are replaced (or adjusted with a map of booleans), output formats are merged by <code translate=\"no\">name</code> and other lists of entries (e.g. menus) are concatenated.</p>\n<hr>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/deploy/continuous-deployment/",
      "url": "https://cloudflare.cecil.app/documentation/deploy/continuous-deployment/",
      "title": "Continuous build & deploy",
      "summary": "GitHub Pages and GitLab CI.",
      "date_published": "2020-12-19T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "Continuous build &amp; deploy\nContinuous integration services can build your site with Cecil and deploy it on each change to your repository.\nGitHub Pages\n\nWebsites for you and your projects, hosted directly from your GitHub repository. Just edit, push, and your changes are live.\n\n➡️ https:\/\/pages.github.com\n.github\/workflows\/build-and-deploy.yml:\nname: Build and deploy to GitHub Pages\non:\n  push:\n    branches: [master, main]\n  workflow_dispatch:\nconcurrency:\n  group: pages\n  cancel-in-progress: true\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout source\n        uses: actions\/checkout@v7\n      - name: Restore Cecil cache\n        uses: actions\/cache\/restore@v6\n        with:\n          path: .\/.cache\n          key: cecil-cache-\n          restore-keys: |\n            cecil-cache-\n      - name: Build site\n        uses: Cecilapp\/Cecil-Action@v4\n      - name: Save Cecil cache\n        uses: actions\/cache\/save@v6\n        with:\n          path: .\/.cache\n          key: cecil-cache-${{ hashFiles('.\/.cache\/**\/*') }}\n  deploy:\n    needs: build\n    permissions:\n      pages: write\n      id-token: write\n    environment:\n      name: github-pages\n      url: ${{ steps.deployment.outputs.page_url }}\n    runs-on: ubuntu-latest\n    steps:\n      - name: Deploy to GitHub Pages\n        id: deployment\n        uses: actions\/deploy-pages@v5\nOfficial documentation\nGitLab CI\n\nWith GitLab Pages, you can publish static websites directly from a repository in GitLab.\n\n➡️ https:\/\/about.gitlab.com\/solutions\/continuous-integration\/\n.gitlab-ci.yml:\nimage: wordpress:cli-php8.4\ntest:\n  stage: test\n  variables:\n    CECIL_OUTPUT_DIR: test\n  script:\n    - curl -sSOL https:\/\/cecil.app\/build.sh &amp;&amp; bash .\/build.sh\n  artifacts:\n    paths:\n      - test\n  rules:\n    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH\npages:\n  stage: deploy\n  variables:\n    CECIL_ENV: production\n    CECIL_OUTPUT_DIR: public\n  script:\n    - curl -sSOL https:\/\/cecil.app\/build.sh &amp;&amp; bash .\/build.sh\n  artifacts:\n    paths:\n      - public\n  rules:\n    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH\ncache:\n  paths:\n    - composer-cache\/\n    - vendor\/\n    - .cache\/\nOfficial documentation",
      "content_html": "<h1>Continuous build &amp; deploy</h1>\n<p>Continuous integration services can build your site with Cecil and deploy it on each change to your repository.</p>\n<h2 id=\"github-pages\">GitHub Pages<a class=\"heading-anchor\" href=\"#github-pages\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<blockquote>\n<p>Websites for you and your projects, hosted directly from your GitHub repository. Just edit, push, and your changes are live.</p>\n</blockquote>\n<p>➡️ <a href=\"https://pages.github.com\" target=\"_blank\" rel=\"noopener noreferrer\">https://pages.github.com</a></p>\n<p><em>.github/workflows/build-and-deploy.yml</em>:</p>\n<pre data-lang=\"yml\"><code class=\"language-yml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">Build</span> <span class=\"hljs-string\">and</span> <span class=\"hljs-string\">deploy</span> <span class=\"hljs-string\">to</span> <span class=\"hljs-string\">GitHub</span> <span class=\"hljs-string\">Pages</span>\n<span class=\"hljs-attr\">on:</span>\n  <span class=\"hljs-attr\">push:</span>\n    <span class=\"hljs-attr\">branches:</span> <span class=\"hljs-string\">[master,</span> <span class=\"hljs-string\">main]</span>\n  <span class=\"hljs-attr\">workflow_dispatch:</span>\n<span class=\"hljs-attr\">concurrency:</span>\n  <span class=\"hljs-attr\">group:</span> <span class=\"hljs-string\">pages</span>\n  <span class=\"hljs-attr\">cancel-in-progress:</span> <span class=\"hljs-literal\">true</span>\n<span class=\"hljs-attr\">jobs:</span>\n  <span class=\"hljs-attr\">build:</span>\n    <span class=\"hljs-attr\">runs-on:</span> <span class=\"hljs-string\">ubuntu-latest</span>\n    <span class=\"hljs-attr\">steps:</span>\n      <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">Checkout</span> <span class=\"hljs-string\">source</span>\n        <span class=\"hljs-attr\">uses:</span> <span class=\"hljs-string\">actions/checkout@v7</span>\n      <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">Restore</span> <span class=\"hljs-string\">Cecil</span> <span class=\"hljs-string\">cache</span>\n        <span class=\"hljs-attr\">uses:</span> <span class=\"hljs-string\">actions/cache/restore@v6</span>\n        <span class=\"hljs-attr\">with:</span>\n          <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">./.cache</span>\n          <span class=\"hljs-attr\">key:</span> <span class=\"hljs-string\">cecil-cache-</span>\n          <span class=\"hljs-attr\">restore-keys:</span> <span class=\"hljs-string\">|\n            cecil-cache-\n</span>      <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">Build</span> <span class=\"hljs-string\">site</span>\n        <span class=\"hljs-attr\">uses:</span> <span class=\"hljs-string\">Cecilapp/Cecil-Action@v4</span>\n      <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">Save</span> <span class=\"hljs-string\">Cecil</span> <span class=\"hljs-string\">cache</span>\n        <span class=\"hljs-attr\">uses:</span> <span class=\"hljs-string\">actions/cache/save@v6</span>\n        <span class=\"hljs-attr\">with:</span>\n          <span class=\"hljs-attr\">path:</span> <span class=\"hljs-string\">./.cache</span>\n          <span class=\"hljs-attr\">key:</span> <span class=\"hljs-string\">cecil-cache-${{</span> <span class=\"hljs-string\">hashFiles('./.cache/**/*')</span> <span class=\"hljs-string\">}}</span>\n  <span class=\"hljs-attr\">deploy:</span>\n    <span class=\"hljs-attr\">needs:</span> <span class=\"hljs-string\">build</span>\n    <span class=\"hljs-attr\">permissions:</span>\n      <span class=\"hljs-attr\">pages:</span> <span class=\"hljs-string\">write</span>\n      <span class=\"hljs-attr\">id-token:</span> <span class=\"hljs-string\">write</span>\n    <span class=\"hljs-attr\">environment:</span>\n      <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">github-pages</span>\n      <span class=\"hljs-attr\">url:</span> <span class=\"hljs-string\">${{</span> <span class=\"hljs-string\">steps.deployment.outputs.page_url</span> <span class=\"hljs-string\">}}</span>\n    <span class=\"hljs-attr\">runs-on:</span> <span class=\"hljs-string\">ubuntu-latest</span>\n    <span class=\"hljs-attr\">steps:</span>\n      <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">Deploy</span> <span class=\"hljs-string\">to</span> <span class=\"hljs-string\">GitHub</span> <span class=\"hljs-string\">Pages</span>\n        <span class=\"hljs-attr\">id:</span> <span class=\"hljs-string\">deployment</span>\n        <span class=\"hljs-attr\">uses:</span> <span class=\"hljs-string\">actions/deploy-pages@v5</span></code></pre>\n<p><a href=\"https://docs.github.com/en/pages\" target=\"_blank\" rel=\"noopener noreferrer\">Official documentation</a></p>\n<h2 id=\"gitlab-ci\">GitLab CI<a class=\"heading-anchor\" href=\"#gitlab-ci\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<blockquote>\n<p>With GitLab Pages, you can publish static websites directly from a repository in GitLab.</p>\n</blockquote>\n<p>➡️ <a href=\"https://about.gitlab.com/solutions/continuous-integration/\" target=\"_blank\" rel=\"noopener noreferrer\">https://about.gitlab.com/solutions/continuous-integration/</a></p>\n<p><em>.gitlab-ci.yml</em>:</p>\n<pre data-lang=\"yml\"><code class=\"language-yml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">image:</span> <span class=\"hljs-string\">wordpress:cli-php8.4</span>\n<span class=\"hljs-attr\">test:</span>\n  <span class=\"hljs-attr\">stage:</span> <span class=\"hljs-string\">test</span>\n  <span class=\"hljs-attr\">variables:</span>\n    <span class=\"hljs-attr\">CECIL_OUTPUT_DIR:</span> <span class=\"hljs-string\">test</span>\n  <span class=\"hljs-attr\">script:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-string\">curl</span> <span class=\"hljs-string\">-sSOL</span> <span class=\"hljs-string\">https://cecil.app/build.sh</span> <span class=\"hljs-string\">&amp;&amp;</span> <span class=\"hljs-string\">bash</span> <span class=\"hljs-string\">./build.sh</span>\n  <span class=\"hljs-attr\">artifacts:</span>\n    <span class=\"hljs-attr\">paths:</span>\n      <span class=\"hljs-bullet\">-</span> <span class=\"hljs-string\">test</span>\n  <span class=\"hljs-attr\">rules:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">if:</span> <span class=\"hljs-string\">$CI_COMMIT_BRANCH</span> <span class=\"hljs-string\">!=</span> <span class=\"hljs-string\">$CI_DEFAULT_BRANCH</span>\n<span class=\"hljs-attr\">pages:</span>\n  <span class=\"hljs-attr\">stage:</span> <span class=\"hljs-string\">deploy</span>\n  <span class=\"hljs-attr\">variables:</span>\n    <span class=\"hljs-attr\">CECIL_ENV:</span> <span class=\"hljs-string\">production</span>\n    <span class=\"hljs-attr\">CECIL_OUTPUT_DIR:</span> <span class=\"hljs-string\">public</span>\n  <span class=\"hljs-attr\">script:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-string\">curl</span> <span class=\"hljs-string\">-sSOL</span> <span class=\"hljs-string\">https://cecil.app/build.sh</span> <span class=\"hljs-string\">&amp;&amp;</span> <span class=\"hljs-string\">bash</span> <span class=\"hljs-string\">./build.sh</span>\n  <span class=\"hljs-attr\">artifacts:</span>\n    <span class=\"hljs-attr\">paths:</span>\n      <span class=\"hljs-bullet\">-</span> <span class=\"hljs-string\">public</span>\n  <span class=\"hljs-attr\">rules:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">if:</span> <span class=\"hljs-string\">$CI_COMMIT_BRANCH</span> <span class=\"hljs-string\">==</span> <span class=\"hljs-string\">$CI_DEFAULT_BRANCH</span>\n<span class=\"hljs-attr\">cache:</span>\n  <span class=\"hljs-attr\">paths:</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-string\">composer-cache/</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-string\">vendor/</span>\n    <span class=\"hljs-bullet\">-</span> <span class=\"hljs-string\">.cache/</span></code></pre>\n<p><a href=\"https://docs.gitlab.com/user/project/pages/\" target=\"_blank\" rel=\"noopener noreferrer\">Official documentation</a></p>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/deploy/jamstack-platforms/",
      "url": "https://cloudflare.cecil.app/documentation/deploy/jamstack-platforms/",
      "title": "Jamstack platforms",
      "summary": "Netlify, Vercel, statichost, Cloudflare Pages, Render.",
      "date_published": "2020-12-19T00:00:00+00:00",
      "date_modified": "2026-10-25T00:00:00+00:00","content_text": "Jamstack platforms\nJamstack platforms can build and deploy your Cecil site automatically on each push to your Git repository.\nThe build script deduces the build context (production or preview) and the base URL from the platform. A CECIL_ENV environment variable you define takes precedence over the deduced build context.\nNetlify\n\nA powerful serverless platform with an intuitive git-based workflow. Automated deployments, shareable previews, and much more.\n\n➡️ https:\/\/www.netlify.com\nnetlify.toml:\n[build]\n  publish = \"_site\"\n  command = \"curl -sSOL https:\/\/cecil.app\/build.sh &amp;&amp; bash .\/build.sh\"\n[context.production.environment]\n  CECIL_ENV = \"production\"\n[context.deploy-preview.environment]\n  CECIL_ENV = \"preview\"\nOfficial documentation\nVercel\n\nVercel combines the best developer experience with an obsessive focus on end-user performance.\n\n➡️ https:\/\/vercel.com\nvercel.json:\n{\n  \"buildCommand\": \"curl -sSOL https:\/\/cecil.app\/build.sh &amp;&amp; bash .\/build.sh\",\n  \"outputDirectory\": \"_site\"\n}\nOfficial documentation\nstatichost\n\nModern static site hosting with European servers and absolutely no personal data collection!\n\n➡️ https:\/\/statichost.eu\nstatichost.yml:\nimage: wordpress:cli-php8.4\ncommand: curl -sSOL https:\/\/cecil.app\/build.sh &amp;&amp; bash .\/build.sh\npublic: _site\nOfficial documentation\nCloudflare Pages\nCloudflare Pages doesn’t provide PHP: the build script uses the Cecil standalone binary instead, and installs themes from composer.lock.\nIn production (main or master branch), the baseurl of the site configuration is used: preview deployments use their own URL.\n\nCloudflare Pages is a Jamstack platform for frontend developers to collaborate and deploy websites.\n\n➡️ https:\/\/www.cloudflare.com\/products\/pages\/\nBuild configurations:\n\nFramework preset: None\nBuild command: curl -sSOL https:\/\/cecil.app\/build.sh &amp;&amp; bash .\/build.sh\nBuild output directory: _site\n\nOfficial documentation\nRender\nRender only provides PHP 7.3: the build script uses the Cecil standalone binary instead, and installs themes from composer.lock.\nIn production, the baseurl of the site configuration is used: pull request previews use their own URL.\n\nRender is a unified cloud to build and run all your apps and websites with free TLS certificates, global CDN, private networks and auto deploys from Git.\n\n➡️ https:\/\/render.com\nrender.yaml:\nservices:\n  - type: web\n    runtime: static\n    name: Cecil\n    buildCommand: curl -sSOL https:\/\/cecil.app\/build.sh &amp;&amp; bash .\/build.sh\n    staticPublishPath: .\/_site\n    autoDeployTrigger: commit\n    previews:\n      generation: automatic\nOfficial documentation",
      "content_html": "<h1>Jamstack platforms</h1>\n<p>Jamstack platforms can build and deploy your Cecil site automatically on each push to your Git repository.</p>\n<p>The build script deduces the build context (<code translate=\"no\">production</code> or <code translate=\"no\">preview</code>) and the base URL from the platform. A <code translate=\"no\">CECIL_ENV</code> environment variable you define takes precedence over the deduced build context.</p>\n<h2 id=\"netlify\">Netlify<a class=\"heading-anchor\" href=\"#netlify\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<blockquote>\n<p>A powerful serverless platform with an intuitive git-based workflow. Automated deployments, shareable previews, and much more.</p>\n</blockquote>\n<p>➡️ <a href=\"https://www.netlify.com\" target=\"_blank\" rel=\"noopener noreferrer\">https://www.netlify.com</a></p>\n<p><em>netlify.toml</em>:</p>\n<pre data-lang=\"toml\"><code class=\"language-toml hljs ini\" translate=\"no\"><span class=\"hljs-section\">[build]</span>\n  publish = \"_site\"\n  command = \"curl -sSOL https://cecil.app/build.sh &amp;&amp; bash ./build.sh\"\n<span class=\"hljs-section\">[context.production.environment]</span>\n  CECIL_ENV = \"production\"\n<span class=\"hljs-section\">[context.deploy-preview.environment]</span>\n  CECIL_ENV = \"preview\"</code></pre>\n<p><a href=\"https://docs.netlify.com/build/configure-builds/overview/\" target=\"_blank\" rel=\"noopener noreferrer\">Official documentation</a></p>\n<h2 id=\"vercel\">Vercel<a class=\"heading-anchor\" href=\"#vercel\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<blockquote>\n<p>Vercel combines the best developer experience with an obsessive focus on end-user performance.</p>\n</blockquote>\n<p>➡️ <a href=\"https://vercel.com\" target=\"_blank\" rel=\"noopener noreferrer\">https://vercel.com</a></p>\n<p><em>vercel.json</em>:</p>\n<pre data-lang=\"json\"><code class=\"language-json hljs json\" translate=\"no\">{\n  <span class=\"hljs-attr\">\"buildCommand\"</span>: <span class=\"hljs-string\">\"curl -sSOL https://cecil.app/build.sh &amp;&amp; bash ./build.sh\"</span>,\n  <span class=\"hljs-attr\">\"outputDirectory\"</span>: <span class=\"hljs-string\">\"_site\"</span>\n}</code></pre>\n<p><a href=\"https://vercel.com/docs/builds/configure-a-build\" target=\"_blank\" rel=\"noopener noreferrer\">Official documentation</a></p>\n<h2 id=\"statichost\">statichost<a class=\"heading-anchor\" href=\"#statichost\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<blockquote>\n<p>Modern static site hosting with European servers and absolutely no personal data collection!</p>\n</blockquote>\n<p>➡️ <a href=\"https://statichost.eu\" target=\"_blank\" rel=\"noopener noreferrer\">https://statichost.eu</a></p>\n<p><em>statichost.yml</em>:</p>\n<pre data-lang=\"yml\"><code class=\"language-yml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">image:</span> <span class=\"hljs-string\">wordpress:cli-php8.4</span>\n<span class=\"hljs-attr\">command:</span> <span class=\"hljs-string\">curl</span> <span class=\"hljs-string\">-sSOL</span> <span class=\"hljs-string\">https://cecil.app/build.sh</span> <span class=\"hljs-string\">&amp;&amp;</span> <span class=\"hljs-string\">bash</span> <span class=\"hljs-string\">./build.sh</span>\n<span class=\"hljs-attr\">public:</span> <span class=\"hljs-string\">_site</span></code></pre>\n<p><a href=\"https://www.statichost.eu/docs/\" target=\"_blank\" rel=\"noopener noreferrer\">Official documentation</a></p>\n<h2 id=\"cloudflare-pages\">Cloudflare Pages<a class=\"heading-anchor\" href=\"#cloudflare-pages\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<aside class=\"note note-info\"><p>Cloudflare Pages doesn’t provide PHP: the build script uses the Cecil <a href=\"../getting-started/2-installation.md#standalone-binary\">standalone binary</a> instead, and installs themes from <code translate=\"no\">composer.lock</code>.</p>\n<p>In production (<code translate=\"no\">main</code> or <code translate=\"no\">master</code> branch), the <code translate=\"no\">baseurl</code> of the site configuration is used: preview deployments use their own URL.</p></aside>\n<blockquote>\n<p>Cloudflare Pages is a Jamstack platform for frontend developers to collaborate and deploy websites.</p>\n</blockquote>\n<p>➡️ <a href=\"https://www.cloudflare.com/products/pages/\" target=\"_blank\" rel=\"noopener noreferrer\">https://www.cloudflare.com/products/pages/</a></p>\n<p>Build configurations:</p>\n<ul>\n<li>Framework preset: <code translate=\"no\">None</code></li>\n<li>Build command: <code translate=\"no\">curl -sSOL https://cecil.app/build.sh &amp;&amp; bash ./build.sh</code></li>\n<li>Build output directory: <code translate=\"no\">_site</code></li>\n</ul>\n<p><a href=\"https://developers.cloudflare.com/pages/\" target=\"_blank\" rel=\"noopener noreferrer\">Official documentation</a></p>\n<h2 id=\"render\">Render<a class=\"heading-anchor\" href=\"#render\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<aside class=\"note note-info\"><p>Render only provides PHP 7.3: the build script uses the Cecil <a href=\"../getting-started/2-installation.md#standalone-binary\">standalone binary</a> instead, and installs themes from <code translate=\"no\">composer.lock</code>.</p>\n<p>In production, the <code translate=\"no\">baseurl</code> of the site configuration is used: pull request previews use their own URL.</p></aside>\n<blockquote>\n<p>Render is a unified cloud to build and run all your apps and websites with free TLS certificates, global CDN, private networks and auto deploys from Git.</p>\n</blockquote>\n<p>➡️ <a href=\"https://render.com\" target=\"_blank\" rel=\"noopener noreferrer\">https://render.com</a></p>\n<p><em>render.yaml</em>:</p>\n<pre data-lang=\"yml\"><code class=\"language-yml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">services:</span>\n  <span class=\"hljs-bullet\">-</span> <span class=\"hljs-attr\">type:</span> <span class=\"hljs-string\">web</span>\n    <span class=\"hljs-attr\">runtime:</span> <span class=\"hljs-string\">static</span>\n    <span class=\"hljs-attr\">name:</span> <span class=\"hljs-string\">Cecil</span>\n    <span class=\"hljs-attr\">buildCommand:</span> <span class=\"hljs-string\">curl</span> <span class=\"hljs-string\">-sSOL</span> <span class=\"hljs-string\">https://cecil.app/build.sh</span> <span class=\"hljs-string\">&amp;&amp;</span> <span class=\"hljs-string\">bash</span> <span class=\"hljs-string\">./build.sh</span>\n    <span class=\"hljs-attr\">staticPublishPath:</span> <span class=\"hljs-string\">./_site</span>\n    <span class=\"hljs-attr\">autoDeployTrigger:</span> <span class=\"hljs-string\">commit</span>\n    <span class=\"hljs-attr\">previews:</span>\n      <span class=\"hljs-attr\">generation:</span> <span class=\"hljs-string\">automatic</span></code></pre>\n<p><a href=\"https://render.com/docs/static-sites\" target=\"_blank\" rel=\"noopener noreferrer\">Official documentation</a></p>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/deploy/static-hosting/",
      "url": "https://cloudflare.cecil.app/documentation/deploy/static-hosting/",
      "title": "Static hosting",
      "summary": "Deploy to a static hosting service (Surge, deed.page).",
      "date_published": "2020-12-19T00:00:00+00:00",
      "date_modified": "2026-10-29T00:00:00+00:00","content_text": "Static hosting\nThe built site can be uploaded as is to any static hosting service.\nSurge\n\nShipping web projects should be fast, easy, and low risk. Surge is static web publishing for Front-End Developers, right from the CLI.\n\n➡️ https:\/\/surge.sh\nTerminal:\nnpm install -g surge\nsurge _site\/\nOfficial documentation\ndeed.page\n\nStatic hosting with no account: upload the built site in one request and get a permanent https:\/\/&lt;slug&gt;.deed.page\/ URL.\n\n➡️ https:\/\/deed.page\nTerminal:\ncecil build --baseurl=https:\/\/my-cecil-site.deed.page\/\ntar -C _site -czf site.tar.gz .\ncurl -T site.tar.gz \"https:\/\/deed.page\/v1\/sites?slug=my-cecil-site\"\nReplace my-cecil-site with a unique slug of your choice.\nThe JSON response includes a token that is shown only once: keep it private, and send it as an Authorization: Bearer header to update the same slug later. A single request is limited to 4 MB (larger sites can use a manifest upload).\nOfficial documentation",
      "content_html": "<h1>Static hosting</h1>\n<p>The built site can be uploaded as is to any static hosting service.</p>\n<h2 id=\"surge\">Surge<a class=\"heading-anchor\" href=\"#surge\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<blockquote>\n<p>Shipping web projects should be fast, easy, and low risk. Surge is static web publishing for Front-End Developers, right from the CLI.</p>\n</blockquote>\n<p>➡️ <a href=\"https://surge.sh\" target=\"_blank\" rel=\"noopener noreferrer\">https://surge.sh</a></p>\n<p>Terminal:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">npm install -g surge\nsurge _site/</code></pre>\n<p><a href=\"https://surge.sh/help/\" target=\"_blank\" rel=\"noopener noreferrer\">Official documentation</a></p>\n<h2 id=\"deed-page\">deed.page<a class=\"heading-anchor\" href=\"#deed-page\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<blockquote>\n<p>Static hosting with no account: upload the built site in one request and get a permanent <code translate=\"no\">https://&lt;slug&gt;.deed.page/</code> URL.</p>\n</blockquote>\n<p>➡️ <a href=\"https://deed.page\" target=\"_blank\" rel=\"noopener noreferrer\">https://deed.page</a></p>\n<p>Terminal:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">cecil build --baseurl=https://my-cecil-site.deed.page/\ntar -C _site -czf site.tar.gz .\ncurl -T site.tar.gz <span class=\"hljs-string\">\"https://deed.page/v1/sites?slug=my-cecil-site\"</span></code></pre>\n<p>Replace <code translate=\"no\">my-cecil-site</code> with a unique slug of your choice.<br>\nThe JSON response includes a token that is shown only once: keep it private, and send it as an <code translate=\"no\">Authorization: Bearer</code> header to update the same slug later. A single request is limited to 4 MB (larger sites can use a manifest upload).</p>\n<p><a href=\"https://deed.page/docs\" target=\"_blank\" rel=\"noopener noreferrer\">Official documentation</a></p>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/commands/new-site/",
      "url": "https://cloudflare.cecil.app/documentation/commands/new-site/",
      "title": "new:site",
      "summary": "Create a new website.",
      "date_published": "2020-12-19T00:00:00+00:00",
      "date_modified": "2026-11-01T00:00:00+00:00","content_text": "new:site\nCreates a new site.\nUsage\nDescription:\n  Creates a new website\n\nUsage:\n  new:site [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                  Use the given path as working directory\n\nOptions:\n  -f, --force           Override directory if it already exists\n      --demo            Add demo content (pages, templates and assets)\n  -h, --help            Display help for the given command. When no command is given display help for the list command\n      --silent          Do not output any message\n  -q, --quiet           Only errors are displayed. All other output is suppressed\n  -V, --version         Display this application version\n      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The new:site command creates a new website in the current directory, or in &lt;path&gt; if provided.\n  If you run this command without any options, it will ask you for the website title, baseline, base URL, description, author, language, etc.\n\n    cecil.phar new:site\n    cecil.phar new:site path\/to\/the\/working\/directory\n\n  To create a new website with demo content, run:\n\n    cecil.phar new:site --demo\n\n  To override an existing website, run:\n\n    cecil.phar new:site --force\nCreated files\nThe command creates the following files:\n\ncecil.yml: the configuration, with commented examples of common options\npages\/index.md: the home page\nassets\/favicon.png and assets\/icon.png: the favicon and the default image of social networks cards\nstatic\/favicon.ico: the legacy favicon\nREADME.md and .gitignore (_site\/, .cache\/ and .cecil\/), if they don't already exist\n.github\/workflows\/build-and-deploy.yml: a GitHub Actions workflow to deploy on GitHub Pages, if requested\n\nWith the --demo option, it also adds demo content: a blog (with tags, pagination, a draft and a French translation), a documentation section (sorted by weight, with a table of contents enabled by cascade), custom templates, a Sass stylesheet, a data file and translations.",
      "content_html": "<h1>new:site</h1>\n<p>Creates a new site.</p>\n<h2 id=\"usage\">Usage<a class=\"heading-anchor\" href=\"#usage\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">Description:\n  Creates a new website\n\nUsage:\n  new:site [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                  Use the given path as working directory\n\nOptions:\n  -f, --force           Override directory if it already exists\n      --demo            Add demo content (pages, templates and assets)\n  -h, --help            Display help for the given command. When no command is given display help for the list command\n      --silent          Do not output any message\n  -q, --quiet           Only errors are displayed. All other output is suppressed\n  -V, --version         Display this application version\n      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The new:site command creates a new website in the current directory, or in &lt;path&gt; if provided.\n  If you run this command without any options, it will ask you for the website title, baseline, base URL, description, author, language, etc.\n\n    cecil.phar new:site\n    cecil.phar new:site path/to/the/working/directory\n\n  To create a new website with demo content, run:\n\n    cecil.phar new:site --demo\n\n  To override an existing website, run:\n\n    cecil.phar new:site --force</code></pre>\n<h2 id=\"created-files\">Created files<a class=\"heading-anchor\" href=\"#created-files\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>The command creates the following files:</p>\n<ul>\n<li><code translate=\"no\">cecil.yml</code>: the configuration, with commented examples of common options</li>\n<li><code translate=\"no\">pages/index.md</code>: the home page</li>\n<li><code translate=\"no\">assets/favicon.png</code> and <code translate=\"no\">assets/icon.png</code>: the favicon and the default image of social networks cards</li>\n<li><code translate=\"no\">static/favicon.ico</code>: the legacy favicon</li>\n<li><code translate=\"no\">README.md</code> and <code translate=\"no\">.gitignore</code> (<code translate=\"no\">_site/</code>, <code translate=\"no\">.cache/</code> and <code translate=\"no\">.cecil/</code>), if they don't already exist</li>\n<li><code translate=\"no\">.github/workflows/build-and-deploy.yml</code>: a GitHub Actions workflow to <a href=\"https://cecil.app/how-to/deploy-github-pages/\" target=\"_blank\" rel=\"noopener noreferrer\">deploy on GitHub Pages</a>, if requested</li>\n</ul>\n<p>With the <code translate=\"no\">--demo</code> option, it also adds demo content: a blog (with tags, pagination, a draft and a French translation), a documentation section (sorted by weight, with a table of contents enabled by <code translate=\"no\">cascade</code>), custom templates, a Sass stylesheet, a data file and translations.</p>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/getting-started/quick-start/",
      "url": "https://cloudflare.cecil.app/documentation/getting-started/quick-start/",
      "title": "Quick start",
      "summary": "Install Cecil, create a new website, add pages, preview it locally, then build and deploy it.",
      "date_published": "2020-12-19T00:00:00+00:00",
      "date_modified": "2026-11-01T00:00:00+00:00","content_text": "Quick start\nThis guide walks you through creating your first Cecil website, previewing it locally, then building and deploying it.\nCreate a website\nYou can create a new website from scratch in a few minutes.\nFollow the steps below to create your first Cecil website.\n\n\n\n\n\n\n\n\nDemo of the expected result: https:\/\/cecilapp.github.io\/skeleton\/.\nPrerequisites\n\nPHP 8.3+\nTerminal (a basic understanding of the terminal)\nText editor, such as VS Code and\/or Typora\n\nStep by step\n\n  \n    \n      Download Cecil\n      Download cecil.phar from your terminal:\ncurl -LO https:\/\/cecil.app\/cecil.phar\nYou can also download Cecil manually, or install it globally with a package manager, then run cecil instead of php cecil.phar:\n\n  \n    Homebrew\n    brew install cecilapp\/tap\/cecil\n  \n  \n    Scoop\n    scoop install https:\/\/cecil.app\/scoop\/cecil.json\n  \n\nSee Installation for other methods.\n    \n    \n      Create a new site\n      Create a directory for the website (e.g. &lt;mywebsite&gt;), put cecil.phar in it, then run the new:site command:\nphp cecil.phar new:site\n    \n    \n      Add a page\n      Run the new:page command:\nphp cecil.phar new:page\nNow you can edit the newly created page with your Markdown editor: &lt;mywebsite&gt;\/pages\/&lt;new-page&gt;.md.\nWe recommend using Typora to edit your Markdown files.\n    \n    \n      Check the preview\n      Run the following command to create a preview of the website:\nphp cecil.phar serve\nThen navigate to http:\/\/localhost:8000.\nThe serve command runs a local HTTP server and a watcher: if a file (a page, a template or the config) is modified, the browser’s current page is automatically reloaded.\n    \n    \n      Build and deploy\n      When you are satisfied with the result, you can generate the website in order to deploy it to the Web.\nRun the following command to build the website:\nphp cecil.phar build\nYou can now copy the content of the _site directory to a Web server 🎉\n    \n  \n\nTo deploy automatically on each push to your Git repository, see Deploy.\n",
      "content_html": "<h1>Quick start</h1>\n<p>This guide walks you through creating your first Cecil website, previewing it locally, then building and deploying it.</p>\n<h2 id=\"create-a-website\">Create a website<a class=\"heading-anchor\" href=\"#create-a-website\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>You can create a new website from scratch in a few minutes.</p>\n<p>Follow the steps below to create your first Cecil website.</p>\n<p><a href=\"https://cecilapp.github.io/skeleton/\" target=\"_blank\" rel=\"noopener noreferrer\"><picture>\n<source media=\"(prefers-color-scheme: dark)\" type=\"image/avif\" srcset=\"https://cloudflare.cecil.app/thumbnails/480x/docs/cecil-newsite.dark.19f0a851a99b34775f44b67c805a0815.avif 480w, https://cloudflare.cecil.app/thumbnails/768x/docs/cecil-newsite.dark.19f0a851a99b34775f44b67c805a0815.avif 768w, https://cloudflare.cecil.app/docs/cecil-newsite.dark.19f0a851a99b34775f44b67c805a0815.avif 1007w\" sizes=\"100vw\">\n<source media=\"(prefers-color-scheme: dark)\" type=\"image/webp\" srcset=\"https://cloudflare.cecil.app/thumbnails/480x/docs/cecil-newsite.dark.19f0a851a99b34775f44b67c805a0815.webp 480w, https://cloudflare.cecil.app/thumbnails/768x/docs/cecil-newsite.dark.19f0a851a99b34775f44b67c805a0815.webp 768w, https://cloudflare.cecil.app/docs/cecil-newsite.dark.19f0a851a99b34775f44b67c805a0815.webp 1007w\" sizes=\"100vw\">\n<source media=\"(prefers-color-scheme: dark)\" srcset=\"https://cloudflare.cecil.app/thumbnails/480x/docs/cecil-newsite.dark.19f0a851a99b34775f44b67c805a0815.png 480w, https://cloudflare.cecil.app/thumbnails/768x/docs/cecil-newsite.dark.19f0a851a99b34775f44b67c805a0815.png 768w, https://cloudflare.cecil.app/docs/cecil-newsite.dark.19f0a851a99b34775f44b67c805a0815.png 1007w\" sizes=\"100vw\">\n<source type=\"image/avif\" srcset=\"https://cloudflare.cecil.app/thumbnails/480x/docs/cecil-newsite.94982e8ace758b40e6ff753807bdb42b.avif 480w, https://cloudflare.cecil.app/thumbnails/768x/docs/cecil-newsite.94982e8ace758b40e6ff753807bdb42b.avif 768w, https://cloudflare.cecil.app/docs/cecil-newsite.94982e8ace758b40e6ff753807bdb42b.avif 1007w\" width=\"1007\" height=\"607\" sizes=\"100vw\">\n<source type=\"image/webp\" srcset=\"https://cloudflare.cecil.app/thumbnails/480x/docs/cecil-newsite.94982e8ace758b40e6ff753807bdb42b.webp 480w, https://cloudflare.cecil.app/thumbnails/768x/docs/cecil-newsite.94982e8ace758b40e6ff753807bdb42b.webp 768w, https://cloudflare.cecil.app/docs/cecil-newsite.94982e8ace758b40e6ff753807bdb42b.webp 1007w\" width=\"1007\" height=\"607\" sizes=\"100vw\">\n<img src=\"https://cloudflare.cecil.app/docs/cecil-newsite.94982e8ace758b40e6ff753807bdb42b.png\" alt=\"New website example\" loading=\"lazy\" decoding=\"async\" class=\"dark:brightness-90\" width=\"1007\" height=\"607\" style=\";max-width:100%;height:auto;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAA8CAYAAACQPx/OAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAHB0lEQVR4nOVc6RrbKAyU+Pz+b9d9nGp/gEAXl4/E2Z02NSYYZA0jYZIG//z5hwAAiAj0ESCunx3hUSDyEQFFxdmytJf7jsYrV4g69GUAIAg6AQAA75jIV0fn6rADNoAoO4SI3PFJ8M0j5vHzGVwiBVPPgXbcerWyxZVNuwxyddmHfqwBId6o7G+ESlYptvfuh1SEPXYdzcS1N5YIWrHDOtaRURqe9ccCITYUtZEQtI7Y6Cvk1BtnhxdF2GOokKBdKQF0HHeVEDmubNdC/rRrhaOFIH2MQW2gTkw8S4ZyMmKoCHuckyFVYs8/QQjVqLIazo98gxzj5NE6l0SJyqlsd44JxPwPE6JeHXXMj1IVfA7G8XcTIsoEQMWeRgyHMqrtwqSOxpgeCbZOknJWno6EhJAw1fI+Ibbsicl1EJIzs7XX1vEphtRK0cSESd0Ssro8K93n2XBCHIqMQkRKCJhSIwW94/NfFDcdqyJWiLKgU272DazvtDWOCJXCR60YhldI0O8oHO1yYUNUwpQJSSm/ynkUtiQZmggQiwD9XjnrqESdbcOTxgmk+GWoFD62FAEQEOJnUkM3MS3eT5QnWBkppaaOGrpy5yg8HxOCYH0+VohOwHuYXUTOllgpBC3Zt6TfJWQ48ysxuHxTYdLGQgSWUKUUkupKCrUUjGJa/9UmNW4vHKE5vwtGJc3UsorNqshH62XqE3KnjT0yJCn8Qs4lImTppW02UCVZSYwat6f+KwpZBNskiIkeLXKZV6vIhLQ4tkYIAiABriaQASEJW7iqqyuV1CPnaZVIu8u7cmhVQF17++RzEOqIoPfSWCEIJcgRIBBAIkh/Cf4CAdgXUgmTNIlrxqiBQhATJA5bYuWFKn+gcbq5Y9CObUQ4CuxlH4FeNseOKwpJfFqbAwBAAkgE8FfxgYBihbBDCAwUwqTkycEhqpXtQqO6WNZ1ckhtH6hHtfkAO/zs0fYErQ02hyA6ZSSg/Af9km0L2Gb8TC2Kl3ItlHsIVTCY65W8uuXjzPoKonFFDhFYUMY+IZx4y4w3ISyJcpvOCBTMZ7mR3VYxpMixbXSNsCmy9AGCxvtYcrVHcLRZp+feSBknd62Kr8VStiZtuUbK9d6pA5Bso/afXc1HVlgbkHZkhbDRdZaJDMmJnjIN9Xhu6GKAPzJRkZd4hhNAXdUpB4vcsKaMVTs3Lwuw94EdNoWUUygPjX2J45kbdMOWgiCC+z+DShLV9QuGyqjDvhI52SMcdhGWhYE1BrSbhDCmV+wsgXUBVsmYReJm59DSRZxXytmPshEBDmDnt+6EOYUE1KHDNAV1wWxQHlnWoGuxjUZGvNJ/qTAKmnWHqydUbZCor5BoCbQ+Nvhd2Nhtq91aUq6BtzPEGCb/uSsuKINxBItIfXMl1ssYbZqDunDZiChHnewM+gr5FWUwjlpPqAWilOFXMaqvcxNDmBWTsfmkc5NCpDLiPMJb5mr8EwNG17hvndTZhV450Wm96CTmSllDpJBPqmMvWvUtO3iRSNX//XSItq+LyvDIZJzpNiLDha0FhkbfZHxSGYyqkE8rw/cVdLbR/0whhMGEugF2/o4Jmg9eHwy95LB/OpjCt4lm03Ejhax0N1ZGMN7NymC0HNJrTEHxyeB8su+ZgB05F+/hbmUwXFIfCmVh+t+eVm4C7/rIZbtT0ReVwVj+snXuOR/e6nSAiW3U1HFikyF38ZAyGF1Czjr9zWQBQDe2qdzzBWUw9hRi8Gbnz5QymrzRW3vK4Gv2PTQlhMxxpe1PwOxmAwB/f0Ph09v13Sd1m/AYq3VvwFW7ovD19Ha8fzCMjIoG6Q2+PPR3YZ/ke3Z/enNSKWS2/TAj5o1k3GXTp4hxnxhG+C8QE+FNymAcPLh1+Ewlu6Hsm7gjl3wK0xwSvf+rxKzgW8pgLOWQFTJ+nZhvE8FY+G/zDbhZfhOo83obXA5ZwY5i3krQdTxD56Wtk/8vGc+hS8gsn/wyGShe+xgr4+pPjPS/5LCIXyLD5joM6r+NY8TAGZW86eYA+vZEhGDntTJF7/rxnfA5hA1cHeNtZER2jOpmSvnKg2EPqyFs85Pe8LqzWHJk0KhHiFcI7/L6O7v7Z6kOqwzb/8o+l217xslnn4dU/cDpK/29Iafc+hGuvZHZVsxKXf89/59Bh/0MOh8pxbV9mK2DB9n+JR9z3vssZaefMUnY/u2RgEHdBt6w43DpwVDiijrmpCCUv/69zpR1tYse3lXu3Th2nzxWHX9VHfUc0bRDd4F6/0bvfUMllxWyo4z1/mygEvUBETlcXZDAYrNPELT+q6Tm/M5P2rBzppetYTZRPMyWuWfxqueQHu5Whuu/k70jpaiWTyrlA/v1Sw+GEk9+Bn1FKb2c8prtg0VsK+RpZbjx3qAU2l36nMe/0eJ+xxbwSRkAAAAASUVORK5CYII=);background-repeat:no-repeat;background-position:center;background-size:cover;\" srcset=\"https://cloudflare.cecil.app/thumbnails/480x/docs/cecil-newsite.94982e8ace758b40e6ff753807bdb42b.png 480w, https://cloudflare.cecil.app/thumbnails/768x/docs/cecil-newsite.94982e8ace758b40e6ff753807bdb42b.png 768w, https://cloudflare.cecil.app/docs/cecil-newsite.94982e8ace758b40e6ff753807bdb42b.png 1007w\" sizes=\"100vw\">\n</picture></a></p>\n<aside class=\"note note-info\"><p>Demo of the expected result: <a href=\"https://cecilapp.github.io/skeleton/\" target=\"_blank\" rel=\"noopener noreferrer\">https://cecilapp.github.io/skeleton/</a>.</p></aside>\n<h3 id=\"prerequisites\">Prerequisites<a class=\"heading-anchor\" href=\"#prerequisites\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<ul>\n<li><a href=\"https://php.net/manual/en/install.php\" target=\"_blank\" rel=\"noopener noreferrer\">PHP</a> 8.3+</li>\n<li>Terminal (a basic understanding of the <a href=\"https://wikipedia.org/wiki/Terminal_emulator\" target=\"_blank\" rel=\"noopener noreferrer\">terminal</a>)</li>\n<li>Text editor, such as <a href=\"https://code.visualstudio.com\" target=\"_blank\" rel=\"noopener noreferrer\">VS Code</a> and/or <a href=\"https://typora.io\" target=\"_blank\" rel=\"noopener noreferrer\">Typora</a></li>\n</ul>\n<h3 id=\"step-by-step\">Step by step<a class=\"heading-anchor\" href=\"#step-by-step\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<div class=\"note note-steps\" id=\"note-steps-1\">\n  <ol class=\"note-steps-list\">\n    <li class=\"note-step\">\n      <h4 id=\"download-cecil\">Download Cecil</h4>\n      <p>Download <code translate=\"no\">cecil.phar</code> from your terminal:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">curl -LO https://cecil.app/cecil.phar</code></pre>\n<p>You can also <a href=\"https://cecil.app/download/\" target=\"_blank\" rel=\"noopener noreferrer\">download Cecil manually</a>, or install it globally with a package manager, then run <code translate=\"no\">cecil</code> instead of <code translate=\"no\">php cecil.phar</code>:</p>\n<div class=\"note note-code-group\" id=\"note-code-group-2\">\n  <section class=\"note-tab\" id=\"note-code-group-2-1\">\n    <h4 id=\"homebrew\">Homebrew</h4>\n    <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">brew install cecilapp/tap/cecil</code></pre>\n  </section>\n  <section class=\"note-tab\" id=\"note-code-group-2-2\">\n    <h4 id=\"scoop\">Scoop</h4>\n    <pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">scoop install https://cecil.app/scoop/cecil.json</code></pre>\n  </section>\n</div>\n<p>See <a href=\"2-installation.md\">Installation</a> for other methods.</p>\n    </li>\n    <li class=\"note-step\">\n      <h4 id=\"create-a-new-site\">Create a new site</h4>\n      <p>Create a directory for the website (e.g. <code translate=\"no\">&lt;mywebsite&gt;</code>), put <code translate=\"no\">cecil.phar</code> in it, then run the <code translate=\"no\">new:site</code> command:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar new:site</code></pre>\n    </li>\n    <li class=\"note-step\">\n      <h4 id=\"add-a-page\">Add a page</h4>\n      <p>Run the <code translate=\"no\">new:page</code> command:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar new:page</code></pre>\n<p>Now you can edit the newly created page with your Markdown editor: <code translate=\"no\">&lt;mywebsite&gt;/pages/&lt;new-page&gt;.md</code>.</p>\n<aside class=\"note note-tip\"><p>We recommend using <a href=\"https://www.typora.io\" target=\"_blank\" rel=\"noopener noreferrer\">Typora</a> to edit your Markdown files.</p></aside>\n    </li>\n    <li class=\"note-step\">\n      <h4 id=\"check-the-preview\">Check the preview</h4>\n      <p>Run the following command to create a preview of the website:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar serve</code></pre>\n<p>Then navigate to <code translate=\"no\">http://localhost:8000</code>.</p>\n<aside class=\"note note-info\"><p>The <code translate=\"no\">serve</code> command runs a local HTTP server and a watcher: if a file (a page, a template or the config) is modified, the browser’s current page is automatically reloaded.</p></aside>\n    </li>\n    <li class=\"note-step\">\n      <h4 id=\"build-and-deploy\">Build and deploy</h4>\n      <p>When you are satisfied with the result, you can generate the website in order to deploy it to the Web.</p>\n<p>Run the following command to build the website:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar build</code></pre>\n<p>You can now copy the content of the <code translate=\"no\">_site</code> directory to a Web server 🎉</p>\n    </li>\n  </ol>\n</div>\n<aside class=\"note note-tip\"><p>To deploy automatically on each push to your Git repository, see <a href=\"../commands/4-build.md#deploy\">Deploy</a>.</p></aside>\n<hr>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/commands/new-page/",
      "url": "https://cloudflare.cecil.app/documentation/commands/new-page/",
      "title": "new:page",
      "summary": "Create a new page, optionally from a model.",
      "date_published": "2020-12-19T00:00:00+00:00",
      "date_modified": "2026-12-01T00:00:00+00:00","content_text": "new:page\nCreates a new page.\nUsage\nDescription:\n  Creates a new page\n\nUsage:\n  new:page [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                        Use the given path as working directory\n\nOptions:\n      --name=NAME             Page path name\n      --slugify|--no-slugify  Slugify file name (or disable --no-slugify)\n  -p, --prefix                Prefix the file name with the current date (`YYYY-MM-DD`)\n  -f, --force                 Override the file if already exist\n  -o, --open                  Open editor automatically\n      --editor=EDITOR         Editor to use with open option\n  -h, --help                  Display help for the given command. When no command is given display help for the list command\n      --silent                Do not output any message\n  -q, --quiet                 Only errors are displayed. All other output is suppressed\n  -V, --version               Display this application version\n      --ansi|--no-ansi        Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction        Do not ask any interactive question\n  -v|vv|vvv, --verbose        Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The new:page command creates a new page file.\n  If you run this command without any options, it will ask you for the page name and other options.\n\n    cecil.phar new:page\n    cecil.phar new:page --name=path\/to\/a-page.md\n    cecil.phar new:page --name=path\/to\/A Page.md --slugify\n\n  To create a new page with a date prefix (i.e: `YYYY-MM-DD`), run:\n\n    cecil.phar new:page --prefix\n\n  To create a new page and open it with an editor, run:\n\n    cecil.phar new:page --open --editor=editor\n\n  To override an existing page, run:\n\n    cecil.phar new:page --force\nPage models\nYou can define your own models for your new pages in the models directory:\n\nA section model must be named after the section (e.g. blog.md for pages created in blog\/)\nThe model for root pages must be named default.md\n\nA page created in a section without a model uses the built-in model.\nA model is a Twig template, rendered when the page is created. The following variables are available:\n\n\n\nVariable\nDescription\n\n\n\n\n{{ title }}\nThe title, derived from the file name (without extension, dashes replaced by spaces, first letter capitalized)\n\n\n{{ date }}\nThe current date (YYYY-MM-DD)\n\n\n{{ name }}\nThe file name, without extension\n\n\n{{ section }}\nThe section (first directory of the page path), empty for root pages\n\n\n{{ path }}\nThe page file path, relative to the pages directory\n\n\n{{ site }}\nThe site configuration (e.g. {{ site.author.name }})\n\n\n\nAll Twig built-in filters and functions can be used (e.g. {{ date|date('d\/m\/Y') }}), as well as two additional filters:\n\nyaml_encode: encodes a value for the front matter, quoting it when needed (e.g. a title containing : or #)\nslugify: converts a string to a slug\n\nExample of a models\/blog.md model:\n---\ntitle: {{ title|yaml_encode }}\ndate: {{ date }}\nauthor: {{ site.author.name|default('Anonymous') }}\ntags: [{{ section }}]\n---\n_Your content here_\nAn undefined variable causes an error. To keep Twig syntax as is in the created page, wrap it in a {% verbatim %} block.\nThe %title% and %date% placeholders of previous versions are still supported but deprecated: replace them with {{ title }} and {{ date }}.\nOpen with your editor\nWith the --open option, the page is opened automatically with the editor defined by the editor key of your configuration file (e.g. editor: typora), or with the one given by the --editor option.",
      "content_html": "<h1>new:page</h1>\n<p>Creates a new page.</p>\n<h2 id=\"usage\">Usage<a class=\"heading-anchor\" href=\"#usage\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">Description:\n  Creates a new page\n\nUsage:\n  new:page [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                        Use the given path as working directory\n\nOptions:\n      --name=NAME             Page path name\n      --slugify|--no-slugify  Slugify file name (or disable --no-slugify)\n  -p, --prefix                Prefix the file name with the current date (`YYYY-MM-DD`)\n  -f, --force                 Override the file if already exist\n  -o, --open                  Open editor automatically\n      --editor=EDITOR         Editor to use with open option\n  -h, --help                  Display help for the given command. When no command is given display help for the list command\n      --silent                Do not output any message\n  -q, --quiet                 Only errors are displayed. All other output is suppressed\n  -V, --version               Display this application version\n      --ansi|--no-ansi        Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction        Do not ask any interactive question\n  -v|vv|vvv, --verbose        Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The new:page command creates a new page file.\n  If you run this command without any options, it will ask you for the page name and other options.\n\n    cecil.phar new:page\n    cecil.phar new:page --name=path/to/a-page.md\n    cecil.phar new:page --name=path/to/A Page.md --slugify\n\n  To create a new page with a date prefix (i.e: `YYYY-MM-DD`), run:\n\n    cecil.phar new:page --prefix\n\n  To create a new page and open it with an editor, run:\n\n    cecil.phar new:page --open --editor=editor\n\n  To override an existing page, run:\n\n    cecil.phar new:page --force</code></pre>\n<h2 id=\"page-models\">Page models<a class=\"heading-anchor\" href=\"#page-models\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>You can define your own models for your new pages in the <code translate=\"no\">models</code> directory:</p>\n<ol>\n<li>A section model must be named after the section (e.g. <code translate=\"no\">blog.md</code> for pages created in <code translate=\"no\">blog/</code>)</li>\n<li>The model for root pages must be named <code translate=\"no\">default.md</code></li>\n</ol>\n<p>A page created in a section without a model uses the built-in model.</p>\n<p>A model is a <a href=\"https://twig.symfony.com\" target=\"_blank\" rel=\"noopener noreferrer\">Twig</a> template, rendered when the page is created. The following variables are available:</p>\n<table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">{{ title }}</code></td>\n<td>The title, derived from the file name (without extension, dashes replaced by spaces, first letter capitalized)</td>\n</tr>\n<tr>\n<td><code translate=\"no\">{{ date }}</code></td>\n<td>The current date (<code translate=\"no\">YYYY-MM-DD</code>)</td>\n</tr>\n<tr>\n<td><code translate=\"no\">{{ name }}</code></td>\n<td>The file name, without extension</td>\n</tr>\n<tr>\n<td><code translate=\"no\">{{ section }}</code></td>\n<td>The section (first directory of the page path), empty for root pages</td>\n</tr>\n<tr>\n<td><code translate=\"no\">{{ path }}</code></td>\n<td>The page file path, relative to the pages directory</td>\n</tr>\n<tr>\n<td><code translate=\"no\">{{ site }}</code></td>\n<td>The site configuration (e.g. <code translate=\"no\">{{ site.author.name }}</code>)</td>\n</tr>\n</tbody>\n</table>\n<p>All Twig built-in filters and functions can be used (e.g. <code translate=\"no\">{{ date|date('d/m/Y') }}</code>), as well as two additional filters:</p>\n<ul>\n<li><code translate=\"no\">yaml_encode</code>: encodes a value for the front matter, quoting it when needed (e.g. a title containing <code translate=\"no\">:</code> or <code translate=\"no\">#</code>)</li>\n<li><code translate=\"no\">slugify</code>: converts a string to a slug</li>\n</ul>\n<p>Example of a <code translate=\"no\">models/blog.md</code> model:</p>\n<pre data-lang=\"twig\"><code class=\"language-twig hljs twig\" translate=\"no\"><span class=\"xml\">---\ntitle: </span><span class=\"hljs-template-variable\">{{ title|yaml_encode }}</span><span class=\"xml\">\ndate: </span><span class=\"hljs-template-variable\">{{ <span class=\"hljs-name\">date</span> }}</span><span class=\"xml\">\nauthor: </span><span class=\"hljs-template-variable\">{{ site.author.name|<span class=\"hljs-keyword\">default</span>('Anonymous') }}</span><span class=\"xml\">\ntags: [</span><span class=\"hljs-template-variable\">{{ section }}</span><span class=\"xml\">]\n---\n_Your content here_</span></code></pre>\n<p>An undefined variable causes an error. To keep Twig syntax as is in the created page, wrap it in a <code translate=\"no\">{% verbatim %}</code> block.</p>\n<aside class=\"note note-info\"><p>The <code translate=\"no\">%title%</code> and <code translate=\"no\">%date%</code> placeholders of previous versions are still supported but deprecated: replace them with <code translate=\"no\">{{ title }}</code> and <code translate=\"no\">{{ date }}</code>.</p></aside>\n<h2 id=\"open-with-your-editor\">Open with your editor<a class=\"heading-anchor\" href=\"#open-with-your-editor\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>With the <code translate=\"no\">--open</code> option, the page is opened automatically with the editor defined by the <code translate=\"no\">editor</code> key of your configuration file (e.g. <code translate=\"no\">editor: typora</code>), or with the one given by the <code translate=\"no\">--editor</code> option.</p>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/commands/serve/",
      "url": "https://cloudflare.cecil.app/documentation/commands/serve/",
      "title": "serve",
      "summary": "Preview the website with the built-in server.",
      "date_published": "2020-12-19T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "serve\nBuilds and serves the site locally.\nThe web server is designed to aid website testing. It is not intended to be a full-featured web server and it should not be used on a public network.\nUsage\nDescription:\n  Starts the built-in server\n\nUsage:\n  serve [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                             Use the given path as working directory\n\nOptions:\n  -o, --open                       Open web browser automatically\n      --host=HOST                  Server host [default: \"localhost\"]\n      --port=PORT                  Server port [default: \"8000\"]\n  -w, --watch|--no-watch           Enable (or disable --no-watch) changes watcher (enabled by default)\n  -i, --incremental                Enable incremental builds (rebuild only changed pages)\n  -d, --drafts                     Include drafts\n      --optimize|--no-optimize     Enable (or disable --no-optimize) optimization of generated files\n  -c, --config=CONFIG              Set the path to extra config files (comma-separated)\n      --clear-cache[=CLEAR-CACHE]  Clear cache before build (optional cache key as regular expression) [default: false]\n  -p, --page=PAGE                  Build a specific page\n      --no-ignore-vcs              Changes watcher must not ignore VCS directories\n  -m, --metrics                    Show build metrics (duration and memory) of each step\n      --timeout=TIMEOUT            Sets the process timeout (max. runtime) in seconds [default: 7200]\n      --notify                     Send desktop notification on server start\n  -b, --background                 Run the server in the background\n  -h, --help                       Display help for the given command. When no command is given display help for the list command\n      --silent                     Do not output any message\n  -q, --quiet                      Only errors are displayed. All other output is suppressed\n  -V, --version                    Display this application version\n      --ansi|--no-ansi             Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction             Do not ask any interactive question\n  -v|vv|vvv, --verbose             Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The serve command starts the live-reloading-built-in web server.\n\n    cecil.phar serve\n    cecil.phar serve path\/to\/the\/working\/directory\n    cecil.phar serve --open\n    cecil.phar serve --drafts\n    cecil.phar serve --no-watch\n\n  To speed up local development you can enable incremental builds with the --incremental option.\n  When content pages change, Cecil rebuilds just those pages.\n  When templates change, Cecil rebuilds only pages using those templates (including Twig dependencies such as extends\/include).\n  Any other change (data, config, static or asset file, or file deletion) triggers a full rebuild:\n\n    cecil.phar serve --incremental\n\n  You can use a custom host and port by using the --host and --port options:\n\n    cecil.phar serve --host=127.0.0.1 --port=8080\n\n  To build the website with an extra configuration file, you can use the --config option.\n  This is useful during local development to override some settings without modifying the main configuration:\n\n    cecil.phar serve --config=config\/dev.yml\n\n  To start the server with changes watcher not ignoring VCS directories, run:\n\n    cecil.phar serve --no-ignore-vcs\n\n  To define the process timeout (in seconds), run:\n\n    cecil.phar serve --timeout=7200\n\n  Send a desktop notification on server start, run:\n\n    cecil.phar serve --notify\n\n  To run the server in the background, run:\n\n    cecil.phar serve --background\n    cecil.phar serve -b\n\n  Then stop it with:\n\n    cecil.phar serve:stop\nIn background mode, file changes are not watched.\nserve:background\nAlias of serve --background: starts the built-in server in the background without occupying the terminal. It accepts the same options as serve.\nDescription:\n  Starts the built-in server in the background (alias of `serve --background`)\n\nUsage:\n  serve:background [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                             Use the given path as working directory\n\nOptions:\n  -o, --open                       Open web browser automatically\n      --host=HOST                  Server host [default: \"localhost\"]\n      --port=PORT                  Server port [default: \"8000\"]\n  -w, --watch|--no-watch           Enable (or disable --no-watch) changes watcher (enabled by default)\n  -i, --incremental                Enable incremental builds (rebuild only changed pages)\n  -d, --drafts                     Include drafts\n      --optimize|--no-optimize     Enable (or disable --no-optimize) optimization of generated files\n  -c, --config=CONFIG              Set the path to extra config files (comma-separated)\n      --clear-cache[=CLEAR-CACHE]  Clear cache before build (optional cache key as regular expression) [default: false]\n  -p, --page=PAGE                  Build a specific page\n      --no-ignore-vcs              Changes watcher must not ignore VCS directories\n  -m, --metrics                    Show build metrics (duration and memory) of each step\n      --timeout=TIMEOUT            Sets the process timeout (max. runtime) in seconds [default: 7200]\n      --notify                     Send desktop notification on server start\n  -b, --background                 Run the server in the background\n  -h, --help                       Display help for the given command. When no command is given display help for the list command\n      --silent                     Do not output any message\n  -q, --quiet                      Only errors are displayed. All other output is suppressed\n  -V, --version                    Display this application version\n      --ansi|--no-ansi             Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction             Do not ask any interactive question\n  -v|vv|vvv, --verbose             Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The serve:background command starts the built-in web server in the background.\n\n    cecil.phar serve:background\n    cecil.phar serve:background path\/to\/the\/working\/directory\n\n  This command is an alias of serve --background.\n\n  Stop the server with:\n\n    cecil.phar serve:stop\nserve:log\nDisplays the combined server and error logs, sorted by date.\nDescription:\n  Shows combined server and error logs\n\nUsage:\n  serve:log [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                  Use the given path as working directory\n\nOptions:\n  -l, --lines=LINES     Number of entries to display [default: 25]\n  -h, --help            Display help for the given command. When no command is given display help for the list command\n      --silent          Do not output any message\n  -q, --quiet           Only errors are displayed. All other output is suppressed\n  -V, --version         Display this application version\n      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The serve:log command displays entries from combined server and error logs.\n\n    cecil.phar serve:log\n    cecil.phar serve:log path\/to\/the\/working\/directory\n    cecil.phar serve:log --lines=100\n    cecil.phar serve:log -l 100\nLogs are read from the .cecil\/errors.log and .cecil\/server.log files, which is useful to debug issues with the local development server.",
      "content_html": "<h1>serve</h1>\n<p>Builds and serves the site locally.</p>\n<aside class=\"note note-warning\"><p>The web server is designed to aid website testing. It is not intended to be a full-featured web server and it should not be used on a public network.</p></aside>\n<h2 id=\"usage\">Usage<a class=\"heading-anchor\" href=\"#usage\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">Description:\n  Starts the built-in server\n\nUsage:\n  serve [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                             Use the given path as working directory\n\nOptions:\n  -o, --open                       Open web browser automatically\n      --host=HOST                  Server host [default: \"localhost\"]\n      --port=PORT                  Server port [default: \"8000\"]\n  -w, --watch|--no-watch           Enable (or disable --no-watch) changes watcher (enabled by default)\n  -i, --incremental                Enable incremental builds (rebuild only changed pages)\n  -d, --drafts                     Include drafts\n      --optimize|--no-optimize     Enable (or disable --no-optimize) optimization of generated files\n  -c, --config=CONFIG              Set the path to extra config files (comma-separated)\n      --clear-cache[=CLEAR-CACHE]  Clear cache before build (optional cache key as regular expression) [default: false]\n  -p, --page=PAGE                  Build a specific page\n      --no-ignore-vcs              Changes watcher must not ignore VCS directories\n  -m, --metrics                    Show build metrics (duration and memory) of each step\n      --timeout=TIMEOUT            Sets the process timeout (max. runtime) in seconds [default: 7200]\n      --notify                     Send desktop notification on server start\n  -b, --background                 Run the server in the background\n  -h, --help                       Display help for the given command. When no command is given display help for the list command\n      --silent                     Do not output any message\n  -q, --quiet                      Only errors are displayed. All other output is suppressed\n  -V, --version                    Display this application version\n      --ansi|--no-ansi             Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction             Do not ask any interactive question\n  -v|vv|vvv, --verbose             Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The serve command starts the live-reloading-built-in web server.\n\n    cecil.phar serve\n    cecil.phar serve path/to/the/working/directory\n    cecil.phar serve --open\n    cecil.phar serve --drafts\n    cecil.phar serve --no-watch\n\n  To speed up local development you can enable incremental builds with the --incremental option.\n  When content pages change, Cecil rebuilds just those pages.\n  When templates change, Cecil rebuilds only pages using those templates (including Twig dependencies such as extends/include).\n  Any other change (data, config, static or asset file, or file deletion) triggers a full rebuild:\n\n    cecil.phar serve --incremental\n\n  You can use a custom host and port by using the --host and --port options:\n\n    cecil.phar serve --host=127.0.0.1 --port=8080\n\n  To build the website with an extra configuration file, you can use the --config option.\n  This is useful during local development to override some settings without modifying the main configuration:\n\n    cecil.phar serve --config=config/dev.yml\n\n  To start the server with changes watcher not ignoring VCS directories, run:\n\n    cecil.phar serve --no-ignore-vcs\n\n  To define the process timeout (in seconds), run:\n\n    cecil.phar serve --timeout=7200\n\n  Send a desktop notification on server start, run:\n\n    cecil.phar serve --notify\n\n  To run the server in the background, run:\n\n    cecil.phar serve --background\n    cecil.phar serve -b\n\n  Then stop it with:\n\n    cecil.phar serve:stop</code></pre>\n<p>In background mode, file changes are not watched.</p>\n<h2 id=\"serve-background\">serve:background<a class=\"heading-anchor\" href=\"#serve-background\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Alias of <code translate=\"no\">serve --background</code>: starts the built-in server in the background without occupying the terminal. It accepts the same options as <code translate=\"no\">serve</code>.</p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">Description:\n  Starts the built-in server in the background (alias of `serve --background`)\n\nUsage:\n  serve:background [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                             Use the given path as working directory\n\nOptions:\n  -o, --open                       Open web browser automatically\n      --host=HOST                  Server host [default: \"localhost\"]\n      --port=PORT                  Server port [default: \"8000\"]\n  -w, --watch|--no-watch           Enable (or disable --no-watch) changes watcher (enabled by default)\n  -i, --incremental                Enable incremental builds (rebuild only changed pages)\n  -d, --drafts                     Include drafts\n      --optimize|--no-optimize     Enable (or disable --no-optimize) optimization of generated files\n  -c, --config=CONFIG              Set the path to extra config files (comma-separated)\n      --clear-cache[=CLEAR-CACHE]  Clear cache before build (optional cache key as regular expression) [default: false]\n  -p, --page=PAGE                  Build a specific page\n      --no-ignore-vcs              Changes watcher must not ignore VCS directories\n  -m, --metrics                    Show build metrics (duration and memory) of each step\n      --timeout=TIMEOUT            Sets the process timeout (max. runtime) in seconds [default: 7200]\n      --notify                     Send desktop notification on server start\n  -b, --background                 Run the server in the background\n  -h, --help                       Display help for the given command. When no command is given display help for the list command\n      --silent                     Do not output any message\n  -q, --quiet                      Only errors are displayed. All other output is suppressed\n  -V, --version                    Display this application version\n      --ansi|--no-ansi             Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction             Do not ask any interactive question\n  -v|vv|vvv, --verbose             Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The serve:background command starts the built-in web server in the background.\n\n    cecil.phar serve:background\n    cecil.phar serve:background path/to/the/working/directory\n\n  This command is an alias of serve --background.\n\n  Stop the server with:\n\n    cecil.phar serve:stop</code></pre>\n<h2 id=\"serve-log\">serve:log<a class=\"heading-anchor\" href=\"#serve-log\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Displays the combined server and error logs, sorted by date.</p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">Description:\n  Shows combined server and error logs\n\nUsage:\n  serve:log [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                  Use the given path as working directory\n\nOptions:\n  -l, --lines=LINES     Number of entries to display [default: 25]\n  -h, --help            Display help for the given command. When no command is given display help for the list command\n      --silent          Do not output any message\n  -q, --quiet           Only errors are displayed. All other output is suppressed\n  -V, --version         Display this application version\n      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The serve:log command displays entries from combined server and error logs.\n\n    cecil.phar serve:log\n    cecil.phar serve:log path/to/the/working/directory\n    cecil.phar serve:log --lines=100\n    cecil.phar serve:log -l 100</code></pre>\n<p>Logs are read from the <code translate=\"no\">.cecil/errors.log</code> and <code translate=\"no\">.cecil/server.log</code> files, which is useful to debug issues with the local development server.</p>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/configuration/locale-codes/",
      "url": "https://cloudflare.cecil.app/documentation/configuration/locale-codes/",
      "title": "Locale codes",
      "summary": "List of available locale codes to use with the languages option.",
      "date_published": "2020-12-19T00:00:00+00:00",
      "date_modified": "2026-10-16T00:00:00+00:00","content_text": "Locale codes\nAvailable locale codes (language_COUNTRY) used by the languages option.\nList of locale codes\n\n\n\nLocale\nCode\n\n\n\n\nAlbanian (Albania)\nsq_AL\n\n\nAlbanian\nsq\n\n\nArabic (Algeria)\nar_DZ\n\n\nArabic (Bahrain)\nar_BH\n\n\nArabic (Egypt)\nar_EG\n\n\nArabic (Iraq)\nar_IQ\n\n\nArabic (Jordan)\nar_JO\n\n\nArabic (Kuwait)\nar_KW\n\n\nArabic (Lebanon)\nar_LB\n\n\nArabic (Libya)\nar_LY\n\n\nArabic (Morocco)\nar_MA\n\n\nArabic (Oman)\nar_OM\n\n\nArabic (Qatar)\nar_QA\n\n\nArabic (Saudi Arabia)\nar_SA\n\n\nArabic (Sudan)\nar_SD\n\n\nArabic (Syria)\nar_SY\n\n\nArabic (Tunisia)\nar_TN\n\n\nArabic (United Arab Emirates)\nar_AE\n\n\nArabic (Yemen)\nar_YE\n\n\nArabic\nar\n\n\nBelarusian (Belarus)\nbe_BY\n\n\nBelarusian\nbe\n\n\nBulgarian (Bulgaria)\nbg_BG\n\n\nBulgarian\nbg\n\n\nCatalan (Spain)\nca_ES\n\n\nCatalan\nca\n\n\nChinese (China)\nzh_CN\n\n\nChinese (Hong Kong)\nzh_HK\n\n\nChinese (Singapore)\nzh_SG\n\n\nChinese (Taiwan)\nzh_TW\n\n\nChinese\nzh\n\n\nCroatian (Croatia)\nhr_HR\n\n\nCroatian\nhr\n\n\nCzech (Czech Republic)\ncs_CZ\n\n\nCzech\ncs\n\n\nDanish (Denmark)\nda_DK\n\n\nDanish\nda\n\n\nDutch (Belgium)\nnl_BE\n\n\nDutch (Netherlands)\nnl_NL\n\n\nDutch\nnl\n\n\nEnglish (Australia)\nen_AU\n\n\nEnglish (Canada)\nen_CA\n\n\nEnglish (India)\nen_IN\n\n\nEnglish (Ireland)\nen_IE\n\n\nEnglish (Malta)\nen_MT\n\n\nEnglish (New Zealand)\nen_NZ\n\n\nEnglish (Philippines)\nen_PH\n\n\nEnglish (Singapore)\nen_SG\n\n\nEnglish (South Africa)\nen_ZA\n\n\nEnglish (United Kingdom)\nen_GB\n\n\nEnglish (United States)\nen_US\n\n\nEnglish\nen\n\n\nEstonian (Estonia)\net_EE\n\n\nEstonian\net\n\n\nFinnish (Finland)\nfi_FI\n\n\nFinnish\nfi\n\n\nFrench (Belgium)\nfr_BE\n\n\nFrench (Canada)\nfr_CA\n\n\nFrench (France)\nfr_FR\n\n\nFrench (Luxembourg)\nfr_LU\n\n\nFrench (Switzerland)\nfr_CH\n\n\nFrench\nfr\n\n\nGerman (Austria)\nde_AT\n\n\nGerman (Germany)\nde_DE\n\n\nGerman (Luxembourg)\nde_LU\n\n\nGerman (Switzerland)\nde_CH\n\n\nGerman\nde\n\n\nGreek (Cyprus)\nel_CY\n\n\nGreek (Greece)\nel_GR\n\n\nGreek\nel\n\n\nHebrew (Israel)\nhe_IL\n\n\nHebrew (Israel, legacy code)\niw_IL\n\n\nHebrew\nhe\n\n\nHebrew (legacy code)\niw\n\n\nHindi (India)\nhi_IN\n\n\nHindi\nhi\n\n\nHungarian (Hungary)\nhu_HU\n\n\nHungarian\nhu\n\n\nIcelandic (Iceland)\nis_IS\n\n\nIcelandic\nis\n\n\nIndonesian (Indonesia)\nid_ID\n\n\nIndonesian (Indonesia, legacy code)\nin_ID\n\n\nIndonesian\nid\n\n\nIndonesian (legacy code)\nin\n\n\nIrish (Ireland)\nga_IE\n\n\nIrish\nga\n\n\nItalian (Italy)\nit_IT\n\n\nItalian (Switzerland)\nit_CH\n\n\nItalian\nit\n\n\nJapanese (Japan)\nja_JP\n\n\nJapanese (Japan, JP)\nja_JP_JP\n\n\nJapanese\nja\n\n\nKorean (South Korea)\nko_KR\n\n\nKorean\nko\n\n\nLatvian (Latvia)\nlv_LV\n\n\nLatvian\nlv\n\n\nLithuanian (Lithuania)\nlt_LT\n\n\nLithuanian\nlt\n\n\nMacedonian (North Macedonia)\nmk_MK\n\n\nMacedonian\nmk\n\n\nMalay (Malaysia)\nms_MY\n\n\nMalay\nms\n\n\nMaltese (Malta)\nmt_MT\n\n\nMaltese\nmt\n\n\nNorwegian (Norway)\nno_NO\n\n\nNorwegian (Norway, Nynorsk)\nno_NO_NY\n\n\nNorwegian\nno\n\n\nPolish (Poland)\npl_PL\n\n\nPolish\npl\n\n\nPortuguese (Brazil)\npt_BR\n\n\nPortuguese (Portugal)\npt_PT\n\n\nPortuguese\npt\n\n\nRomanian (Romania)\nro_RO\n\n\nRomanian\nro\n\n\nRussian (Russia)\nru_RU\n\n\nRussian\nru\n\n\nSerbian (Bosnia and Herzegovina)\nsr_BA\n\n\nSerbian (Montenegro)\nsr_ME\n\n\nSerbian (Serbia)\nsr_RS\n\n\nSerbian (Serbia and Montenegro)\nsr_CS\n\n\nSerbian\nsr\n\n\nSlovak (Slovakia)\nsk_SK\n\n\nSlovak\nsk\n\n\nSlovenian (Slovenia)\nsl_SI\n\n\nSlovenian\nsl\n\n\nSpanish (Argentina)\nes_AR\n\n\nSpanish (Bolivia)\nes_BO\n\n\nSpanish (Chile)\nes_CL\n\n\nSpanish (Colombia)\nes_CO\n\n\nSpanish (Costa Rica)\nes_CR\n\n\nSpanish (Dominican Republic)\nes_DO\n\n\nSpanish (Ecuador)\nes_EC\n\n\nSpanish (El Salvador)\nes_SV\n\n\nSpanish (Guatemala)\nes_GT\n\n\nSpanish (Honduras)\nes_HN\n\n\nSpanish (Mexico)\nes_MX\n\n\nSpanish (Nicaragua)\nes_NI\n\n\nSpanish (Panama)\nes_PA\n\n\nSpanish (Paraguay)\nes_PY\n\n\nSpanish (Peru)\nes_PE\n\n\nSpanish (Puerto Rico)\nes_PR\n\n\nSpanish (Spain)\nes_ES\n\n\nSpanish (United States)\nes_US\n\n\nSpanish (Uruguay)\nes_UY\n\n\nSpanish (Venezuela)\nes_VE\n\n\nSpanish\nes\n\n\nSwedish (Sweden)\nsv_SE\n\n\nSwedish\nsv\n\n\nThai (Thailand)\nth_TH\n\n\nThai (Thailand, TH)\nth_TH_TH\n\n\nThai\nth\n\n\nTurkish (Turkey)\ntr_TR\n\n\nTurkish\ntr\n\n\nUkrainian (Ukraine)\nuk_UA\n\n\nUkrainian\nuk\n\n\nVietnamese (Vietnam)\nvi_VN\n\n\nVietnamese\nvi\n\n\n\n",
      "content_html": "<h1>Locale codes</h1>\n<p>Available locale codes (<code translate=\"no\">language_COUNTRY</code>) used by the <a href=\"2-languages.md#languages\"><code translate=\"no\">languages</code></a> option.</p>\n<h2 id=\"list-of-locale-codes\">List of locale codes<a class=\"heading-anchor\" href=\"#list-of-locale-codes\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<table>\n<thead>\n<tr>\n<th>Locale</th>\n<th>Code</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Albanian (Albania)</td>\n<td>sq_AL</td>\n</tr>\n<tr>\n<td>Albanian</td>\n<td>sq</td>\n</tr>\n<tr>\n<td>Arabic (Algeria)</td>\n<td>ar_DZ</td>\n</tr>\n<tr>\n<td>Arabic (Bahrain)</td>\n<td>ar_BH</td>\n</tr>\n<tr>\n<td>Arabic (Egypt)</td>\n<td>ar_EG</td>\n</tr>\n<tr>\n<td>Arabic (Iraq)</td>\n<td>ar_IQ</td>\n</tr>\n<tr>\n<td>Arabic (Jordan)</td>\n<td>ar_JO</td>\n</tr>\n<tr>\n<td>Arabic (Kuwait)</td>\n<td>ar_KW</td>\n</tr>\n<tr>\n<td>Arabic (Lebanon)</td>\n<td>ar_LB</td>\n</tr>\n<tr>\n<td>Arabic (Libya)</td>\n<td>ar_LY</td>\n</tr>\n<tr>\n<td>Arabic (Morocco)</td>\n<td>ar_MA</td>\n</tr>\n<tr>\n<td>Arabic (Oman)</td>\n<td>ar_OM</td>\n</tr>\n<tr>\n<td>Arabic (Qatar)</td>\n<td>ar_QA</td>\n</tr>\n<tr>\n<td>Arabic (Saudi Arabia)</td>\n<td>ar_SA</td>\n</tr>\n<tr>\n<td>Arabic (Sudan)</td>\n<td>ar_SD</td>\n</tr>\n<tr>\n<td>Arabic (Syria)</td>\n<td>ar_SY</td>\n</tr>\n<tr>\n<td>Arabic (Tunisia)</td>\n<td>ar_TN</td>\n</tr>\n<tr>\n<td>Arabic (United Arab Emirates)</td>\n<td>ar_AE</td>\n</tr>\n<tr>\n<td>Arabic (Yemen)</td>\n<td>ar_YE</td>\n</tr>\n<tr>\n<td>Arabic</td>\n<td>ar</td>\n</tr>\n<tr>\n<td>Belarusian (Belarus)</td>\n<td>be_BY</td>\n</tr>\n<tr>\n<td>Belarusian</td>\n<td>be</td>\n</tr>\n<tr>\n<td>Bulgarian (Bulgaria)</td>\n<td>bg_BG</td>\n</tr>\n<tr>\n<td>Bulgarian</td>\n<td>bg</td>\n</tr>\n<tr>\n<td>Catalan (Spain)</td>\n<td>ca_ES</td>\n</tr>\n<tr>\n<td>Catalan</td>\n<td>ca</td>\n</tr>\n<tr>\n<td>Chinese (China)</td>\n<td>zh_CN</td>\n</tr>\n<tr>\n<td>Chinese (Hong Kong)</td>\n<td>zh_HK</td>\n</tr>\n<tr>\n<td>Chinese (Singapore)</td>\n<td>zh_SG</td>\n</tr>\n<tr>\n<td>Chinese (Taiwan)</td>\n<td>zh_TW</td>\n</tr>\n<tr>\n<td>Chinese</td>\n<td>zh</td>\n</tr>\n<tr>\n<td>Croatian (Croatia)</td>\n<td>hr_HR</td>\n</tr>\n<tr>\n<td>Croatian</td>\n<td>hr</td>\n</tr>\n<tr>\n<td>Czech (Czech Republic)</td>\n<td>cs_CZ</td>\n</tr>\n<tr>\n<td>Czech</td>\n<td>cs</td>\n</tr>\n<tr>\n<td>Danish (Denmark)</td>\n<td>da_DK</td>\n</tr>\n<tr>\n<td>Danish</td>\n<td>da</td>\n</tr>\n<tr>\n<td>Dutch (Belgium)</td>\n<td>nl_BE</td>\n</tr>\n<tr>\n<td>Dutch (Netherlands)</td>\n<td>nl_NL</td>\n</tr>\n<tr>\n<td>Dutch</td>\n<td>nl</td>\n</tr>\n<tr>\n<td>English (Australia)</td>\n<td>en_AU</td>\n</tr>\n<tr>\n<td>English (Canada)</td>\n<td>en_CA</td>\n</tr>\n<tr>\n<td>English (India)</td>\n<td>en_IN</td>\n</tr>\n<tr>\n<td>English (Ireland)</td>\n<td>en_IE</td>\n</tr>\n<tr>\n<td>English (Malta)</td>\n<td>en_MT</td>\n</tr>\n<tr>\n<td>English (New Zealand)</td>\n<td>en_NZ</td>\n</tr>\n<tr>\n<td>English (Philippines)</td>\n<td>en_PH</td>\n</tr>\n<tr>\n<td>English (Singapore)</td>\n<td>en_SG</td>\n</tr>\n<tr>\n<td>English (South Africa)</td>\n<td>en_ZA</td>\n</tr>\n<tr>\n<td>English (United Kingdom)</td>\n<td>en_GB</td>\n</tr>\n<tr>\n<td>English (United States)</td>\n<td>en_US</td>\n</tr>\n<tr>\n<td>English</td>\n<td>en</td>\n</tr>\n<tr>\n<td>Estonian (Estonia)</td>\n<td>et_EE</td>\n</tr>\n<tr>\n<td>Estonian</td>\n<td>et</td>\n</tr>\n<tr>\n<td>Finnish (Finland)</td>\n<td>fi_FI</td>\n</tr>\n<tr>\n<td>Finnish</td>\n<td>fi</td>\n</tr>\n<tr>\n<td>French (Belgium)</td>\n<td>fr_BE</td>\n</tr>\n<tr>\n<td>French (Canada)</td>\n<td>fr_CA</td>\n</tr>\n<tr>\n<td>French (France)</td>\n<td>fr_FR</td>\n</tr>\n<tr>\n<td>French (Luxembourg)</td>\n<td>fr_LU</td>\n</tr>\n<tr>\n<td>French (Switzerland)</td>\n<td>fr_CH</td>\n</tr>\n<tr>\n<td>French</td>\n<td>fr</td>\n</tr>\n<tr>\n<td>German (Austria)</td>\n<td>de_AT</td>\n</tr>\n<tr>\n<td>German (Germany)</td>\n<td>de_DE</td>\n</tr>\n<tr>\n<td>German (Luxembourg)</td>\n<td>de_LU</td>\n</tr>\n<tr>\n<td>German (Switzerland)</td>\n<td>de_CH</td>\n</tr>\n<tr>\n<td>German</td>\n<td>de</td>\n</tr>\n<tr>\n<td>Greek (Cyprus)</td>\n<td>el_CY</td>\n</tr>\n<tr>\n<td>Greek (Greece)</td>\n<td>el_GR</td>\n</tr>\n<tr>\n<td>Greek</td>\n<td>el</td>\n</tr>\n<tr>\n<td>Hebrew (Israel)</td>\n<td>he_IL</td>\n</tr>\n<tr>\n<td>Hebrew (Israel, legacy code)</td>\n<td>iw_IL</td>\n</tr>\n<tr>\n<td>Hebrew</td>\n<td>he</td>\n</tr>\n<tr>\n<td>Hebrew (legacy code)</td>\n<td>iw</td>\n</tr>\n<tr>\n<td>Hindi (India)</td>\n<td>hi_IN</td>\n</tr>\n<tr>\n<td>Hindi</td>\n<td>hi</td>\n</tr>\n<tr>\n<td>Hungarian (Hungary)</td>\n<td>hu_HU</td>\n</tr>\n<tr>\n<td>Hungarian</td>\n<td>hu</td>\n</tr>\n<tr>\n<td>Icelandic (Iceland)</td>\n<td>is_IS</td>\n</tr>\n<tr>\n<td>Icelandic</td>\n<td>is</td>\n</tr>\n<tr>\n<td>Indonesian (Indonesia)</td>\n<td>id_ID</td>\n</tr>\n<tr>\n<td>Indonesian (Indonesia, legacy code)</td>\n<td>in_ID</td>\n</tr>\n<tr>\n<td>Indonesian</td>\n<td>id</td>\n</tr>\n<tr>\n<td>Indonesian (legacy code)</td>\n<td>in</td>\n</tr>\n<tr>\n<td>Irish (Ireland)</td>\n<td>ga_IE</td>\n</tr>\n<tr>\n<td>Irish</td>\n<td>ga</td>\n</tr>\n<tr>\n<td>Italian (Italy)</td>\n<td>it_IT</td>\n</tr>\n<tr>\n<td>Italian (Switzerland)</td>\n<td>it_CH</td>\n</tr>\n<tr>\n<td>Italian</td>\n<td>it</td>\n</tr>\n<tr>\n<td>Japanese (Japan)</td>\n<td>ja_JP</td>\n</tr>\n<tr>\n<td>Japanese (Japan, JP)</td>\n<td>ja_JP_JP</td>\n</tr>\n<tr>\n<td>Japanese</td>\n<td>ja</td>\n</tr>\n<tr>\n<td>Korean (South Korea)</td>\n<td>ko_KR</td>\n</tr>\n<tr>\n<td>Korean</td>\n<td>ko</td>\n</tr>\n<tr>\n<td>Latvian (Latvia)</td>\n<td>lv_LV</td>\n</tr>\n<tr>\n<td>Latvian</td>\n<td>lv</td>\n</tr>\n<tr>\n<td>Lithuanian (Lithuania)</td>\n<td>lt_LT</td>\n</tr>\n<tr>\n<td>Lithuanian</td>\n<td>lt</td>\n</tr>\n<tr>\n<td>Macedonian (North Macedonia)</td>\n<td>mk_MK</td>\n</tr>\n<tr>\n<td>Macedonian</td>\n<td>mk</td>\n</tr>\n<tr>\n<td>Malay (Malaysia)</td>\n<td>ms_MY</td>\n</tr>\n<tr>\n<td>Malay</td>\n<td>ms</td>\n</tr>\n<tr>\n<td>Maltese (Malta)</td>\n<td>mt_MT</td>\n</tr>\n<tr>\n<td>Maltese</td>\n<td>mt</td>\n</tr>\n<tr>\n<td>Norwegian (Norway)</td>\n<td>no_NO</td>\n</tr>\n<tr>\n<td>Norwegian (Norway, Nynorsk)</td>\n<td>no_NO_NY</td>\n</tr>\n<tr>\n<td>Norwegian</td>\n<td>no</td>\n</tr>\n<tr>\n<td>Polish (Poland)</td>\n<td>pl_PL</td>\n</tr>\n<tr>\n<td>Polish</td>\n<td>pl</td>\n</tr>\n<tr>\n<td>Portuguese (Brazil)</td>\n<td>pt_BR</td>\n</tr>\n<tr>\n<td>Portuguese (Portugal)</td>\n<td>pt_PT</td>\n</tr>\n<tr>\n<td>Portuguese</td>\n<td>pt</td>\n</tr>\n<tr>\n<td>Romanian (Romania)</td>\n<td>ro_RO</td>\n</tr>\n<tr>\n<td>Romanian</td>\n<td>ro</td>\n</tr>\n<tr>\n<td>Russian (Russia)</td>\n<td>ru_RU</td>\n</tr>\n<tr>\n<td>Russian</td>\n<td>ru</td>\n</tr>\n<tr>\n<td>Serbian (Bosnia and Herzegovina)</td>\n<td>sr_BA</td>\n</tr>\n<tr>\n<td>Serbian (Montenegro)</td>\n<td>sr_ME</td>\n</tr>\n<tr>\n<td>Serbian (Serbia)</td>\n<td>sr_RS</td>\n</tr>\n<tr>\n<td>Serbian (Serbia and Montenegro)</td>\n<td>sr_CS</td>\n</tr>\n<tr>\n<td>Serbian</td>\n<td>sr</td>\n</tr>\n<tr>\n<td>Slovak (Slovakia)</td>\n<td>sk_SK</td>\n</tr>\n<tr>\n<td>Slovak</td>\n<td>sk</td>\n</tr>\n<tr>\n<td>Slovenian (Slovenia)</td>\n<td>sl_SI</td>\n</tr>\n<tr>\n<td>Slovenian</td>\n<td>sl</td>\n</tr>\n<tr>\n<td>Spanish (Argentina)</td>\n<td>es_AR</td>\n</tr>\n<tr>\n<td>Spanish (Bolivia)</td>\n<td>es_BO</td>\n</tr>\n<tr>\n<td>Spanish (Chile)</td>\n<td>es_CL</td>\n</tr>\n<tr>\n<td>Spanish (Colombia)</td>\n<td>es_CO</td>\n</tr>\n<tr>\n<td>Spanish (Costa Rica)</td>\n<td>es_CR</td>\n</tr>\n<tr>\n<td>Spanish (Dominican Republic)</td>\n<td>es_DO</td>\n</tr>\n<tr>\n<td>Spanish (Ecuador)</td>\n<td>es_EC</td>\n</tr>\n<tr>\n<td>Spanish (El Salvador)</td>\n<td>es_SV</td>\n</tr>\n<tr>\n<td>Spanish (Guatemala)</td>\n<td>es_GT</td>\n</tr>\n<tr>\n<td>Spanish (Honduras)</td>\n<td>es_HN</td>\n</tr>\n<tr>\n<td>Spanish (Mexico)</td>\n<td>es_MX</td>\n</tr>\n<tr>\n<td>Spanish (Nicaragua)</td>\n<td>es_NI</td>\n</tr>\n<tr>\n<td>Spanish (Panama)</td>\n<td>es_PA</td>\n</tr>\n<tr>\n<td>Spanish (Paraguay)</td>\n<td>es_PY</td>\n</tr>\n<tr>\n<td>Spanish (Peru)</td>\n<td>es_PE</td>\n</tr>\n<tr>\n<td>Spanish (Puerto Rico)</td>\n<td>es_PR</td>\n</tr>\n<tr>\n<td>Spanish (Spain)</td>\n<td>es_ES</td>\n</tr>\n<tr>\n<td>Spanish (United States)</td>\n<td>es_US</td>\n</tr>\n<tr>\n<td>Spanish (Uruguay)</td>\n<td>es_UY</td>\n</tr>\n<tr>\n<td>Spanish (Venezuela)</td>\n<td>es_VE</td>\n</tr>\n<tr>\n<td>Spanish</td>\n<td>es</td>\n</tr>\n<tr>\n<td>Swedish (Sweden)</td>\n<td>sv_SE</td>\n</tr>\n<tr>\n<td>Swedish</td>\n<td>sv</td>\n</tr>\n<tr>\n<td>Thai (Thailand)</td>\n<td>th_TH</td>\n</tr>\n<tr>\n<td>Thai (Thailand, TH)</td>\n<td>th_TH_TH</td>\n</tr>\n<tr>\n<td>Thai</td>\n<td>th</td>\n</tr>\n<tr>\n<td>Turkish (Turkey)</td>\n<td>tr_TR</td>\n</tr>\n<tr>\n<td>Turkish</td>\n<td>tr</td>\n</tr>\n<tr>\n<td>Ukrainian (Ukraine)</td>\n<td>uk_UA</td>\n</tr>\n<tr>\n<td>Ukrainian</td>\n<td>uk</td>\n</tr>\n<tr>\n<td>Vietnamese (Vietnam)</td>\n<td>vi_VN</td>\n</tr>\n<tr>\n<td>Vietnamese</td>\n<td>vi</td>\n</tr>\n</tbody>\n</table>\n<hr>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/commands/build/",
      "url": "https://cloudflare.cecil.app/documentation/commands/build/",
      "title": "build",
      "summary": "Build the website.",
      "date_published": "2020-12-19T00:00:00+00:00",
      "date_modified": "2026-11-01T00:00:00+00:00","content_text": "build\nBuilds the site.\nUsage\nDescription:\n  Builds the website\n\nUsage:\n  build [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                               Use the given path as working directory\n\nOptions:\n  -d, --drafts                       Include drafts\n  -u, --baseurl=BASEURL              Set the base URL\n  -o, --output=OUTPUT                Set the output directory\n      --optimize|--no-optimize       Enable (or disable --no-optimize) optimization of generated files\n      --dry-run                      Build without saving\n  -c, --config=CONFIG                Set the path to extra config files (comma-separated)\n      --clear-cache[=CLEAR-CACHE]    Clear cache before build (optional cache key as regular expression) [default: false]\n  -p, --page=PAGE                    Build a specific page\n      --render-subset=RENDER-SUBSET  Render a subset of pages\n      --show-pages                   Show list of built pages in a table\n  -m, --metrics                      Show build metrics (duration and memory) of each step\n      --notify                       Send desktop notification on build completion\n  -h, --help                         Display help for the given command. When no command is given display help for the list command\n      --silent                       Do not output any message\n  -q, --quiet                        Only errors are displayed. All other output is suppressed\n  -V, --version                      Display this application version\n      --ansi|--no-ansi               Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction               Do not ask any interactive question\n  -v|vv|vvv, --verbose               Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The build command generates the website in the output directory.\n\n    cecil.phar build\n    cecil.phar build path\/to\/the\/working\/directory\n    cecil.phar build --baseurl=https:\/\/example.com\/\n    cecil.phar build --output=_site\n\n  To build the website with optimization of generated files, you can use the --optimize option.\n  This is useful to reduce the size of the generated files and improve performance:\n\n    cecil.phar build --optimize\n    cecil.phar build --no-optimize\n\n  To build the website without overwriting files in the output directory, you can use the --dry-run option.\n  This is useful to check what would be built without actually writing files:\n\n    cecil.phar build --dry-run\n\n  To build the website with a specific subset of rendered pages, you can use the --render-subset option.\n  This is useful to build only a part of the website, for example, only \"hot\" pages or a specific section:\n\n    cecil.phar build --render-subset=subset\n\n  To show build steps metrics, run:\n\n    cecil.phar build --metrics\n\n  Send a desktop notification on build completion, run:\n\n    cecil.phar build --notify\nDeploy\nBy default, the site is built in the _site directory, and can be deployed as is to any web server or static hosting service.\nTo build and deploy the site automatically on each push to a Git repository, Cecil provides:\n\n\na build script, to use as build command on a Jamstack platform or a CI service:\ncurl -sSOL https:\/\/cecil.app\/build.sh &amp;&amp; bash .\/build.sh\nIt downloads Cecil (or its standalone binary if PHP is not available), installs themes and builds the site, deducing the build context (production or preview) and the base URL from the platform.\nSet the CECIL_ENV environment variable to force the build context, CECIL_VERSION to use a specific Cecil release and CECIL_CMD_OPTIONS to add options to the build command (e.g.: --optimize); other variables prefixed with CECIL_ override the configuration (e.g.: CECIL_OUTPUT_DIR).\n\n\na GitHub Action, Cecil Action, to build the site in a GitHub Actions workflow: the new:site command can create a workflow that deploys to GitHub Pages.\n\n\nSee Deploy for ready-to-use configurations (Netlify, Vercel, Cloudflare Pages, GitHub Pages, GitLab CI, etc.).",
      "content_html": "<h1>build</h1>\n<p>Builds the site.</p>\n<h2 id=\"usage\">Usage<a class=\"heading-anchor\" href=\"#usage\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">Description:\n  Builds the website\n\nUsage:\n  build [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                               Use the given path as working directory\n\nOptions:\n  -d, --drafts                       Include drafts\n  -u, --baseurl=BASEURL              Set the base URL\n  -o, --output=OUTPUT                Set the output directory\n      --optimize|--no-optimize       Enable (or disable --no-optimize) optimization of generated files\n      --dry-run                      Build without saving\n  -c, --config=CONFIG                Set the path to extra config files (comma-separated)\n      --clear-cache[=CLEAR-CACHE]    Clear cache before build (optional cache key as regular expression) [default: false]\n  -p, --page=PAGE                    Build a specific page\n      --render-subset=RENDER-SUBSET  Render a subset of pages\n      --show-pages                   Show list of built pages in a table\n  -m, --metrics                      Show build metrics (duration and memory) of each step\n      --notify                       Send desktop notification on build completion\n  -h, --help                         Display help for the given command. When no command is given display help for the list command\n      --silent                       Do not output any message\n  -q, --quiet                        Only errors are displayed. All other output is suppressed\n  -V, --version                      Display this application version\n      --ansi|--no-ansi               Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction               Do not ask any interactive question\n  -v|vv|vvv, --verbose               Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The build command generates the website in the output directory.\n\n    cecil.phar build\n    cecil.phar build path/to/the/working/directory\n    cecil.phar build --baseurl=https://example.com/\n    cecil.phar build --output=_site\n\n  To build the website with optimization of generated files, you can use the --optimize option.\n  This is useful to reduce the size of the generated files and improve performance:\n\n    cecil.phar build --optimize\n    cecil.phar build --no-optimize\n\n  To build the website without overwriting files in the output directory, you can use the --dry-run option.\n  This is useful to check what would be built without actually writing files:\n\n    cecil.phar build --dry-run\n\n  To build the website with a specific subset of rendered pages, you can use the --render-subset option.\n  This is useful to build only a part of the website, for example, only \"hot\" pages or a specific section:\n\n    cecil.phar build --render-subset=subset\n\n  To show build steps metrics, run:\n\n    cecil.phar build --metrics\n\n  Send a desktop notification on build completion, run:\n\n    cecil.phar build --notify</code></pre>\n<h2 id=\"deploy\">Deploy<a class=\"heading-anchor\" href=\"#deploy\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>By default, the site is built in the <strong><code translate=\"no\">_site</code></strong> directory, and <strong>can be deployed as is</strong> to any web server or static hosting service.</p>\n<p>To build and deploy the site automatically on each push to a Git repository, Cecil provides:</p>\n<ul>\n<li>\n<p>a <strong>build script</strong>, to use as build command on a Jamstack platform or a CI service:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">curl -sSOL https://cecil.app/build.sh &amp;&amp; bash ./build.sh</code></pre>\n<p>It downloads Cecil (or its <a href=\"../getting-started/2-installation.md#standalone-binary\">standalone binary</a> if PHP is not available), installs themes and builds the site, deducing the build context (<code translate=\"no\">production</code> or <code translate=\"no\">preview</code>) and the base URL from the platform.<br>\nSet the <code translate=\"no\">CECIL_ENV</code> environment variable to force the build context, <code translate=\"no\">CECIL_VERSION</code> to use a specific Cecil release and <code translate=\"no\">CECIL_CMD_OPTIONS</code> to add options to the <code translate=\"no\">build</code> command (e.g.: <code translate=\"no\">--optimize</code>); other variables prefixed with <code translate=\"no\">CECIL_</code> override the <a href=\"../configuration/index.md\">configuration</a> (e.g.: <code translate=\"no\">CECIL_OUTPUT_DIR</code>).</p>\n</li>\n<li>\n<p>a <strong>GitHub Action</strong>, <a href=\"https://github.com/Cecilapp/Cecil-Action\" target=\"_blank\" rel=\"noopener noreferrer\">Cecil Action</a>, to build the site in a GitHub Actions workflow: the <a href=\"1-new-site.md\"><code translate=\"no\">new:site</code></a> command can create a workflow that deploys to GitHub Pages.</p>\n</li>\n</ul>\n<aside class=\"note note-tip\"><p>See <a href=\"https://cecil.app/documentation/deploy/\" target=\"_blank\" rel=\"noopener noreferrer\">Deploy</a> for ready-to-use configurations (Netlify, Vercel, Cloudflare Pages, GitHub Pages, GitLab CI, etc.).</p></aside>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/getting-started/starter-kits/",
      "url": "https://cloudflare.cecil.app/documentation/getting-started/starter-kits/",
      "title": "Starter kits",
      "summary": "Get started quickly with a ready-to-use project template.",
      "date_published": "2020-12-19T00:00:00+00:00",
      "date_modified": "2026-10-10T00:00:00+00:00","content_text": "Starter kits\nTo get started quickly, use one of Cecil's ready-to-use starter kits.\nAvailable starter kits\n\nThe Butler: a publishing-ready starter blog.\nLinks: an open source Linktree alternative.\nPhoto Stream: a super simple self-hosted photo stream.\nStatidocs: build a documentation website quickly.\n\n\n\n\n\n",
      "content_html": "<h1>Starter kits</h1>\n<p>To get started quickly, use one of Cecil's ready-to-use <a href=\"https://cloudflare.cecil.app/starter-kits/\">starter kits</a>.</p>\n<h2 id=\"available-starter-kits\">Available starter kits<a class=\"heading-anchor\" href=\"#available-starter-kits\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<ul>\n<li><a href=\"https://github.com/Cecilapp/the-butler#readme\" target=\"_blank\" rel=\"noopener noreferrer\">The Butler</a>: a publishing-ready starter blog.</li>\n<li><a href=\"https://github.com/Cecilapp/Links#readme\" target=\"_blank\" rel=\"noopener noreferrer\">Links</a>: an open source Linktree alternative.</li>\n<li><a href=\"https://github.com/Cecilapp/photo-stream#readme\" target=\"_blank\" rel=\"noopener noreferrer\">Photo Stream</a>: a super simple self-hosted photo stream.</li>\n<li><a href=\"https://github.com/Cecilapp/statidocs#readme\" target=\"_blank\" rel=\"noopener noreferrer\">Statidocs</a>: build a documentation website quickly.</li>\n</ul>\n<p><a href=\"https://github.com/Cecilapp/the-butler#readme\" target=\"_blank\" rel=\"noopener noreferrer\"><picture>\n<source type=\"image/avif\" srcset=\"https://cloudflare.cecil.app/thumbnails/480x/docs/cecil-newblog.c85c682e3bcb416589e2bc2bbcc2cfca.avif 480w, https://cloudflare.cecil.app/thumbnails/768x/docs/cecil-newblog.c85c682e3bcb416589e2bc2bbcc2cfca.avif 768w, https://cloudflare.cecil.app/docs/cecil-newblog.c85c682e3bcb416589e2bc2bbcc2cfca.avif 1014w\" width=\"1014\" height=\"713\" sizes=\"100vw\">\n<source type=\"image/webp\" srcset=\"https://cloudflare.cecil.app/thumbnails/480x/docs/cecil-newblog.c85c682e3bcb416589e2bc2bbcc2cfca.webp 480w, https://cloudflare.cecil.app/thumbnails/768x/docs/cecil-newblog.c85c682e3bcb416589e2bc2bbcc2cfca.webp 768w, https://cloudflare.cecil.app/docs/cecil-newblog.c85c682e3bcb416589e2bc2bbcc2cfca.webp 1014w\" width=\"1014\" height=\"713\" sizes=\"100vw\">\n<img src=\"https://cloudflare.cecil.app/docs/cecil-newblog.c85c682e3bcb416589e2bc2bbcc2cfca.png\" alt=\"Starter blog example\" loading=\"lazy\" decoding=\"async\" class=\"dark:brightness-90\" width=\"1014\" height=\"713\" style=\";max-width:100%;height:auto;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABGCAYAAAA6hjFpAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAU/UlEQVR4nN2c65Lcuq1GP4CUepz3f59UnSfK3qlKPC0SOD8AkKBaPRfHsWeHLprqaV2xiAtBqunvf/8/RSqqClUFoGl7FiKAiAAQiMi3nxf7mk7HYTmeiMG81lIYzAVEBGZervWz2vzM1r75KKeiT9p1+yy/90pdD1CoPocSglSN7bcvSASoEojUWyzbcR7meZ0sHFV9F/hfq7wPp7bWlgPOQAA8ALHt97UjHzO1gR4+n6GLxH6zU3xeC/z6797hrysfUZb6+vqaDxlAPkLzo703C3+tq3myaxaswKZwz9f9KJSPlsvdhyX43Ll+tNR//etf6aP6hX/u1a9gGIiSanVNAQIIM0HVqt1TBvSWT/HrfvpG3/j4i8DUf/7zn+njjzujZ2X2ctOIDKPWilIKtm1DrR2qAkDdr5CbLnYfk3v8GlA8gPikarylGc/PRC6j2Vk+3JH1+Z71zz//XPe82P5RNllg0eMtijIYtVZs24bWGvZ9T34k9rX9TUMYD1pCAC1RW7r2p270zY9+T88OtHt6DuctUI9/r3/++cfDDh8H8N6OEwiz9fZSGKVMGPu+43bbIdIHkAyOWaDKlxpLyFqxtp9BcmWa6Nkeyxf6sOe59xMUuuzztszqP/7xj9Ofrg/4cS2Z5spglGGmDMYNvb9AZMKI/UQKVAtE1MzWZ6/9yS/paivtl8VvJvQd6AoouY5oDAMw/zCa+WT1jz/+mEefz/euBD4iotVc1VpQ64Zt23C73XAcDSIyHpAdWJg0+06hUMBb63PkdxDb/oDjG/8LDT19cnfLTs814/xp6fSLgzsZqbPJIkBl3t+p1D/+yBqy7vIekPcisuxDIrw1QZt2HMeB3jvMkZtm1K1g2yr2bmbMgMiA4Vyg5P5GybYVABFIHZF/DyX/Ktt0///BEq1/uEK4niV6/KkT5PM/iCeZsCS/kGXSkKvyWfN1euhhrnJkNbWj9z4GfQajYr/vaHtDaw29G4w8ih+a8nAP6emHb7UN8uxCFrJGIDBv93S2a0+/gIhLjL+lzMLsI4ubn7tPZ6Pp/1PYe1V+xHmcgUz/EdqxwijY9w37fsNxu6M105wuHSIGQlTB0UIh6k59XO3CwZ5uaWgTCNbMDjSPnmd7piXxbEMyAw4NLY7OAMzrkmZp0rx+NKrngeGz8n409SwsDO2Y/qM5DBmase8b7vcbjuOO42horaN38y2iVtVbEoIwwELQGGh6bgzRQ1Nr5sQhYJqS+Rd7vClgjTsfTjk/z/Xja+rwJugY4D74D/JrDAg5VfWQOrkq72vI82gjO/SC1gq2LWDAo62K+/2O4zjcTDXXDjEgqZIIQAQWQJlBGr5hdoh1kEgOxH1KbCfzRS5A0tVMhSZBs785yeLh4xrznuNCHclaeJZuPYmqnpOLV+WjkdSTb4YP6R7G6oim6nFgP8xfWO1obqp6F3SZlUUAEShcQ0KoI1kZd+J/d4lTQCEeA0oiHRpAA0w6/uo5FjGcXfhZYidTdPIXA0SAyRqiHoL9Z+XKyc5CRCN8BWAOvjb0rBFdzGd0Qe+P2tFFoCLgMD2kA0YObScQOIgAopaGWZKWCtLQIvMkQ7MiAiIMu7U45NPzX0VUy8dI2GrWEl0iJFVFfV/Y/3lZ0+uUIDgI1wYRHaaqnyqJQLqYv/AxSx6ejx4+NIWGBkUO7REKDW1ZNeXam08tSRryNI640qKI2ddIcdGQjwr1ZxRVfej5w3G74EUVPaoomgiKCNAFBEFESHrKyy8g4nMWeiQ2SQcQHv4l+5P1nq/k/SR+uQ7NwmzG6CNpyqhJPr8cyKgufD1VkVkNiIK7WtgIsYEeqwHx+GkKgK41xJ06O4QFSJirRY7zAw37P2Ko5PwXjz/biyx0DtHJgdAFmF8KJMoZQowzooaGNDUgJKZZMcATYSiRO0haQlNK/00YDgS0mCsOX7KExKsjiFFJbh81ZDWf0THmtWEdAQCTAWEAFGY8xjG/WkNyGdEF5ixlwBCd2nGIaRN30w4RQMiq68zqPE/aQicwvEDC1BCcBE0hfHVFUK/LJeanEWDk87tGMqEQoRBQ4GYTEw6FtuA3aMgM+/xzaKxvDxhqMKgrelcAAhWCENBJIQAkAdF0fmANewNMCIuTKZtmzYXt5ik0ggeICWgFN0FYGwEETxBMqMQoDFQiVMIAxAky4R0NeTbg+xmziQsIT4WYyYKZKxEcEep2gSpBiNBJ0UFoIAgUPQ2yroxNaACWNmvPqh0TzATBEJBqEp7OAID8CCIAbECYwLFegBkbEyoztkLYmLERUNnBwDSFPeR+BDKcHCWnRANEDOyu1mx9jMSD5CYUYJitJgrykBjUIUzoBDRiNAUagK5W7bh5rvVxUtQ1nP7qOzBMRzJNDoChYJW5nTSEyKM9sEd9DoQYxMUSpszYCmNnxi6MW1EIE0QJyub/ij8/4QTk+eoQGsI/R0rhCz5HZLaev3VzhRTu2h9aFwgEwh2NgAOKQ4FDYWAU6OGHLoBMTUFq07jF/2YagRWGgygQFDVNKaEl40BDKA5DqYB8trOUgo0Zey24FUaTYpFl8WlpJSCguMJNIDn6YB42cAzAEpAYdQuw/P2zUBYYgJst6/VNFSoKdSCHEA4C7kq4K+FQxd33637cNZB5vSUCG0Cm7xgmKgEpEFQ1EBVTUyIgUDIY4jDglYugFsFWCm6iaNVgAMXgVwaD7dps98KgCWREIWk5J7GNakfXSiZLRBZAn4GyCC45dMU0Q01g45GuaCo4mHAH8KqE7wLcVXEX4HAgXRPgt4CM550Xz86aQxNUHYaioqOqoMKqDS4dJzE6MYQKJIBwAZdqQKqgiZlhRYF7Gg+D7Tyc4vZqsl7N0xlKfpAAElV6B8iinc9AyZKLTXFN6W6KSCzCaqp4FcErgO8K/FuAVwHuojgktERPEdcpZZG2Kf2ZEqzQjDBRAWFTwYaODYJKgpKACDEEjE4FggolAVjBRVGqYpfp35jIoiwmbELoTOhiEReTPXsdyTcmt3082qjh6BWAiqxhn1qvJJGx/dFyDlcDSlcPPwXoojiguJPiuwr+LQbkezcgd1HzI6qQoSF6gvIMyNxmd+rFzVJ1IDsEDYKODiFBxwpEiSAoaKToMLegBLAAVc15gwjMgto77ky4MaOx+UohGv6TAdThOzA1hekEJ4W/glMeKUEQB/PZ6OsBCgwK3EccorjDfMarAN9F8b0Drz0cfPiRgLKi1rRN6YqU/kaK4R+KqmuGQiBQEhC6B9oCXTTErEMnWCjufoXV4ClZ2F674N4ZregwYWe/p3ANyTCI+RFK0hBGMkua+qHqmMFD3ucTUDKQuF5XoEHRPLq6u6l6FeBVVsfeY+S/nG3qTIaRNSVCXgNiWiJqgThFtEVpkKjq6Ro1HwJFI6vRIcj9H7Pi6AYhale1jINi5BrjtmrAGOMPXPiUiOUBKK+L1gLGoilvmK/T9d8FJAA6PMSV0BjTitCOpma2RJ/DiG1arjw1JaAU04Gxr3sGC8ehKH5PcZwoIA5CYPtIXMfvLUL5ma/DY8oHASTBiLgaJyDj+1RyAKAasft0+ppC5R8tAWSGw1MTpub4IBHPteMRzgoEiEGh7QF37j2uj0jV+FlcfecZ579hMhOkUTWF51e3h4iyHMbMqZyEn74ff3PN0dTm7TyY/E+LDqGQ+wmHAgMRgvv8WWcbwgWwCh9ww6Wjg4xDKYfs67+1E5yuHBb/4q7qEL9eAAtT9ERDNGvQucY+PxHK0JhT/TlXAABPCfm2md2AEcPGc5hwFr16iDi7/XVG8LpU+MXGRExASDXy9s8efJi7c/sTYZzbC23/SSWLjxEhRmiKmZ4pLyHTXlUApCCOHJ8+nDVlWx6uFKWqArFCO08WkchiBs6Z32W2D0jCP7f/nfLzQNDDJwKNTmhak0yWWpARd2E+wRbChRzyHEeeQ4mE5uNVZ6nmxNydqfhLMisMBWYaGzhNuca8eFpNoTGB/9+F8vNKCMln9ZIQTTYGJWCQTi1QABLyYkuMEM8gIc7HZx/9hEid4alCxFWUVnNAkS7xg8IvjCSjA4k6xstfmsea2XJRugDJobi5iplKj/CgaqsoTTrm9AmWwYWA/PUJ9siT7SzeruYLp1rXniyWd+nJj4iMfNZ5XgRYoYyUvP409/ELyjBSQ3hDcEq2bksA9XEEfMGeaJ++lciSigUgMIht2RKN4UCCESOLJ3ezvKdu/sSWa4ZmKNFYwnlOMob/0IARGvID6ZNfX+Y43WBQ0pAQ4Ixr1deMae9Q6SDpGLkwIoBcM5QAn6BiERvl61lbrocYBI+yAEybL5aPCTMVeas8FsmTVdGe69ctlNoJI4TEhGH/I3pVUUgXoDdob5DWAOnWUWFrvlAKON4CIwYKg6RcwJjTtVfm62EKN0/T5ulce4YVyNjfNr44COCxPwaOtExHp80nD6u0m2b01kDHAbQD6M3MF9y/lopSxRfxMbQUoApI+jBdVk/mKnl515DronlQ+Iag15D3K5crGNlcxcSRQ4kxmQSMA7gfwHGHHnegHWa64FmLUqGbASnsQHoF+gaEP3kSBr+pIQ/lSZLwd5erFM/HjoqWJwyakRX7uMxCXoVKN1N1HND7HXp/hR6v0OMO9dfxmBhc65grKoUhtdr3YdpEbBA/7mCCGOvG8JtWLv6Mco4Y3+40q9/wWMjWRo3Wl+S4vTftMBjSDuhxQI5XyOt3yP37BKIKYkap2zD1pdpbxtqaBwGW/Z4LKbKGrNHXXwIIXbRRI7nxHMhpvEGmGdcwYlCoIBVAOrQ3aDsgxx39bkD663fI8To0hLhAxLWFGXXbIK1BenMY4mZfR2Q2zNXI/f3FNCQDuKoATq+f2VGUtylWLmYYZrKKpnB3jDc6xKMqaXfI3aD0+3f04w7tDVC1H85RARNBajV47mNU+piJGtEb/gc05AyjwG4+UjydVi3JthpwO008FlyX0c70BilNc6Xden3vQD8g7YC0O3q7ox9305DWQACkFFukUIoB7A0qfrxrCC4d+l/Qh5xhFO9FhYDqCWpzyss0BfJyUcQD+8s64T/CoZMCHKkQsbyuqr9CN6A0N1/WRugbyRNlBvU0PvF36yeIMFVpDJJA/CU0JGDEqvHKtpKjsmJXkyQBDxNUNnl2stHkMZVPojE4DQIVZMvpfdXInI5SeJpEbEzBambI3gi2q441VkiL7JDm4L3DjFci/JgvoSHZhr71XfT4AgOyEdCEsLFih00VEMz2x0QVMGGsr61NGMs2CJEqBwEKgQogbPMcNh7WCclvjvz7eAhmW2sV1Va7W1vY74fn+qtI1PJX1pB1hDAdNQi+XJPQvar3tErii61jxQsWGEwzqsKyHa+OesgsApsDJ6gQeicIExoDVMhWsxcCF0YvDCkFWsv4YRmuFaVWbFvFbSvYK2OrjL3YQutabBV8ACocv470BTQkl2fhbPgKYut9VGgaAAZIFJWBQ9JKE3+4ADKhxEI/9qcf7/ECmHM32n31iHb0zuiVUWpBrQWtFvStou8VXXZbq8Uwf+Fpk7rvqLcd+77jZd/xslXsW8FeC/ZSBpgaYNI9xij9S2jI2UwxucMmg6GFwYVnhKTmzA9RNGVfwKwJxoWGkJ89tQr3GT63IWwrE0ULutcmFb1X9Lahy46u3bxKIWirAwiXirLtqLcXbN9ecHu54eV2G2BuW8GtlqExW9KWWNAeYH4fkJMjMaeXgPgNo/jvpDCjEKMqsCvG8tERWZ2A5FfXwlwBtjg6kiNzuoAgBeisEFJ06ui6oWtD1xu6dnQS8y2FIEe1CEstVWJANtT9BdvLN2x/+4bbtxe8vOz4223H3/YN37ZqUKq9uBOaYgsS8XuBZBY5HrfxhTtFf+uIC0NqgXCxl3VA42WdPELPQHkxBw7lDAMxXotpaPuFCGFFZ7HX5kgchKIXQCpDbtXyWj4oHIvTtw1lu2F7MSj7t2+4vbzg28uOb/uGb3s1M1YKtjBhCUo4+6/hQ8I5pmikMmEv9uM0qJY97b70v2OulF+PpweTFWOQMFMarc9q2o/bMLQTpBB6BaREVUgFemXIVqC3DXLcoO2wPJcqEEBqBW876n7DdnvB9vKC/SXM146XveJlK7ht4ewpOXkeCc6v40NcmAYD2JiwF0atDK4FWgqUiy9uDsHOEuOOKw3B0BBrBRjvo8wpaIb0CUaq142hW4EcFdp2SAwII2FIZGugSwHXDWXbUfYbtn3Hdrth383R3/YN+1ZxqxV7Ne2ozBYep3HTbwcCZIfuUJgMCBO2YtEOVXsRRokhQ8B+fIS8mFDjAZGBBMiAofYSjfqvSWhn8yfN4WwF2irktkHbDm3NR+zdR+Lw6IhBhcGlOhQDUzf7sbZt37HVin2r2Oo0WaEdhedE4G8Dch4gjkjLe0x1GKElpRYQFyjHu3w+jnCB8xlI+m6EuDR/bMDWU8WUM88FGsLQ2l1bqtdtgvD8VEzgkTtAYrs/qvb2VKkVpW7jtyOtFtRSzHe4D5najN8/DokS0VDAGO92Dyg2HmAu5mSIZ88f/iKAJD8CzOlnrL/8EBOCAQVi69JUGCrFa4dKtVxWThT61G1oCEDjvqj4AofiYJZf7y6uEeHM2Q7zjgR8ASARYQFTxlNLLGbfPH4v/rBE7E6DzWRg9rJIHs5cVlzFI7LkewyKzpUl4/cdBZDibQIRCcOrKevRQfw1QHYw8fvDxbXBgXDqSNlK/HYgUUb4CzpBMX+yxYMUBlFxINNxZ43IJmDMiCQw8XmRazJdU/ACaEnb7yw4S1Dgzp7SDwlYiJzvl2Zn9FN8GSAARvpg+Y2QVGt+ETXefUz+Ijv3Ob6h0wXWCy4rBiINozyFHzCQYDzTkGhTuH35dkC6P7+r0X4ZIFk7punCcNJReZiEmRaZQJAyqXbW+eDXmmIvFo1Ps41VN2Nl5ztAMuw09qF0H6GvlPal01m+BJCQUY68RtSFuapwaA5NGA8mihLUabBcSOmK/kHH9vDQGGA8TzagaP4ubfv549yUHihfc/QFTc99Kl8CCJA7Lp3+Tce/vvd4MlPDh0wtQYaSNIOAGTaPG0jiyQkynS94Lpp0BvKgIfPvD4K/IuHlawA5CWts5IoEBifzlnaYqywfYTxsAyuI0XW9GyuGcB+MlFFN36z+iU6fl2d7Iy74f6jmha4vUMMBAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:center;background-size:cover;\" srcset=\"https://cloudflare.cecil.app/thumbnails/480x/docs/cecil-newblog.c85c682e3bcb416589e2bc2bbcc2cfca.png 480w, https://cloudflare.cecil.app/thumbnails/768x/docs/cecil-newblog.c85c682e3bcb416589e2bc2bbcc2cfca.png 768w, https://cloudflare.cecil.app/docs/cecil-newblog.c85c682e3bcb416589e2bc2bbcc2cfca.png 1014w\" sizes=\"100vw\">\n</picture></a></p>",
      "language": "en"
    },
    {
      "id": "https://cloudflare.cecil.app/documentation/commands/doctor/",
      "url": "https://cloudflare.cecil.app/documentation/commands/doctor/",
      "title": "doctor",
      "summary": "Diagnose the configuration, front matter, SEO and links.",
      "date_published": "2020-12-19T00:00:00+00:00",
      "date_modified": "2026-10-19T00:00:00+00:00","content_text": "doctor\nDiagnoses the current site and Cecil environment.\nUsage\nDescription:\n  Diagnoses the site configuration\n\nUsage:\n  doctor [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                  Use the given path as working directory\n\nOptions:\n  -c, --config=CONFIG   Set the path to an extra configuration file\n  -h, --help            Display help for the given command. When no command is given display help for the list command\n      --silent          Do not output any message\n  -q, --quiet           Only errors are displayed. All other output is suppressed\n  -V, --version         Display this application version\n      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The doctor command diagnoses the current site and Cecil environment.\n\n    cecil.phar doctor\n    cecil.phar doctor path\/to\/the\/working\/directory\n\n  To inspect a site with an extra configuration file, run:\n\n    cecil.phar doctor --config=config.yml\ndoctor:cache\nShows the cache settings (enabled caches, directory) and usage (number of files and size of each cache pool).\nDescription:\n  Shows cache status\n\nUsage:\n  doctor:cache [&lt;path&gt;]\n\nArguments:\n  path                  Use the given path as working directory\n\nOptions:\n  -h, --help            Display help for the given command. When no command is given display help for the list command\n      --silent          Do not output any message\n  -q, --quiet           Only errors are displayed. All other output is suppressed\n  -V, --version         Display this application version\n      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The doctor:cache command shows cache settings and usage details.\ndoctor:frontmatter\nValidates pages front matter syntax.\nDescription:\n  Validates pages front matter syntax\n\nUsage:\n  doctor:frontmatter [options] [--] [&lt;path&gt;]\n  doctor:fm\n\nArguments:\n  path                  Use the given path as working directory\n\nOptions:\n  -c, --config=CONFIG   Set the path to an extra configuration file\n  -p, --page=PAGE       Validate a single page relative to the pages directory\n  -h, --help            Display help for the given command. When no command is given display help for the list command\n      --silent          Do not output any message\n  -q, --quiet           Only errors are displayed. All other output is suppressed\n  -V, --version         Display this application version\n      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The doctor:frontmatter command validates front matter syntax for pages.\n\n    cecil.phar doctor:frontmatter\n    cecil.phar doctor:frontmatter path\/to\/the\/working\/directory\n\n  To validate a single page, run:\n\n    cecil.phar doctor:frontmatter --page=blog\/post.md\n\n  To inspect a site with an extra configuration file, run:\n\n    cecil.phar doctor:frontmatter --config=config.yml\ndoctor:seo\nAudits rendered HTML pages for common SEO issues.\nDescription:\n  Audits rendered HTML pages for common SEO issues\n\nUsage:\n  doctor:seo [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                     Use the given path as working directory\n\nOptions:\n  -c, --config=CONFIG      Set the path to an extra configuration file\n  -p, --page=PAGE          Audit a single page relative to the pages directory\n      --format=FORMAT      Output format: text (default) or json [default: \"text\"]\n      --include-generated  Include generated pages (sections, taxonomies, pagination, etc.) in audit\n      --feedback           Include findings with feedback level\n      --fail-on=FAIL-ON    Return a failure exit code when findings of this level or higher are found: bad (default), ok, feedback or never [default: \"bad\"]\n  -h, --help               Display help for the given command. When no command is given display help for the list command\n      --silent             Do not output any message\n  -q, --quiet              Only errors are displayed. All other output is suppressed\n  -V, --version            Display this application version\n      --ansi|--no-ansi     Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction     Do not ask any interactive question\n  -v|vv|vvv, --verbose     Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The doctor:seo command builds the site in dry-run mode, then audits\n  the rendered HTML output for a focused set of SEO checks.\n\n    cecil.phar doctor:seo\n    cecil.phar doctor:seo path\/to\/the\/working\/directory\n\n  To audit a single page, run:\n\n    cecil.phar doctor:seo --page=blog\/post.md\n\n  To output results as JSON for CI integration:\n\n    cecil.phar doctor:seo --format=json\n\n  To include generated pages (sections, taxonomies, pagination, etc.):\n\n    cecil.phar doctor:seo --include-generated\n\n  To include findings with feedback level:\n\n    cecil.phar doctor:seo --feedback\n\n  By default, the command fails if findings with the bad level are found.\n  To change this behavior, use the --fail-on option:\n\n    cecil.phar doctor:seo --fail-on=ok\n    cecil.phar doctor:seo --fail-on=never\n\n  To inspect a site with an extra configuration file, run:\n\n    cecil.phar doctor:seo --config=config.yml\n\n  Configure audit thresholds and checks in your configuration:\n\n    doctor:\n      seo:\n        title: { min: 30, max: 60 }\n        description: { min: 120, max: 160 }\n        content: { min_words: 300 }\n        checks:\n          title: true\n          description: true\n          canonical: true\n          h1: true\n          og_tags: true\n          img_alt: true\n          content_length: true\n          lang_attribute: true\nThe command builds the site in dry-run mode, then audits the rendered HTML output for a focused set of checks: title tag, meta description, canonical URL, heading structure, Open Graph tags, image alt attributes, estimated content length and lang attribute of the &lt;html&gt; element.\nBy default, generated pages (pages without content file: sections, taxonomies, pagination, etc.) are excluded from the audit. Use --include-generated to include them.\nBy default, findings with level feedback are not listed.\nUse --feedback to include findings with level feedback in addition to other findings.\nOutput results as JSON for CI integration using --format=json.\nBy default, the command returns a failure exit code (1) when findings with level bad are found. Use --fail-on=ok to also fail on ok findings, --fail-on=feedback to fail on any finding, or --fail-on=never to always succeed.\nConfiguration\nCustomize audit thresholds and enabled checks in your configuration file:\ndoctor:\n  seo:\n    title: { min: 30, max: 60 }\n    description: { min: 120, max: 160 }\n    content: { min_words: 300 }\n    checks:\n      title: true\n      description: true\n      canonical: true\n      h1: true\n      og_tags: true\n      img_alt: true\n      content_length: true\n      lang_attribute: true\ndoctor:links\nChecks internal and external links of the rendered pages.\nDescription:\n  Checks internal and external links of the rendered pages\n\nUsage:\n  doctor:links [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                           Use the given path as working directory\n\nOptions:\n  -c, --config=CONFIG            Set the path to an extra configuration file\n  -p, --page=PAGE                Check links of a single page relative to the pages directory\n      --internal                 Check internal links\n      --external                 Check external links\n      --exclude=EXCLUDE          Exclude links matching this regular expression (multiple values allowed)\n      --timeout=TIMEOUT          External links request timeout, in seconds\n      --concurrency=CONCURRENCY  Number of concurrent external links requests\n      --no-cache                 Do not use cached external links results\n      --format=FORMAT            Output format: text (default) or json [default: \"text\"]\n      --include-generated        Include generated pages (sections, taxonomies, pagination, etc.) in audit\n      --feedback                 Include findings with feedback level\n      --fail-on=FAIL-ON          Return a failure exit code when findings of this level or higher are found: bad (default), ok, feedback or never [default: \"bad\"]\n  -h, --help                     Display help for the given command. When no command is given display help for the list command\n      --silent                   Do not output any message\n  -q, --quiet                    Only errors are displayed. All other output is suppressed\n  -V, --version                  Display this application version\n      --ansi|--no-ansi           Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction           Do not ask any interactive question\n  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The doctor:links command builds the site in dry-run mode, then checks the links\n  found in the rendered HTML pages (links, images, scripts, stylesheets, media, inline\n  styles) and in the linked CSS files (url() and @import).\n\n    cecil.phar doctor:links\n    cecil.phar doctor:links path\/to\/the\/working\/directory\n\n  By default, only internal links are checked. To check external links too, run:\n\n    cecil.phar doctor:links --internal --external\n\n  To check external links only, run:\n\n    cecil.phar doctor:links --external\n\n  To check links of a single page, run:\n\n    cecil.phar doctor:links --page=blog\/post.md\n\n  To exclude links matching a regular expression, run:\n\n    cecil.phar doctor:links --external --exclude=\"linkedin\\.com\" --exclude=\"^https:\/\/localhost\"\n\n  To output results as JSON for CI integration:\n\n    cecil.phar doctor:links --format=json\n\n  By default, the command fails if findings with the bad level are found.\n  To change this behavior, use the --fail-on option:\n\n    cecil.phar doctor:links --fail-on=ok\n    cecil.phar doctor:links --fail-on=never\n\n  Configure default settings in your configuration:\n\n    doctor:\n      links:\n        internal: true\n        external: false\n        timeout: 10\n        concurrency: 10\n        cache_ttl: 86400\n        exclude: ['linkedin\\.com']\nThe command builds the site in dry-run mode, then checks the links found in the rendered HTML pages: links (&lt;a&gt;, &lt;area&gt;, &lt;link&gt;), images (src and srcset), scripts, iframes, media and inline styles. CSS files linked from the pages are also analyzed (url() and @import).\n\nInternal links must target a page of the site, a static file or an asset. Fragments (#anchor) must match an element ID of the target page. Absolute URLs starting with baseurl are considered internal links.\nExternal links are requested over HTTP (HEAD, then GET if the server refuses HEAD), concurrently. Successful results are cached (24 hours by default): use --no-cache to check them again.\n\nBy default, only internal links are checked:\nphp cecil.phar doctor:links                       # internal links (default)\nphp cecil.phar doctor:links --external            # external links only\nphp cecil.phar doctor:links --internal --external # both\nFinding levels:\n\n\n\nLevel\nMeaning\n\n\n\n\nbad\nBroken link: target not found, missing anchor, HTTP error (4xx, 5xx), unresolved host, etc.\n\n\nok\nWorking link that could be improved: redirection, missing trailing slash\n\n\nfeedback\nUnverifiable link: access denied (401, 403, 429, 999), probably due to bot protection, or timeout\n\n\n\nLinks using schemes other than HTTP(S) (e.g. mailto:, tel:, data:) are ignored. Use --exclude (regular expression, case-insensitive) to ignore other links.\nThe --page, --include-generated, --feedback, --format and --fail-on options behave as with doctor:seo (see above).\nChecking external links requires the PHP cURL extension.\nConfiguration\nCustomize default settings in your configuration file:\ndoctor:\n  links:\n    internal: true    # check internal links\n    external: false   # check external links\n    timeout: 10       # external links request timeout, in seconds\n    concurrency: 10   # number of concurrent external links requests\n    cache_ttl: 86400  # external links successful results cache TTL, in seconds\n    exclude: []       # links to ignore (list of regular expressions), e.g. ['linkedin\\.com', '^https:\/\/localhost']\n    useragent: ~      # User-Agent header of external links requests (`assets.remote.useragent.default` by default)",
      "content_html": "<h1>doctor</h1>\n<p>Diagnoses the current site and Cecil environment.</p>\n<h2 id=\"usage\">Usage<a class=\"heading-anchor\" href=\"#usage\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">Description:\n  Diagnoses the site configuration\n\nUsage:\n  doctor [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                  Use the given path as working directory\n\nOptions:\n  -c, --config=CONFIG   Set the path to an extra configuration file\n  -h, --help            Display help for the given command. When no command is given display help for the list command\n      --silent          Do not output any message\n  -q, --quiet           Only errors are displayed. All other output is suppressed\n  -V, --version         Display this application version\n      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The doctor command diagnoses the current site and Cecil environment.\n\n    cecil.phar doctor\n    cecil.phar doctor path/to/the/working/directory\n\n  To inspect a site with an extra configuration file, run:\n\n    cecil.phar doctor --config=config.yml</code></pre>\n<h2 id=\"doctor-cache\">doctor:cache<a class=\"heading-anchor\" href=\"#doctor-cache\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Shows the cache settings (enabled caches, directory) and usage (number of files and size of each cache pool).</p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">Description:\n  Shows cache status\n\nUsage:\n  doctor:cache [&lt;path&gt;]\n\nArguments:\n  path                  Use the given path as working directory\n\nOptions:\n  -h, --help            Display help for the given command. When no command is given display help for the list command\n      --silent          Do not output any message\n  -q, --quiet           Only errors are displayed. All other output is suppressed\n  -V, --version         Display this application version\n      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The doctor:cache command shows cache settings and usage details.</code></pre>\n<h2 id=\"doctor-frontmatter\">doctor:frontmatter<a class=\"heading-anchor\" href=\"#doctor-frontmatter\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Validates pages front matter syntax.</p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">Description:\n  Validates pages front matter syntax\n\nUsage:\n  doctor:frontmatter [options] [--] [&lt;path&gt;]\n  doctor:fm\n\nArguments:\n  path                  Use the given path as working directory\n\nOptions:\n  -c, --config=CONFIG   Set the path to an extra configuration file\n  -p, --page=PAGE       Validate a single page relative to the pages directory\n  -h, --help            Display help for the given command. When no command is given display help for the list command\n      --silent          Do not output any message\n  -q, --quiet           Only errors are displayed. All other output is suppressed\n  -V, --version         Display this application version\n      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The doctor:frontmatter command validates front matter syntax for pages.\n\n    cecil.phar doctor:frontmatter\n    cecil.phar doctor:frontmatter path/to/the/working/directory\n\n  To validate a single page, run:\n\n    cecil.phar doctor:frontmatter --page=blog/post.md\n\n  To inspect a site with an extra configuration file, run:\n\n    cecil.phar doctor:frontmatter --config=config.yml</code></pre>\n<h2 id=\"doctor-seo\">doctor:seo<a class=\"heading-anchor\" href=\"#doctor-seo\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Audits rendered HTML pages for common SEO issues.</p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">Description:\n  Audits rendered HTML pages for common SEO issues\n\nUsage:\n  doctor:seo [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                     Use the given path as working directory\n\nOptions:\n  -c, --config=CONFIG      Set the path to an extra configuration file\n  -p, --page=PAGE          Audit a single page relative to the pages directory\n      --format=FORMAT      Output format: text (default) or json [default: \"text\"]\n      --include-generated  Include generated pages (sections, taxonomies, pagination, etc.) in audit\n      --feedback           Include findings with feedback level\n      --fail-on=FAIL-ON    Return a failure exit code when findings of this level or higher are found: bad (default), ok, feedback or never [default: \"bad\"]\n  -h, --help               Display help for the given command. When no command is given display help for the list command\n      --silent             Do not output any message\n  -q, --quiet              Only errors are displayed. All other output is suppressed\n  -V, --version            Display this application version\n      --ansi|--no-ansi     Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction     Do not ask any interactive question\n  -v|vv|vvv, --verbose     Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The doctor:seo command builds the site in dry-run mode, then audits\n  the rendered HTML output for a focused set of SEO checks.\n\n    cecil.phar doctor:seo\n    cecil.phar doctor:seo path/to/the/working/directory\n\n  To audit a single page, run:\n\n    cecil.phar doctor:seo --page=blog/post.md\n\n  To output results as JSON for CI integration:\n\n    cecil.phar doctor:seo --format=json\n\n  To include generated pages (sections, taxonomies, pagination, etc.):\n\n    cecil.phar doctor:seo --include-generated\n\n  To include findings with feedback level:\n\n    cecil.phar doctor:seo --feedback\n\n  By default, the command fails if findings with the bad level are found.\n  To change this behavior, use the --fail-on option:\n\n    cecil.phar doctor:seo --fail-on=ok\n    cecil.phar doctor:seo --fail-on=never\n\n  To inspect a site with an extra configuration file, run:\n\n    cecil.phar doctor:seo --config=config.yml\n\n  Configure audit thresholds and checks in your configuration:\n\n    doctor:\n      seo:\n        title: { min: 30, max: 60 }\n        description: { min: 120, max: 160 }\n        content: { min_words: 300 }\n        checks:\n          title: true\n          description: true\n          canonical: true\n          h1: true\n          og_tags: true\n          img_alt: true\n          content_length: true\n          lang_attribute: true</code></pre>\n<p>The command builds the site in dry-run mode, then audits the rendered HTML output for a focused set of checks: title tag, meta description, canonical URL, heading structure, Open Graph tags, image alt attributes, estimated content length and <code translate=\"no\">lang</code> attribute of the <code translate=\"no\">&lt;html&gt;</code> element.</p>\n<p>By default, generated pages (pages without content file: sections, taxonomies, pagination, etc.) are excluded from the audit. Use <code translate=\"no\">--include-generated</code> to include them.</p>\n<p>By default, findings with level <code translate=\"no\">feedback</code> are not listed.</p>\n<p>Use <code translate=\"no\">--feedback</code> to include findings with level <code translate=\"no\">feedback</code> in addition to other findings.</p>\n<p>Output results as JSON for CI integration using <code translate=\"no\">--format=json</code>.</p>\n<p>By default, the command returns a failure exit code (<code translate=\"no\">1</code>) when findings with level <code translate=\"no\">bad</code> are found. Use <code translate=\"no\">--fail-on=ok</code> to also fail on <code translate=\"no\">ok</code> findings, <code translate=\"no\">--fail-on=feedback</code> to fail on any finding, or <code translate=\"no\">--fail-on=never</code> to always succeed.</p>\n<h3 id=\"configuration\">Configuration<a class=\"heading-anchor\" href=\"#configuration\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Customize audit thresholds and enabled checks in your configuration file:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">doctor:</span>\n  <span class=\"hljs-attr\">seo:</span>\n    <span class=\"hljs-attr\">title:</span> <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">min:</span> <span class=\"hljs-number\">30</span><span class=\"hljs-string\">,</span> <span class=\"hljs-attr\">max:</span> <span class=\"hljs-number\">60</span> <span class=\"hljs-string\">}</span>\n    <span class=\"hljs-attr\">description:</span> <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">min:</span> <span class=\"hljs-number\">120</span><span class=\"hljs-string\">,</span> <span class=\"hljs-attr\">max:</span> <span class=\"hljs-number\">160</span> <span class=\"hljs-string\">}</span>\n    <span class=\"hljs-attr\">content:</span> <span class=\"hljs-string\">{</span> <span class=\"hljs-attr\">min_words:</span> <span class=\"hljs-number\">300</span> <span class=\"hljs-string\">}</span>\n    <span class=\"hljs-attr\">checks:</span>\n      <span class=\"hljs-attr\">title:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">description:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">canonical:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">h1:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">og_tags:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">img_alt:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">content_length:</span> <span class=\"hljs-literal\">true</span>\n      <span class=\"hljs-attr\">lang_attribute:</span> <span class=\"hljs-literal\">true</span></code></pre>\n<h2 id=\"doctor-links\">doctor:links<a class=\"heading-anchor\" href=\"#doctor-links\" aria-hidden=\"true\" tabindex=\"-1\"></a></h2>\n<p>Checks internal and external links of the rendered pages.</p>\n<pre data-lang=\"plaintext\"><code class=\"language-plaintext hljs plaintext\" translate=\"no\">Description:\n  Checks internal and external links of the rendered pages\n\nUsage:\n  doctor:links [options] [--] [&lt;path&gt;]\n\nArguments:\n  path                           Use the given path as working directory\n\nOptions:\n  -c, --config=CONFIG            Set the path to an extra configuration file\n  -p, --page=PAGE                Check links of a single page relative to the pages directory\n      --internal                 Check internal links\n      --external                 Check external links\n      --exclude=EXCLUDE          Exclude links matching this regular expression (multiple values allowed)\n      --timeout=TIMEOUT          External links request timeout, in seconds\n      --concurrency=CONCURRENCY  Number of concurrent external links requests\n      --no-cache                 Do not use cached external links results\n      --format=FORMAT            Output format: text (default) or json [default: \"text\"]\n      --include-generated        Include generated pages (sections, taxonomies, pagination, etc.) in audit\n      --feedback                 Include findings with feedback level\n      --fail-on=FAIL-ON          Return a failure exit code when findings of this level or higher are found: bad (default), ok, feedback or never [default: \"bad\"]\n  -h, --help                     Display help for the given command. When no command is given display help for the list command\n      --silent                   Do not output any message\n  -q, --quiet                    Only errors are displayed. All other output is suppressed\n  -V, --version                  Display this application version\n      --ansi|--no-ansi           Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction           Do not ask any interactive question\n  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The doctor:links command builds the site in dry-run mode, then checks the links\n  found in the rendered HTML pages (links, images, scripts, stylesheets, media, inline\n  styles) and in the linked CSS files (url() and @import).\n\n    cecil.phar doctor:links\n    cecil.phar doctor:links path/to/the/working/directory\n\n  By default, only internal links are checked. To check external links too, run:\n\n    cecil.phar doctor:links --internal --external\n\n  To check external links only, run:\n\n    cecil.phar doctor:links --external\n\n  To check links of a single page, run:\n\n    cecil.phar doctor:links --page=blog/post.md\n\n  To exclude links matching a regular expression, run:\n\n    cecil.phar doctor:links --external --exclude=\"linkedin\\.com\" --exclude=\"^https://localhost\"\n\n  To output results as JSON for CI integration:\n\n    cecil.phar doctor:links --format=json\n\n  By default, the command fails if findings with the bad level are found.\n  To change this behavior, use the --fail-on option:\n\n    cecil.phar doctor:links --fail-on=ok\n    cecil.phar doctor:links --fail-on=never\n\n  Configure default settings in your configuration:\n\n    doctor:\n      links:\n        internal: true\n        external: false\n        timeout: 10\n        concurrency: 10\n        cache_ttl: 86400\n        exclude: ['linkedin\\.com']</code></pre>\n<p>The command builds the site in dry-run mode, then checks the links found in the rendered HTML pages: links (<code translate=\"no\">&lt;a&gt;</code>, <code translate=\"no\">&lt;area&gt;</code>, <code translate=\"no\">&lt;link&gt;</code>), images (<code translate=\"no\">src</code> and <code translate=\"no\">srcset</code>), scripts, iframes, media and inline styles. CSS files linked from the pages are also analyzed (<code translate=\"no\">url()</code> and <code translate=\"no\">@import</code>).</p>\n<ul>\n<li><strong>Internal links</strong> must target a page of the site, a static file or an asset. Fragments (<code translate=\"no\">#anchor</code>) must match an element ID of the target page. Absolute URLs starting with <code translate=\"no\">baseurl</code> are considered internal links.</li>\n<li><strong>External links</strong> are requested over HTTP (<code translate=\"no\">HEAD</code>, then <code translate=\"no\">GET</code> if the server refuses <code translate=\"no\">HEAD</code>), concurrently. Successful results are cached (24 hours by default): use <code translate=\"no\">--no-cache</code> to check them again.</li>\n</ul>\n<p>By default, only internal links are checked:</p>\n<pre data-lang=\"bash\"><code class=\"language-bash hljs bash\" translate=\"no\">php cecil.phar doctor:links                       <span class=\"hljs-comment\"># internal links (default)</span>\nphp cecil.phar doctor:links --external            <span class=\"hljs-comment\"># external links only</span>\nphp cecil.phar doctor:links --internal --external <span class=\"hljs-comment\"># both</span></code></pre>\n<p>Finding levels:</p>\n<table>\n<thead>\n<tr>\n<th>Level</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code translate=\"no\">bad</code></td>\n<td>Broken link: target not found, missing anchor, HTTP error (4xx, 5xx), unresolved host, etc.</td>\n</tr>\n<tr>\n<td><code translate=\"no\">ok</code></td>\n<td>Working link that could be improved: redirection, missing trailing slash</td>\n</tr>\n<tr>\n<td><code translate=\"no\">feedback</code></td>\n<td>Unverifiable link: access denied (401, 403, 429, 999), probably due to bot protection, or timeout</td>\n</tr>\n</tbody>\n</table>\n<p>Links using schemes other than HTTP(S) (e.g. <code translate=\"no\">mailto:</code>, <code translate=\"no\">tel:</code>, <code translate=\"no\">data:</code>) are ignored. Use <code translate=\"no\">--exclude</code> (regular expression, case-insensitive) to ignore other links.</p>\n<p>The <code translate=\"no\">--page</code>, <code translate=\"no\">--include-generated</code>, <code translate=\"no\">--feedback</code>, <code translate=\"no\">--format</code> and <code translate=\"no\">--fail-on</code> options behave as with <code translate=\"no\">doctor:seo</code> (see above).</p>\n<aside class=\"note note-info\"><p>Checking external links requires the PHP cURL extension.</p></aside>\n<h3 id=\"configuration-1\">Configuration<a class=\"heading-anchor\" href=\"#configuration-1\" aria-hidden=\"true\" tabindex=\"-1\"></a></h3>\n<p>Customize default settings in your configuration file:</p>\n<pre data-lang=\"yaml\"><code class=\"language-yaml hljs yaml\" translate=\"no\"><span class=\"hljs-attr\">doctor:</span>\n  <span class=\"hljs-attr\">links:</span>\n    <span class=\"hljs-attr\">internal:</span> <span class=\"hljs-literal\">true</span>    <span class=\"hljs-comment\"># check internal links</span>\n    <span class=\"hljs-attr\">external:</span> <span class=\"hljs-literal\">false</span>   <span class=\"hljs-comment\"># check external links</span>\n    <span class=\"hljs-attr\">timeout:</span> <span class=\"hljs-number\">10</span>       <span class=\"hljs-comment\"># external links request timeout, in seconds</span>\n    <span class=\"hljs-attr\">concurrency:</span> <span class=\"hljs-number\">10</span>   <span class=\"hljs-comment\"># number of concurrent external links requests</span>\n    <span class=\"hljs-attr\">cache_ttl:</span> <span class=\"hljs-number\">86400</span>  <span class=\"hljs-comment\"># external links successful results cache TTL, in seconds</span>\n    <span class=\"hljs-attr\">exclude:</span> <span class=\"hljs-string\">[]</span>       <span class=\"hljs-comment\"># links to ignore (list of regular expressions), e.g. ['linkedin\\.com', '^https://localhost']</span>\n    <span class=\"hljs-attr\">useragent:</span> <span class=\"hljs-string\">~</span>      <span class=\"hljs-comment\"># User-Agent header of external links requests (`assets.remote.useragent.default` by default)</span></code></pre>",
      "language": "en"
    }
  ]
}
