Getting Started
Get started by creating a new site.
Or try Docusaurus immediately with docusaurus.new.
What you'll needβ
- Node.js version 18.0 or above:
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
Generate a new siteβ
Generate a new Docusaurus site using the classic template.
The classic template will automatically be added to your project after you run the command:
npm init docusaurus@latest my-website classic
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
The command also installs all necessary dependencies you need to run Docusaurus.
Start your siteβ
Run the development server:
cd my-website
- npm
- Yarn
- pnpm
npm run start
yarn run start
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 npm 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.
ποΈ Create a page
Add Markdown or React files to src/pages to create a standalone page:
ποΈ Create a Document
Documents are groups of pages connected through:
ποΈ Create a Blog Post
Docusaurus creates a page for each blog post, but also a blog index page, a tag system, an RSS feed...
ποΈ Deploy your site
Docusaurus is a static-site-generator (also called Jamstack).
ποΈ Markdown Features
Docusaurus supports Markdown and a few additional features.
ποΈ Manage Docs Versions
Docusaurus can manage multiple versions of your docs.
ποΈ Translate your site
Let's translate docs/intro.md to French.
ποΈ Congratulations!
You have just learned the basics of Docusaurus and made some changes to the initial template.