Skip to main content
Table of contents

Configure page settings

You configure individual pages in your documentation by editing the page frontmatter.

The page frontmatter contains page-specific variables at the top of the page.

For a general introduction on frontmatter, see the Middleman frontmatter documentation.

For example:

---
title: Page title
weight: 100
last_reviewed_on: 2100-01-01
review_in: 1 year
---

# Configure page settings

You configure individual pages in your documentation by editing the page frontmatter.
Warning You should enable or disable settings to increase the usability of your documentation or because of best practice.

If you are not sure which settings to enable or disable, contact the GDS tech writers.

Required frontmatter settings

There are no required frontmatter settings in a single page documentation site.

In a multipage documentation site, you must include the weight frontmatter setting.

weight

Sets the order of pages in the left hand navigation.

This setting works the same way as page numbers in a book. A lower weight value is higher in the navigation. A higher weight value is lower in the navigation.

For example a page with a weight of 10 will appear higher in the navigation than a page with a weight of 20.

---
weight: 20
---

Optional frontmatter settings

You can enable and disable the following optional settings in the page frontmatter.

description

Sets the description for the page, which will be used in search engine results or on social media.

---
description: Configuring page settings in the GDS Technical Documentation Template.
---

hide_in_navigation

Set hide_in_navigation: true to prevent the page from being rendered in the main left hand navigation.

---
hide_in_navigation: true
---

“last_reviewed_on” and “review_in”

These attributes determine the date when the page needs to be reviewed next.

See page expiry and review documentation for more details.

You can use this in combination with the owner_slack variable to set an owner for the page.

layout

The layout of the page. By default, pages will use the layout layout. This layout will parse the page and generate a sidebar with a table of contents consisting of each h2, h3, h4 heading.

---
layout: layout
---

# The title

## A subheader

### A h3 subheader

## Another subheader

This layout generates a page with the headings from the content in the sidebar.

If you want more control about the layout, you can use the core layout. This allows you to specify the sidebar manually with a content_for block.

---
layout: core
---

<% content_for :sidebar do %>
  You can put anything in the sidebar.
<% end %>

This page has a configurable sidebar that is independent of the content.

If you do not specify a sidebar, you get a one-column layout without a sidebar.

---
layout: core
---

This page does not have a sidebar.

old_paths

Any paths of pages that should redirect to this page.

Example:

---
old_paths:
  - /some-old-page.html
---

owner_slack

The Slack username or channel of the page owner. Use this to appoint an individual or team as responsible for keeping the page up to date.

---
owner_slack: "#operations-teams"
---

parent

Defines the page that should be highlighted as ‘active’ in the navigation.

---
parent: shaving-yaks.html
---

prevent_indexing

Set prevent_indexing: true to prevent the page from being indexed by search engines.

---
prevent_indexing: true
---

source_url

If the contribution banner is turned on, you can override the “View source” link using source_url.

Example:

source_url: http://example.org/source.md

title

The browser title of the page.

---
title: My beautiful page
---
This page was last reviewed on 1 July 2020. It needs to be reviewed again on 1 July 2021 by the page owner #tech-writers .
This page was set to be reviewed before 1 July 2021 by the page owner #tech-writers. This might mean the content is out of date.