Guide · Open source
How to use Docusaurus: install, create a site and build docs
Updated · written with AI from the project's own documentation and checked against our catalogue data
Docusaurus is an open source project for building, deploying, and maintaining project websites. It ships with a home page, a docs section, an optional blog and support pages, all of which you can customize. This guide shows you how to create a new site, what you need before you start, and where to go next so you can build your own documentation site.
Quick start
- 1Check Node.js. Confirm Node.js is installed on your computer, since it is the listed prerequisite.
- 2Create the site. Run npm init docusaurus@latest in the folder where you want your site.
- 3Explore the default pages. Look at the home page, docs section, blog and support pages that come with the new site.
- 4Customize pages. Edit pages and styling using the official creating-pages and styling-layout guides.
- 5Add translations. If needed, set up localization through CrowdIn using the i18n docs.
- 6Deploy. Publish your site with a host such as Vercel or Netlify, following the official docs.
What you need before you install Docusaurus
Docusaurus is set up with a command-line tool, so you need to be comfortable running commands in a terminal. The main prerequisite listed for installation is Node.js. Docusaurus is written in TypeScript and is aimed at people comfortable with JavaScript and React who want to customize their site.
- Node.js installed on your computer
- A terminal to run commands
- Basic familiarity with JavaScript and React if you plan to customize pages
Create a new Docusaurus site
Docusaurus uses an initialization CLI to create your site. Run the command below in the folder where you want the site to live. The README describes the goal as getting a site running quickly so you can focus on your project rather than the build process.
For more detail on installation, the README points to the official installation docs at docusaurus.io.
npm init docusaurus@latestUnderstand the parts of a Docusaurus site
A new Docusaurus site comes with the key pages and sections most projects need. You do not have to build them from scratch.
Docusaurus includes a home page, a docs section, an optional blog, and additional support pages. Each one can be changed to fit your project.
- Home page: the front page of your project site
- Docs section: built-in documentation pages
- Blog: optional, for news and updates
- Support pages: additional pages you can customize
Customize your site
Docusaurus is designed to be customizable so the site feels like your own. The official documentation covers creating pages and styling and layout, and both are linked from the project README.
Customization involves editing code, so this step suits people comfortable with JavaScript and React. If you prefer a no-code site builder, Docusaurus is not the right fit.
- Creating pages: see the official creating-pages guide
- Styling and layout: see the official styling-layout guide
Add more languages with localization
If your project needs multiple languages, Docusaurus ships with localization support via CrowdIn. Translating your documentation lets you reach an international community.
The localization introduction is available in the official i18n docs.
Deploy your site
The project describes itself as a way to build, deploy, and maintain project websites. The README includes deploy buttons for Vercel and Netlify, which clone a starter repository to get a site online. Check the official docs for the full deployment steps.
- Deploy with Vercel using the button in the README
- Deploy to Netlify using the button in the README
What people use it for
- An open source project publishing its main documentation website
- A team that wants built-in docs, blog and home pages without building them from scratch
- A project translating its documentation for an international community
- A developer maintaining a project site that needs custom pages and styling
Frequently asked questions
Is Docusaurus free to use?
Docusaurus is MIT licensed, which is an open source licence. The Docusaurus documentation itself is Creative Commons licensed. Check the LICENSE file in the project for the full terms.
What do I need to install Docusaurus?
The listed prerequisite is Node.js. You also need a terminal, since the site is created with the command npm init docusaurus@latest.
How do I create a Docusaurus site?
Run npm init docusaurus@latest in the folder where you want the site. The initialization CLI creates the site for you.
Can Docusaurus be used without coding?
Not really. Setup uses a command-line tool and customization involves code, so Docusaurus suits people comfortable with JavaScript and React. Non-technical users who want a no-code builder should look elsewhere.
Does Docusaurus support multiple languages?
Yes. The README says Docusaurus ships with localization support via CrowdIn, so you can translate your documentation.
How does Docusaurus compare to MkDocs, Sphinx, Hugo or VitePress?
MkDocs, Sphinx, Hugo and VitePress are comparable projects that also build project or documentation sites. This guide does not compare their features, so check each project's own docs to decide which fits your needs.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Docusaurus suits open source projects that need a documentation website with built-in docs, blog and home pages, especially if they need translations and their team is comfortable with JavaScript and React. It is a poor choice for non-technical users who want a no-code builder or for very small static pages where a simple HTML site would do.
Install options & downloads