Front matter
Front matter is a YAML mapping. Each field becomes MarkupKit page metadata or page data, and an unknown or mistyped field fails the build with the Markdown file's path, the field and the expected type.
| Field | Type | Effect |
|---|---|---|
title | string | The document <title>, the navigation, breadcrumb and pager label (MarkupKit mk:label), and page.title. Defaults to the first heading, then the file name. On a folder's index page it labels the folder. |
description | string | <meta name="description">, and the page's line in its folder's generated index. |
order | whole number | The page's place among its folder's pages, in place of its file's number prefix (MarkupKit mk:order). On a folder's index page it places the whole folder, and on the version home it is an error. |
navigation | hidden, collapsed or overview | hidden leaves the page out of navigation and keeps its route (MarkupKit mk:navigation). On a folder's index page, collapsed starts the folder's sidebar group closed. overview makes a non-index page its containing route group's overview link, without repeating it among sub-links. |
draft | true or false | true serves the page in markupress dev and leaves it out of markupress build: no page, navigation entry, search result or sitemap entry. A built page that links to a draft fails the build. The drafts option includes drafts in a build, such as a staging site. |
id | string | The document identity across versions, independent of the file name and route. |
aliases | list of route paths | Further URLs serving the page, relative to its version (MarkupKit mk:alias). |
redirectFrom | list of route paths | Old URLs of the page, relative to its version, such as /setup/. Each one redirects to the page (MarkupKit mk:redirect-from): with status 308 in dev and preview, and as a redirect page at the old URL in a build. |
layout | string or false | An MarkupKit layout, app/layouts/<name>.html, in place of the site's layout for this page (MarkupKit mk:layout). home is Markupress's home page. false renders the page with no layout. |
outline | false or [min, max] | The heading levels in the page's "On this page" outline, [2, 3] by default. false gives an empty outline. |
head | mapping | meta (name to content), og (Open Graph property without og:, to content) and canonical (a URL), rendered into the document head. |
lang | language tag | The page's language, its <html lang>, in place of the site's lang option. |
markdownSyntax | standard or compatible | How the page's Markdown reads, in place of the site's markdownSyntax option. |
dir | ltr, rtl or auto | The document and article direction, overriding the locale's configured or inferred direction. The reader interface language still follows the configured locale. |
previous, next | false or mapping | The pager's links to the pages before and after this one. false drops the link, and { label, href } relabels or retargets it, with href written as a link in the page, such as ../install.md. |
editLink | URL or false | The page's "Edit this page" URL, in place of the one the editLink option gives. false shows none. |
---
title: Installation
outline: [2, 4]
editLink: https://github.com/org/repo/edit/main/docs/01.guide/02.install.md
head:
meta: { keywords: "install, setup" }
og: { image: https://example.com/social.png, type: article }
canonical: https://example.com/guide/install/
---