docusaurus.config.js
Refer to the Getting Started Configuration for examples.
Overview
docusaurus.config.js
contains configurations for your site and is placed in the root directory of your site.
This file is run in Node.js and should export a site configuration object, or a function that creates it.
The docusaurus.config.js
file supports:
hey
Examples:
export default {
title: 'Docusaurus',
url: 'https://docusaurus.io',
// your site config ...
};
export default async function createConfigAsync() {
return {
title: 'Docusaurus',
url: 'https://docusaurus.io',
// your site config ...
};
}
Refer to Syntax to declare docusaurus.config.js
for a more exhaustive list of examples and explanations.
Required fields
title
- Type:
string
Title for your website. Will be used in metadata and as browser tab title.
export default {
title: 'Docusaurus',
};
url
- Type:
string
URL for your website. This can also be considered the top-level hostname. For example, https://facebook.github.io
is the URL of https://facebook.github.io/metro/, and https://docusaurus.io
is the URL for https://docusaurus.io. This field is related to the baseUrl
field.
export default {
url: 'https://docusaurus.io',
};