Page frontmatter

Page frontmatter is YAML added to the top of the page and is used to set page specific options such as page title and link order.

The frontmatter for a typical page might look like:

---
title: Content editor documentation
description: Documentation for content editors creating and updating documentation.
eleventyNavigation:
  order: 20
---

Every page should define a title and a description.

As this starterkit uses 11ty some of the frontmatter settings are used by 11ty, others are specific to the starterkit.

description

A description of the page contents. This is used in the page metatdata and in the social preview images and so should be set for every page.

Example:

description: Documentation for content editors creating and updating documentation.

eleventyNavigation

The 11ty navigation plugin settings used to generate the menu and breadcrumb.

Example:

eleventyNavigation:
order: 2
title: Short page title

layout

The name of the 11ty layout file to use. If not set this defaults to page.njk.

The available layouts can be found in the docs/_assets/layouts directory.

Example:

layout: home.njk

mermaid

Turn on Mermaid JS diagramming.

Example:

mermaid: true

needsReview

When set to true a message is displayed at the top of the page saying the content is out of date and the page is added to the needs review listing page at /needs-review.html.

Example:

needsReview: true

noIndex

Tell search engines not to index the page.

Example:

noIndex: true

Set the URL path for the page. If not set the file path is used.

For more information see the 11ty permalink documentation.

Example:

permalink: 'my-page.html'

redirects

A list of paths that should redirect to this page. Useful when converting a site to use the starterkit to ensure old URLs redirect to new ones.

Example:

redirects:

- /docs/environment/setup-existing/

title

The page title. Used as the toplevel (H1) heading in the page and also in the HTML title tage. This must be set and be unique for every page.

Example:

title: Content editor documentation

Last updated: