Page references
References show values without making them editable. They read from this page, the page above it, the page a list is on, or the pages of a split list.
A reference shows a value without making it editable. It is written as a scope, a dot and a name: {{ page.title }}, {{ parent.url }}, {{ item.cover }}. There are four scopes.
| Scope | Reads from | Can show |
|---|---|---|
page. | The page being rendered | Its settings only |
parent. | The page one level up | Its settings and any of its fields |
item. | Each page (or tag) in a list. Only inside {{ each }} | Its settings and any of its fields |
paging. | The split list on this page. Only with a paged list | next, previous, number and total |
Settings
Every page has the same settings, and page., parent. and item. can show them.
| Name | Shows |
|---|---|
url | The page's address, like /docs/templates/lists/ |
title | The title from Page settings, or the label when it's empty |
label | What people call the page: its title without a “ — Site name” tail, or the name made from its folder (spring-menu becomes “Spring menu”). The home page is “Home” |
description | The description from Page settings |
date | The date, written out in the site's locale |
date-iso | The date as YYYY-MM-DD |
tags | The page's tags, separated by commas |
tag | On a tag page, the tag it is for. Empty everywhere else. See Tags and tag pages |
count | In a list of tags, how many pages use the tag |
The locale comes from "locale" in verso.json. With "en-GB", a date reads “2 April 2026”; with "fr-FR", “2 avril 2026”.
Formats
A reference can take a format after a colon:
| Write | Shows |
|---|---|
{{ page.date }} or :long | April 2, 2026 |
{{ page.date:short }} | Apr 2, 2026 |
{{ page.date:numeric }} | 4/2/2026 |
{{ page.date:month }} | April 2026 |
{{ page.date:year }} | 2026 |
{{ page.date:iso }} | 2026-04-02 |
{{ item.summary:words-25 }} | The first 25 words, then “…” if there were more |
{{ item.summary:chars-140 }} | At most about 140 characters, cut at a space, then “…” |
Date formats follow the site's locale. They also work on a text field that holds a date written YYYY-MM-DD. Text formats work on rich text too, as plain text. Any other format stops with “… isn't a format.”
This page
page. shows this page's settings anywhere: in the text, in attributes and in the head.
<head>
<title>{{ page.title }} · Northlight</title>
<link rel="canonical" href="https://northlight.studio{{ page.url }}">
</head>
…
<time datetime="{{ page.date-iso }}">{{ page.date }}</time>
For this page's own fields, write the field itself, not a reference. {{ page.headline }} stops with a message listing the settings. Writing the field twice is fine: both places show the same value.
The page above
parent. reads from the page whose folder holds this one. For /docs/templates/lists/ that is /docs/templates/; for a top-level page like /about/ it is the home page. The home page has no parent, so its parent. references are empty.
It is how a page shows where it belongs, without repeating anything:
<nav class="row gap:d2 font:small text:ink-3">
<a href="{{ parent.url }}">{{ parent.title }}</a>
<span>/</span>
<span>{{ page.title }}</span>
</nav>
{{ if:parent.lede }}<p class="text:ink-3">{{ parent.lede }}</p>{{ /if }}
Verso only looks one level up. {{ parent.parent }} stops with a message saying so.
Each page in a list
item. works only inside a list, where it means the page being repeated. See Lists of pages for the whole table. In a nested list, item. means the inner page.
Pages of a list
paging. works on a page whose template has a list split into pages, like {{ each:journal:10:paged }}. {{ paging.next }} and {{ paging.previous }} are addresses, empty at the ends; {{ paging.number }} and {{ paging.total }} say where you are. Without a split list, they stop with a message. See Pages of a list.
How values are written out
- Text is escaped, so a title with
<or&in it shows exactly as typed. - Rich text in the page text is shown as HTML, with the class map from
verso.json. In an attribute, or with a format, it is reduced to plain text. - An image gives its address, ready for a
src. In<img src="…">its alt text comes too, unless the tag has analtof its own. - A colour gives its CSS value. An empty one inside a
styleattribute givesinitial, sovar(--accent, #000)falls back to its default. - Anything missing gives nothing. A reference never stops a build for being empty; use a condition to hide the markup around it.