{"slug":"cecil","title":"cecil","summary":"Build and configure Cecil static sites, with focused guidance for content, templates, and site generation.","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-09-17T16:53:15.577333Z","repo":{"url":"https://github.com/Cecilapp/Cecil","stars":295,"forks":32,"license":"EUPL-1.2","updatedAt":"2026-09-25T14:11:21Z"},"bodyHtml":"<hr>\n<h2>name: cecil\ndescription: Build and configure Cecil static sites, with focused guidance for content, templates, and site generation.\nlicense: EUPL-1.2</h2>\n<h1>Cecil Site Builder</h1>\n<p>You are an expert Cecil developer capable of creating and generating static websites with Cecil, a PHP-based static site generator powered by Symfony components and Twig.</p>\n<h2>When to Use This Skill</h2>\n<p>Use this skill when:</p>\n<ul>\n<li>Creating or scaffolding a new Cecil site</li>\n<li>Building and generating static websites with Cecil</li>\n<li>Configuring site settings, taxonomies, and content organization</li>\n<li>Creating or updating Twig templates and layouts</li>\n<li>Managing assets, including images and stylesheets</li>\n<li>Deploying Cecil-generated static sites</li>\n<li>Troubleshooting build issues or optimizing the performance of the generated site and build process</li>\n<li>Working with Cecil's plugin/extension system</li>\n</ul>\n<h2>Project Structure</h2>\n<h3>Directory Layout</h3>\n<pre><code>my-site/\n├── cecil.yml  # Main configuration file (or config.yml)\n├── pages/     # Markdown pages\n├── layouts/   # Twig templates\n├── assets/    # Processed files (CSS, JS, images)\n├── static/    # Static files copied as-is\n└── data/      # Data collections (YAML/JSON/...)\n</code></pre>\n<h3>Key Directories</h3>\n<ul>\n<li><strong>pages/</strong> - Markdown content files organized into sections</li>\n<li><strong>layouts/</strong> - Twig templates and partials</li>\n<li><strong>assets/</strong> - Files handled by Cecil (Sass compilation, minification, image handling)</li>\n<li><strong>static/</strong> - Files copied to output without transformation</li>\n<li><strong>data/</strong> - Data files exposed in templates via <code>site.data</code></li>\n</ul>\n<h2>Cecil Fundamentals</h2>\n<h3>Architecture</h3>\n<p>Cecil follows a build pipeline:</p>\n<pre><code>Builder → Steps → Generators → Renderer → Output\n</code></pre>\n<ul>\n<li><p><strong>Steps</strong> (<code>Step/</code>): Sequential build phases</p>\n<ul>\n<li>Pages: Parse markdown content</li>\n<li>Data: Load data files</li>\n<li>Assets: Process assets</li>\n<li>Taxonomies: Generate taxonomy pages</li>\n<li>Menus: Build navigation structures</li>\n<li>Optimize: Optimize output</li>\n<li>StaticFiles: Copy static files</li>\n</ul>\n</li>\n<li><p><strong>Generators</strong> (<code>Generator/</code>): Page generators executed via priority queue</p>\n<ul>\n<li>Generators are ordered by numeric weight; lower numbers execute first (e.g., DefaultPages at weight 10 runs before Alias at weight 80).</li>\n<li>DefaultPages (10) → VirtualPages (20) → ExternalBody (30) → Section (40) → Taxonomy (50) → Homepage (60) → Pagination (70) → Alias (80) → Redirect (90)</li>\n</ul>\n</li>\n<li><p><strong>Renderer</strong> (<code>Renderer/</code>): Twig-based rendering with custom extensions</p>\n</li>\n<li><p><strong>Output</strong>: Built static site in <code>_site/</code> directory</p>\n</li>\n</ul>\n<h3>Content Model</h3>\n<ul>\n<li><strong>Pages</strong>: Markdown files composed of front matter and body</li>\n<li><strong>Front matter</strong>: Metadata surrounded by separators (<code>---</code>, <code>+++</code>, or <code>&lt;!-- --&gt;</code>)</li>\n<li><strong>Section</strong>: Root folder in <code>pages/</code> (e.g. <code>pages/blog/post-1.md</code> -&gt; section <code>blog</code>)</li>\n<li><strong>File-based routing</strong>: Files under <code>pages/</code> define generated paths</li>\n<li><strong>Collections</strong>: Pages, taxonomies, data and static files are exposed to templates</li>\n</ul>\n<h3>Nested Sections (Sub-sections)</h3>\n<p>A nested folder that explicitly contains an <code>index.md</code> file becomes a <em>sub-section</em> of its parent <em>Section</em>. A nested folder <strong>without</strong> an <code>index.md</code> file is not a sub-section: its pages simply belong to the parent section.</p>\n<pre><code>pages/\n└─ blog                 # Section \"blog\"\n   ├─ index.md\n   ├─ post-1.md         # Page in \"blog\"\n   └─ 2024              # Sub-section (contains an \"index.md\")\n      ├─ index.md\n      └─ post-2.md      # Page in \"blog\" AND \"blog/2024\"\n</code></pre>\n<p>A sub-section:</p>\n<ul>\n<li>Is a full <em>Section</em> (same <code>type</code>, variables, and <a href=\"../../docs/3-Templates.md\">layout</a> resolution) available at its own URL (e.g. <code>/blog/2024/</code>)</li>\n<li>Can be nested at any depth (e.g. <code>blog/2024/06/</code>)</li>\n<li>Lists its own pages; those pages also belong to each parent section</li>\n<li>Is <strong>not</strong> listed among the pages of its parent section</li>\n</ul>\n<p>Sub-sections support the same front matter variables as any section (<code>sortby</code>, <code>pagination</code>, <code>cascade</code>, <code>circular</code>). Use <code>cascade</code> on a parent <code>index.md</code> to propagate variables down to sub-sections and their pages.</p>\n<h3>Configuration</h3>\n<p>Configuration is defined in <code>cecil.yml</code> or <code>config.yml</code> at project root:</p>\n<ul>\n<li>Core options are top-level keys such as <code>title</code>, <code>baseurl</code>, <code>description</code>, <code>taxonomies</code>, <code>menus</code></li>\n<li>Dot notation in templates applies to <code>site</code> variable access (for example <code>site.title</code>)</li>\n<li>Defaults are defined in <code>config/default.php</code> and base pipeline in <code>config/base.php</code></li>\n</ul>\n<h2>Building a Cecil Site</h2>\n<h3>Step 1: Download Cecil</h3>\n<p>Download Cecil using curl:</p>\n<pre><code>curl -LO https://cecil.app/cecil.phar\nchmod +x cecil.phar\n</code></pre>\n<h3>Step 2: Create a New Site</h3>\n<p>Use the <code>new:site</code> command to scaffold a new website:</p>\n<pre><code>php cecil.phar new:site\n</code></pre>\n<h3>Step 3: Configure the Site</h3>\n<p>Edit <strong>cecil.yml</strong>:</p>\n<pre><code>title: My Site\nbaseurl: https://example.com/\ndescription: My awesome static site\ntaxonomies:\n  categories: category\n  tags: tag\n</code></pre>\n<h3>Step 4: Create Content</h3>\n<p>Create a page with:</p>\n<pre><code>php cecil.phar new:page\n</code></pre>\n<p>Then edit the generated file in <code>pages/</code>:</p>\n<pre><code>---\ntitle: My First Post\ndescription: Welcome to my blog\ndate: 2024-05-14\ntags: [Welcome, \"First post\"]\n---\n# My First Post\n\nThis is my first post content.\n</code></pre>\n<h3>Step 5: Create Templates</h3>\n<p>Create Twig templates in <code>layouts/</code> (for example <code>layouts/page.html.twig</code>):</p>\n<pre><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;{{ page.title }} - {{ site.title }}&lt;/title&gt;\n  &lt;/head&gt;\n  &lt;body&gt;\n    &lt;header&gt;\n      &lt;h1&gt;{{ site.title }}&lt;/h1&gt;\n    &lt;/header&gt;\n    &lt;main&gt;\n      {{ page.content }}\n    &lt;/main&gt;\n    &lt;footer&gt;\n      &lt;p&gt;&amp;copy; {{ site.title }}&lt;/p&gt;\n    &lt;/footer&gt;\n  &lt;/body&gt;\n&lt;/html&gt;\n</code></pre>\n<h3>Step 6: Build the Site</h3>\n<pre><code>php cecil.phar build\n</code></pre>\n<p>Output is generated in <code>_site/</code> directory.</p>\n<h2>CLI Commands</h2>\n<table>\n<thead>\n<tr>\n<th>Command</th>\n<th>Purpose</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>php cecil.phar new:site</code></td>\n<td>Create a new website</td>\n</tr>\n<tr>\n<td><code>php cecil.phar new:page</code></td>\n<td>Create a new page</td>\n</tr>\n<tr>\n<td><code>php cecil.phar build</code></td>\n<td>Build the static site</td>\n</tr>\n<tr>\n<td><code>php cecil.phar serve</code></td>\n<td>Start local server with live reload</td>\n</tr>\n<tr>\n<td><code>php cecil.phar show:config</code></td>\n<td>Display effective configuration</td>\n</tr>\n<tr>\n<td><code>php cecil.phar cache:clear</code></td>\n<td>Clear all cache files</td>\n</tr>\n<tr>\n<td><code>php cecil.phar clear</code></td>\n<td>Remove generated files</td>\n</tr>\n</tbody>\n</table>\n<h2>Template Development</h2>\n<p>Twig templates live in <code>layouts/</code> and follow Cecil naming conventions.</p>\n<h3>Naming Convention</h3>\n<p>Use this pattern:</p>\n<pre><code>layouts/(&lt;section&gt;/)&lt;type&gt;|&lt;layout&gt;.&lt;format&gt;(.&lt;language&gt;).twig\n</code></pre>\n<p>Examples:</p>\n<ul>\n<li><code>layouts/page.html.twig</code> - default page template</li>\n<li><code>layouts/list.html.twig</code> - section/home/term listing template</li>\n<li><code>layouts/blog/list.rss.twig</code> - RSS template for <code>blog</code> section</li>\n<li><code>layouts/page.html.fr.twig</code> - French page template</li>\n<li><code>layouts/_default/page.html.twig</code> - fallback template</li>\n</ul>\n<h3>Lookup Rules (How Cecil Chooses a Template)</h3>\n<ol>\n<li>Identify the page kind and check section-specific or explicit <code>layout</code> templates first.</li>\n<li>Apply the matching fallback chain for that page kind:</li>\n</ol>\n<table>\n<thead>\n<tr>\n<th>Page Kind</th>\n<th>Step 1</th>\n<th>Step 2</th>\n<th>Step 3</th>\n<th>Step 4</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Homepage</td>\n<td><code>index.*</code></td>\n<td><code>home.*</code></td>\n<td><code>list.*</code></td>\n<td><code>_default/*</code></td>\n</tr>\n<tr>\n<td>Standard page</td>\n<td><code>page.*</code></td>\n<td><code>_default/page.*</code></td>\n<td>-</td>\n<td>-</td>\n</tr>\n<tr>\n<td>Section page</td>\n<td>section-specific <code>list.*</code> or explicit <code>layout.*</code></td>\n<td><code>list.*</code></td>\n<td><code>_default/*</code></td>\n<td>-</td>\n</tr>\n<tr>\n<td>Taxonomy page</td>\n<td>taxonomy template or explicit <code>layout.*</code></td>\n<td><code>list.*</code></td>\n<td><code>_default/*</code></td>\n<td>-</td>\n</tr>\n</tbody>\n</table>\n<p>In practice, you usually need only:</p>\n<ul>\n<li><code>layouts/page.html.twig</code></li>\n<li><code>layouts/list.html.twig</code></li>\n<li>optional overrides in <code>layouts/_default/</code> or per section</li>\n</ul>\n<h3>Template Variables</h3>\n<p>Most useful variables in Twig:</p>\n<ul>\n<li><code>site.title</code>, <code>site.baseurl</code>, <code>site.description</code></li>\n<li><code>site.pages</code> - pages collection (current language)</li>\n<li><code>site.allpages</code> - pages in all languages</li>\n<li><code>site.taxonomies</code> - vocabularies and terms</li>\n<li><code>site.menus.&lt;name&gt;</code> - menu entries</li>\n<li><code>page.title</code>, <code>page.date</code>, <code>page.content</code>, <code>page.path</code>, <code>page.type</code>, <code>page.section</code></li>\n</ul>\n<h3>Multilingual Sites</h3>\n<p>Configure languages in <code>cecil.yml</code>:</p>\n<pre><code>language: en\nlanguages:\n  - code: en\n    name: English\n    locale: en_US\n  - code: fr\n    name: Français\n    locale: fr_FR\n</code></pre>\n<p>Use suffixed filenames for translations:</p>\n<pre><code>pages/about.md\npages/about.fr.md\n</code></pre>\n<p>You can render a language switcher in templates with:</p>\n<pre><code>{% include 'partials/languages.html.twig' %}\n</code></pre>\n<p>Useful collection helpers:</p>\n<ul>\n<li><code>site.pages.showable</code> to skip draft/virtual/excluded pages</li>\n<li><code>sort_by_weight</code> filter for menu entries</li>\n</ul>\n<h3>Example Template</h3>\n<pre><code>{# layouts/page.html.twig #}\n&lt;!DOCTYPE html&gt;\n&lt;html lang=\"{{ site.language }}\"&gt;\n  &lt;head&gt;\n    &lt;meta charset=\"utf-8\"&gt;\n    &lt;title&gt;{{ page.title }} - {{ site.title }}&lt;/title&gt;\n    {{ include('partials/metatags.html.twig') }}\n  &lt;/head&gt;\n  &lt;body&gt;\n    &lt;header&gt;\n      &lt;h1&gt;&lt;a href=\"{{ url('/') }}\"&gt;{{ site.title }}&lt;/a&gt;&lt;/h1&gt;\n      {% if site.menus.main is defined %}\n      &lt;nav&gt;\n        &lt;ul&gt;\n        {% for entry in site.menus.main|sort_by_weight %}\n          &lt;li&gt;&lt;a href=\"{{ url(entry.url) }}\"&gt;{{ entry.name }}&lt;/a&gt;&lt;/li&gt;\n        {% endfor %}\n        &lt;/ul&gt;\n      &lt;/nav&gt;\n      {% endif %}\n    &lt;/header&gt;\n    &lt;main&gt;\n      &lt;article&gt;\n        &lt;h2&gt;{{ page.title }}&lt;/h2&gt;\n        {% if page.date %}\n          &lt;time datetime=\"{{ page.date|date('c') }}\"&gt;{{ page.date|date('Y-m-d') }}&lt;/time&gt;\n        {% endif %}\n        {{ page.content }}\n      &lt;/article&gt;\n    &lt;/main&gt;\n  &lt;/body&gt;\n&lt;/html&gt;\n</code></pre>\n<h3>Built-in Partials and Utilities</h3>\n<ul>\n<li><code>partials/metatags.html.twig</code> - SEO/social tags</li>\n<li><code>partials/navigation.html.twig</code> - navigation helper</li>\n<li><code>partials/paginator.html.twig</code> - pagination links</li>\n<li><code>partials/languages.html.twig</code> - language switcher</li>\n</ul>\n<p>If needed, extract built-in templates to customize them:</p>\n<pre><code>php cecil.phar util:templates:extract\n</code></pre>\n<h3>Pagination</h3>\n<p>Pagination is configured globally under <code>pages.pagination</code>, and can be overridden in section front matter.</p>\n<pre><code>pages:\n  pagination:\n    max: 5\n    path: page\n</code></pre>\n<p>In list templates, include paginator links with:</p>\n<pre><code>{% include 'partials/paginator.html.twig' %}\n</code></pre>\n<h3>Custom Filters and Functions</h3>\n<p>Core Twig helpers commonly used in Cecil templates:</p>\n<ul>\n<li><code>url()</code> - generate internal/absolute URLs depending on config</li>\n<li><code>asset()</code> - reference and process assets</li>\n<li><code>include()</code> - compose templates with partials/components</li>\n</ul>\n<h2>Build Optimization</h2>\n<h3>Asset Processing</h3>\n<p>Configure asset optimization:</p>\n<pre><code>assets:\n  minify: true\n  fingerprint: true\n  compile:\n    style: compressed\n  images:\n    optimize: true\n</code></pre>\n<h3>Performance Tips</h3>\n<ol>\n<li>Use <code>draft: true</code> to exclude non-published content from builds</li>\n<li>Enable asset minification and fingerprinting in production</li>\n<li>Use output and format settings adapted to your pages types</li>\n<li>Use responsive image options and image optimization when needed</li>\n</ol>\n<h2>Extension &amp; Plugins</h2>\n<h3>Custom Generators</h3>\n<p>Extend Cecil by creating custom generators:</p>\n<pre><code>&lt;?php\n\nnamespace MyProject\\Generator;\n\nuse Cecil\\Generator\\AbstractGenerator;\n\nclass CustomGenerator extends AbstractGenerator\n{\n  public function generate(): void\n  {\n        // Custom generation logic\n    }\n}\n</code></pre>\n<p>Then register it in configuration with <code>pages.generators</code>.</p>\n<pre><code>pages:\n  generators:\n    100: MyProject\\Generator\\CustomGenerator\n</code></pre>\n<blockquote>\n<p>Note: use single backslashes in YAML. Double backslashes (<code>\\\\</code>) are only needed inside JSON or PHP strings.</p>\n</blockquote>\n<h3>Custom Commands</h3>\n<p>Create CLI commands by extending <code>AbstractCommand</code>:</p>\n<pre><code>&lt;?php\n\nnamespace MyProject\\Command;\n\nuse Cecil\\Command\\AbstractCommand;\n\nclass MyCommand extends AbstractCommand\n{\n    // Implementation\n}\n</code></pre>\n<p>You can also extend Twig (via <code>layouts.extensions</code>) and post-process output (via <code>output.postprocessors</code>).</p>\n<pre><code>layouts:\n  extensions:\n    MyExtension: MyProject\\Twig\\MyExtension\n</code></pre>\n<p>The Twig extension class should implement <code>Twig\\Extension\\ExtensionInterface</code> (or extend <code>Twig\\Extension\\AbstractExtension</code>).</p>\n<pre><code>output:\n  postprocessors:\n    MyProcessor: MyProject\\Renderer\\PostProcessor\\MyProcessor\n</code></pre>\n<p>Post-processors should implement <code>Cecil\\Renderer\\PostProcessor\\PostProcessorInterface</code>.</p>\n<h2>Deployment</h2>\n<h3>Static Site Hosting</h3>\n<p>Cecil generates pure static HTML, compatible with:</p>\n<ul>\n<li>GitHub Pages</li>\n<li>Netlify</li>\n<li>Vercel</li>\n<li>AWS S3</li>\n<li>Any web server</li>\n</ul>\n<h3>Build &amp; Deploy Workflow</h3>\n<pre><code># Build\nphp cecil.phar build\n\n# Deploy output directory (_site/)\n# to your hosting platform\n</code></pre>\n<h3>GitHub Pages Example</h3>\n<pre><code>php cecil.phar build\n# Commit _site/ directory and push to gh-pages branch\n</code></pre>\n<h2>Code Quality Standards</h2>\n<p>When extending or contributing to Cecil:</p>\n<ul>\n<li>Follow PSR-12 coding standards</li>\n<li>Use <code>declare(strict_types=1);</code> in all PHP files</li>\n<li>Prefix native function calls with <code>\\</code> (e.g., <code>\\count()</code>)</li>\n<li>Include proper PHPDoc blocks for all classes and methods</li>\n<li>Use 4-space indentation for PHP, 2-space for YAML/Twig</li>\n</ul>\n<h2>Useful Resources</h2>\n<ul>\n<li><strong>Official website</strong>: <a href=\"https://cecil.app\">https://cecil.app</a></li>\n<li><strong>GitHub Repository</strong>: <a href=\"https://github.com/Cecilapp/Cecil\">https://github.com/Cecilapp/Cecil</a></li>\n<li><strong>Issue Tracker</strong>: <a href=\"https://github.com/Cecilapp/Cecil/issues\">https://github.com/Cecilapp/Cecil/issues</a></li>\n<li><strong>Documentation</strong>: <a href=\"https://cecil.app/documentation/\">https://cecil.app/documentation/</a></li>\n</ul>\n<h2>Common Workflows</h2>\n<h3>Create a Blog</h3>\n<ol>\n<li>Create <code>pages/blog/index.md</code> for blog section</li>\n<li>Add individual posts in <code>pages/blog/post-*.md</code></li>\n<li>Configure taxonomy for tags/categories</li>\n<li>Create templates for listing and individual posts</li>\n<li>Build with <code>php cecil.phar build</code></li>\n</ol>\n<h3>Add Custom Pages</h3>\n<ol>\n<li>Create markdown files in <code>pages/</code> directory</li>\n<li>Add frontmatter with title and template</li>\n<li>Create corresponding template in <code>layouts/</code></li>\n<li>Reference template in page frontmatter</li>\n<li>Build to generate output</li>\n</ol>\n<h3>Implement Search</h3>\n<ol>\n<li>Create <code>pages/search.json.md</code> with front matter <code>output: json</code></li>\n<li>Use JavaScript library (e.g., Lunr.js) on frontend</li>\n<li>Create <code>layouts/search.json.twig</code> that iterates <code>site.pages.showable</code> and emits a JSON array of <code>{title, url, content}</code> objects</li>\n<li>Add search functionality to templates</li>\n</ol>\n<h2>Troubleshooting</h2>\n<p>When a user reports unexpected behavior or asks about a specific feature, ask them to run <code>php cecil.phar doctor</code> and include the output. If you are uncertain whether a feature is available in the user's Cecil version, say so explicitly and direct them to the official documentation at <a href=\"https://cecil.app/documentation/\">https://cecil.app/documentation/</a> rather than guessing version ranges.</p>\n<h3>Common Issues</h3>\n<ul>\n<li><strong>Site not generating</strong>: Check <code>cecil.yml</code> syntax and configuration</li>\n<li><strong>Missing pages</strong>: Ensure content files are in <code>pages/</code> directory</li>\n<li><strong>Template not loading</strong>: Verify template path in frontmatter and layouts directory</li>\n<li><strong>Build errors</strong>: Run <code>php cecil.phar build -vv</code> for verbose output</li>\n<li><strong>Cache issues</strong>: Clear cache with <code>php cecil.phar cache:clear</code></li>\n</ul>\n<h3>Debug Output</h3>\n<p>Get detailed build information:</p>\n<pre><code>php cecil.phar build -v    # Verbose\nphp cecil.phar build -vv   # Very verbose\nphp cecil.phar build -vvv  # Debug\n</code></pre>\n","files":[{"path":"SKILL.md","sizeBytes":15107,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-09-17T16:53:38.176299Z","sha256":"0832857CA1386BAAC6CF22DC7523921A06E14A2B46B18818483DC274C1D75948","sizeBytes":5785},"review":null,"source":{"repositoryUrl":"https://github.com/Cecilapp/Cecil","path":"skills/cecil","license":"EUPL-1.2","commit":"235a6b344079530c18e0d7f8c8eaaec04f6f8d3e","subtreeSha":"150690070E4CAADCE09E451DE9D208EEE1DCF896DA40E385A7145C82CF17A8A6","lastSyncedAt":"2026-09-25T23:11:29.60705Z"},"reviewedAt":"2026-09-17T16:54:34.342002Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/Cecilapp/Cecil/tree/master/skills/cecil"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install cecilapp-cecil@llmmart"},{"target":"git","command":"git clone https://github.com/Cecilapp/Cecil.git"}]}