Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.
Your site structure looks like the following:
root-of-repo ├── docs └── website │ └── blog │ └── core │ └── Footer.js │ └── node_modules │ └── package.json │ └── pages │ └── sidebars.json │ └── siteConfig.js │ └── static
This assumes that you removed the example
.mdfiles that were installed with the initialization script.
All of your documentation files should be placed inside the
docs folder as markdown
.md files. Any blog posts should be inside the
The blog posts must be formatted as yyyy-mm-dd-your-file-name.md
Create Your Basic Site
To create a fully functional site, you only need to do a few steps:
Add your documentation to the
.mdfiles, ensuring you have the proper header in each file. The simplest header would be the following, where
idis the link name (e.g.,
docs/intro.html) and the
title, is, of course, the title of the browser page.
id: intro title: Getting Started My content* here..
Add zero or more docs to the
sidebars.jsonfile so that your documentation is rendered in a sidebar, if you choose them to be.
If you do not add your documentation to the
sidebars.jsonfile, the docs will be rendered, but they can only be linked to from other documentation and visited with the known URL.
- Modify the
website/siteConfig.jsfile to configure your site, following the comments included in the docs and the
website/siteConfig.jsto guide you.
- Create any custom pages and/or customize the
website/core/Footer.jsfile that provides the footer for your site.
- Place assets, such as images, in the
- Run the site to see the results of your changes.
cd website yarn run start # or `npm run start` # navigate to http://localhost:3000