A YAML file per page, a layout alcove with nooks to fill.
A page is one YAML file in content/pages/. It says where the page lives, what it is called, which layout it uses and which alcoves go into each nook of that layout.
The layout is an alcove too. Its template is the whole HTML document, with {{ nook:intro }} wherever the page puts alcoves, and {{ page.title }} or any key from meta wherever a page value goes.
Key
Meaning
slug
The address. Empty for the front page.
title
Required. Shown as {{ page.title }}.
alcove
Required. The layout alcove.
nooks
Which alcoves fill which nook of the layout, in order.
meta
Any extra values, for example description.
lang
The language of the page. See Languages.
cache
Seconds to keep a page that is rendered on request.
access
The role a visitor needs. See Roles and sign-in.
post
SQL or a script to run when the page gets a post.
draft
true leaves the page out of the build.
The page you are reading is the file below. The live result is an alcove that prints a few of its values.
Live result This page is a static file, built once.
page.title
Pages and layouts
page.lang
en
page.eyebrow
Part I, Basics
page.doc
pages
Source the files behind the result above
content/pages/docs-pages.yaml
slug: docs/pages
lang: en
title: Pages and layouts
alcove: docs
meta:
description: "A YAML file per page, a layout alcove with nooks to fill."
nav: docs
eyebrow: "Part I, Basics"
doc: pages
mode: "This page is a static file, built once."
nooks:
intro:
- alcove: doc_pages
live:
- alcove: demo_pagevalues
after:
- alcove: doc_pages_after