1.5 KiB
1.5 KiB
sidebar_position
sidebar_position |
---|
2 |
Config front matter
What is Front Matter in a Docusaurus Markdown File?
Front matter is a special section at the beginning of a Markdown (.md
or .mdx
) file in Docusaurus, enclosed by ---
. It contains metadata about the document, which Docusaurus uses for routing, display settings, and SEO.
Example of Front Matter in Docusaurus
---
id: my-doc
title: My Documentation Page
description: A short summary of this document
slug: /custom-url
sidebar_label: My Doc
sidebar_position: 1
tags: [guide, tutorial]
---
Common Front Matter Properties
Property | Description |
---|---|
id |
A unique identifier for the document (used internally). |
title |
The page title displayed at the top of the document. |
description |
A short summary, useful for SEO and search engines. |
slug |
The custom URL path for the document (e.g., /custom-url ). |
sidebar_label |
The name displayed in the sidebar navigation. |
sidebar_position |
Order of the document in the sidebar. |
tags |
Keywords for categorization and search functionality. |
:::info
All fields in the front matter are optional. If a field is not provided, Docusaurus will use default behavior or omit the feature.
:::