Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions website/docs/api/docusaurus.config.js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ slug: /api/docusaurus-config

# `docusaurus.config.js`

:::info

Refer to the Getting Started [**Configuration**](docs/configuration.mdx) for examples.

:::

## Overview {#overview}

`docusaurus.config.js` contains configurations for your site and is placed in the root directory of your site.
Expand Down
15 changes: 14 additions & 1 deletion website/docs/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ description: Configuring your site's behavior through docusaurus.config.js and m

import TOCInline from '@theme/TOCInline';

:::info

Check the [**`docusaurus.config.js` API reference**](api/docusaurus.config.js.mdx) for an exhaustive list of options.

:::

Docusaurus has a unique take on configurations. We encourage you to congregate information about your site into one place. We guard the fields of this file and facilitate making this data object accessible across your site.

Keeping a well-maintained `docusaurus.config.js` helps you, your collaborators, and your open source contributors to be able to focus on documentation while still being able to customize the site.
Expand All @@ -20,7 +26,6 @@ The high-level overview of Docusaurus configuration can be categorized into:

<TOCInline toc={toc} minHeadingLevel={3} maxHeadingLevel={3} />

For exact reference to each of the configurable fields, you may refer to [**`docusaurus.config.js` API reference**](api/docusaurus.config.js.mdx).

### Site metadata {#site-metadata}

Expand Down Expand Up @@ -49,6 +54,14 @@ module.exports = {
};
```

:::info[About the default `docusaurus.config.js` template]

The init template `docusaurus.config.js` uses the `const config = { ... }` and it is equivalent to `module.exports = { ... }` shown throughout the examples.
There are various equivalent ways to declare your Docusaurus config, such as using creator functions and async code.
See: [**`docusaurus.config.js` API reference**](api/docusaurus.config.js.mdx)

:::

:::tip

Docusaurus supports [**module shorthands**](./using-plugins.mdx#module-shorthands), allowing you to simplify the above configuration as:
Expand Down