Frontmatter #

Frontmatter is a small set of settings at the very top of a Markdown file. It does not appear in the document. Use it for a title, description, layout, or your own data.

Write Frontmatter #

YAML is the usual format. Put the data between three dashes before anything else in the page:

Markdown
---
title: Getting started
description: Create your first KawaPress site in a few minutes.
---

# Getting started

A JSON object works too:

Markdown
{
  "title": "Getting started",
  "description": "Create your first KawaPress site in a few minutes."
}

# Getting started

These values travel with the page, so keep them simple: text, numbers, true or false, null, lists, and plain objects.

Use Your Own Data #

Alongside the fields below, you can save any page data you need. Read the current page with usePageData():

Markdown
---
status: beta
---

<script setup lang="ts">
import { usePageData } from 'kawapress/client'

const page = usePageData()
</script>

Current status: {{ page?.frontmatter.status }}

usePageData() updates during client-side navigation. It reads only the page that is open.

Page Titles and Descriptions #

Use these three fields to set a page title and summary:

FieldWhat it does
titleThe page title. The first H1 is used when it is absent.
descriptionA short page summary for search engines and link previews.
titleTemplateA browser-tab title template. %s becomes the page title; use false for the page title alone.
Markdown
---
title: Configure your site
description: Set a KawaPress site title, path, and language.
titleTemplate: '%s · KawaPress Guide'
---

The browser-tab title for this page is “Configure your site · KawaPress Guide”. The page title is also used by site search.

Nagi Page Layout #

With the default nagi experience, layout chooses the page layout and navigation:

Markdown
---
layout: home
---
ValueResult
docThe default document layout.
homeA landing-page layout with hero and features.
pageA plain-page layout without the document sidebar or page outline.

You can also turn off individual nagi regions for one page:

Markdown
---
navbar: false
sidebar: false
outline: false
footer: false
pageClass: focused-page
---
FieldWhat it does
navbar: falseHides the top navigation.
sidebar: falseHides this document page’s sidebar and menu. The page remains in the site navigation.
aside: falseHides the wide-screen page-outline rail.
outline: falseHides every page outline, including the small-screen outline button.
footer: falseHides the footer on a home or page layout.
pageClassAdds a CSS class to the page’s outer element for your own styles.

See Getting Started for hero and features.

To keep a page out of the default local search, write:

Markdown
---
search: false
---

Only a literal false excludes a page.