Front matter
Meta information
Front matter that informs the meta information of a page.
title
The <h1>
title of the page. This title appears at the top of the page, and in the left-hand navigation.
You do not need to add this text as an <h1>
because Gatsby generates this heading from the title
tag.
Note:
- You can wrap the
title
text in single quotes, but this is not mandatory. - If you wrap the
title
text in single quotes, then you cannot include apostrophes in the text.
metaTitle
The <title>
of the page - falls back to title
(h1
).
This tag is important for Google SEO. If we wish, we can make the metaTitle
more descriptive than the title
.
For good SEO, spell out abbreviations in this tag, unless they are industry standard. For example, spell out "Prisma Data Platform", but it is fine to use the abbreviation "ORM".
Note:
- You can wrap the
metaTitle
text in single quotes, but this is not mandatory. - If you wrap the
metaTitle
text in single quotes, then you cannot include apostrophes in the text.
navTitle
Specifies a different, usually shorter title for the left-hand navigation.
metaDescription
The <meta name="description" content="" />
of the page.
Note:
- You can wrap the
metaDescription
text in single quotes, but this is not mandatory. - If you wrap the
metaDescription
text in single quotes, then you cannot include apostrophes in the text.
Navigation (left sidebar)
Front matter that configured the navigation.
staticLink
Accepts true
or false
(defaults to false
).
If true
, this option turns the page into a heading in the left-hand navigation. This heading cannot be clicked by the docs user. For example on this page.
Note: The page still exists, but docs users can only navigate to it with the breadcrumb trail. We recommend that you add a subsections MDX component to the page, so that it contains useful content when a user navigates to it with the breadcrumb trail.
duration
Accepts a string specifying the duration to read the article.
Example: duration: '15 min'
preview
Accepts true
or false
(defaults to false
).
Adds a Preview
label to a page in the left-hand navigation.
deprecated
Accepts true
or false
(defaults to false
).
Adds a Deprecated
label to a page in the left-hand navigation.
hidePage
Accepts true
or false
(defaults to false
).
When set to true
, hides the page from all navigation.
hidePage: true
Note:
- A page hidden with
hidePage
is not listed by the subsections MDX component. - A page hidden with
hidePage
is still findable by docs users with a search. To omit a page from the search results, use thesearch
tag.
Table of Contents (right sidebar)
toc
Enable or disable table of contents navigation on the page (defaults to false
). For example:
toc: true
tocDepth
Controls the depth of headings to show in the in-page ToC:
tocDepth: 2
Note: Currently defaults up to level -
h2
Search
Front matter that configures search.
search
Accepts true
or false
(defaults to true
).
When set to false
, omits the page from search results.
search: false
Note:
- A page omitted from search results is still shown in the navigation. To hide it in the navigation, use the
hidePage
tag.
Page content
Front matter that configured page content
langSwitcher
Accepts an array of languages to be shown in the page as dropdown options in order to switch the context between the pages
Example:
langSwitcher: ['typescript', 'node']
dbSwitcher
Accepts an array of database options to be shown in the page as dropdown options in order to switch the context between the pages
Example:
dbSwitcher: ['postgresql', 'mysql', 'sqlserver', 'planetscale', 'cockroachdb']
Design
Front matter to configure the visual appearance of a page.
wide
Accepts true
or false
(defaults to false
).
When set to 'true', this page will have a content width of 988px instead of the default 748px.
Example:
wide: true
Note:
- Please use this only for pages with unreadable wide tables.