Cecil logo Cecil
What's on this page

Templates

Cecil is powered by the Twig template engine, so please refer to the official documentation to learn how to use it.

Example

{# this is a template example #}
<h1>{{ page.title }} - {{ site.title }}</h1>
<span>{{ page.date|date('j M Y') }}</span>
<p>{{ page.content }}</p>
<ul>
{% for tag in page.tags %}
  <li>{{ tag }}</li>
{% endfor %}
</ul>
  • {# #}: adds comments
  • {{ }}: outputs content of variables or expressions
  • {% %}: executes statements, like loop (for), condition (if), etc.
  • |filter(): filters or formats content

In this section