Aug 16, 2024

The pages configuration can be done on two levels :

  • In the project.config.js
  • In the frontmatter of the pages

The project config file is mostly used to configure the pages in the sidebar and the frontmatter the page metadata.

Project.config.js definition

The page config is made thru the exported pages object.

pages

The pages array defining the pages of the documentation.

pages
array
Required
The array of pages defining the pages of the documentation.

page

A single page definition of the documentation.

name
string
Required
The name of the page or directory (the same as the filename or dirname).
icon
string

The name of the icon (https://icon-sets.iconify.design/ ). See also page.icon .

children
string
If the page is a directory, pass this prop. An array of pages.

page.icon

The icon can be a string as said above but for more customisability, it can also be define like so.

name
string
Required

The name of the icon (https://icon-sets.iconify.design/ ).

class
string
A list of classes to apply to the icon (will override default ones).

Frontmatter definition

You can add and change properties of a page by adding them to the frontmatter at the start of the page. Just a reminder that the frontmatter properties are included between three dashes : --- (see definition )

Frontmatter

The list of props of the frontmatter.

name
string
The name of page displayed in both the navbar and sidebar.
description
string
A description of the page (displayed a the start of the page and used for the search of pages).
lastModified
string
The date at witch the file has last been modified (displayed at the start of the page).
Last updated : Aug 16, 2024