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.
sidebar_label
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.
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.
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
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.