Skip to main content

Getting started with Docusaurus

Generate a new site

Generate a new Docusaurus site using the classic template.

Run the command:

pnpm create docusaurus

Start your site

Run the development server:

cd my-website
pnpm run start

The cd command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.

The pnpm run start command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.

Open docs/intro.md (this page) and edit some lines: the site reloads automatically and displays your changes.

Customize your site

Update the following in the docusaurus.config.js file.

  • title
  • tagline
  • favicon
  • url
  • baseUrl
  • organizationName
  • projectName

Install type definitions

pnpm add @docusaurus/types

Custom domain

Add CNAME file to /static directory.

mywebsite.com