Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Properties

Every page, layout and partial reads the request as this, the page’s head tags as head, and the theme as theme.

<html>
<head>{{ head }}</head>
<body>
  <h1>{{ this.page.title }}</h1>
  <p>{{ this.params.slug }} on {{ this.url }} in {{ this.theme.name }}</p>
  {% if this.preview %}<p>Previewing.</p>{% endif %}
  {% block page %}{% endblock %}
</body>
</html>
NameGives
this.pageThe page’s settings and name (see Pages).
this.paramsThe URL’s parameters.
this.themecode and name.
this.layoutThe layout the page named.
this.urlThe request path.
this.previewWhether an operator is previewing.
headThe title, description, canonical, Open Graph and robots tags from the page’s settings; a setting may carry an expression.
themecode, name, author, homepage, description of the theme rendered.
theme.<field>A value of the theme’s own settings.

Read a component’s data

<h1>{{ post.items[0].title }}</h1>
<footer>{{ site_name }}</footer>
NameGives
<alias>The data a component attached under that alias returned.
<name>A value a component injected into the page scope.
componentInside a component’s markup, its own data.