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-directory ├── docs └── website ├── blog ├── core │ └── Footer.js ├── 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 directory as markdown
.md files. Any blog posts should be inside the
The blog posts must be formatted as
Crează-ți Site-ul tău de bază
Pentru a crea un site complet funcțional, trebuie doar să urmezi câțiva pași:
- 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
titleis the webpage's title.
--- id: intro title: Getting Started --- My new content here.. ``` 1. Add zero or more docs to the [`sidebars.json`](/docs/ro/navigation#adding-docs-to-a-sidebar) file 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.json` file, the docs will be rendered, but they can only be linked to from other documentation and visited with the known URL. 3. Modify the `website/siteConfig.js` file to [configure your site](/docs/ro/site-config), following the comments included in the [docs](/docs/ro/site-config) and the `website/siteConfig.js` to guide you. 1. Create any [custom pages](/docs/ro/custom-pages#customizing-your-site-footer) and/or [customize](/docs/ro/custom-pages#customizing-your-site-footer) the `website/core/Footer.js` file that provides the footer for your site. 1. Place assets, such as images, in the `website/static/` directory. 1. Rulează site-ul pentru a vedea rezultatele schimbărilor tale. ```bash cd website yarn run start # or `npm run start` # Navigate to http://localhost:3000
Docs Landing Page
If you prefer to have your landing page be straight to your documentation, you can do this through a redirect.
- Remove the
index.jsfile from the
website/pagesdirectory, if it exists.
- Add a custom static
index.htmlpage in the
website/staticdirectory with the following contents:
You will get the
idof the document to land on the
.mdmetadata of that doc page.
You can also use Docusaurus to host your blog only.