Skip to main content

Default Configuration

In a TypeScript Docusaurus codebase, the configuration file is named docusaurus.config.ts. You can see the custom configuration of this website.

Default

docusaurus.config

Default configuration
docusaurus.config.js
// @ts-check

/** @type {import('@docusaurus/types').Config} */
const config = {
tagline: 'Dinosaurs are cool',
favicon: 'img/favicon.ico',

/* Your site config here */

presets: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
(
{
/* Your preset config here */
}
),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
(
{
/* Your theme config here */
}
),
};

export default config;
Default sidebars
sidebars.js
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation

The sidebars can be generated from the filesystem, or explicitly defined here.

Create as many sidebars as you want.
*/

// @ts-check

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],

// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
*/
};

export default sidebars;

Troubleshoot

Resolve issues caused by mismatching cached dependencies - especially during upgrades.

Step one

Clear all generated assets, caches and build artifacts:

npm run clear

Step two

Remove node_modules and the lock file(s):

rm -rf node_modules yarn.lock package-lock.json

Step three

Reinstall packages:

npm install