Skip to content
This repository was archived by the owner on Jun 10, 2026. It is now read-only.

Commit ece36a0

Browse files
authored
Merge pull request #212 from alphagov/update-to-support-tdg-release
update optional frontmatter to use layouts
2 parents 1a97e95 + 8eade48 commit ece36a0

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

source/configure_project/frontmatter/index.html.md.erb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,17 @@ layout: core
128128
This page does not have a sidebar.
129129
```
130130

131+
You can use layouts to group pages and customise your Table of Contents (ToC). To create a layout, create a new ruby file in the `source/layouts` directory, for example `source/layouts/live_support.erb`.
131132

133+
Apply the template by including it in the frontmatter block of a page. In this example, we're applying the `live_support` layout to the page:
134+
135+
```rb
136+
---
137+
layout: live_support
138+
---
139+
```
140+
141+
The `tech-docs-gem` also has [helper functions you can use to manage your Table of Contents](https://github.com/alphagov/tech-docs-gem?tab=readme-ov-file#table-of-contents-helper-functions).
132142

133143
### old_paths
134144

0 commit comments

Comments
 (0)