Docusaurus Template Intro
This is a Docusaurus starter with added Datamole styling and some minor customization.
Configuration
Most of docusaurus configuration is done in the docusaurus.config.js. However, in this starter, most of the frequently edited sections are extracted into the config folder. There is the config/general.js, config/footer.js, config/navbar.js and config/openApiPlugin.js. Whenever you want to edit something in the docusaurus.config.js file, check if the part you are editing isn't extracted and if so, edit it in the related file.
Documents and Pages
To learn how to create and maintain Documents and Pages, simply follow the Docusaurus tutorial in the following sections.
Blog
The Docusaurus Blog feature is currently not styled and if used, may contain some styling issues. It is disabled by default and can be enabled by following the instructions at https://docusaurus.io/docs/blog.
OpenAPI
This template contains a OpenAPI plugin https://github.com/PaloAltoNetworks/docusaurus-openapi-docs, but the example is disabled by default.
To access it, open the config/openApiPlugin.js file and edit the first line to set useOpenApiPlugin constant to true. Then you can run the command yarn docusaurus gen-api-docs all to generate example documents for Swagger's petstore project. The source for this documentation is in examples/petstore.yaml. This will create multiple markdown files in the docs folder. If you would like to have a separate sidebar for the api documentation, you can read more about multiple sidebars here.
1 const useOpenApiPlugin = true;
Integrating into existing Docusaurus project
This may be tricky, depending on how much customization has already been done. You should compare your docusaurus.config.js file with the one in this starter, and also check the config folder with the extracted configuration. Apart from this, copy the custom.css file, the Footer component (src/theme/Footer/Layout/index.js) and the welcome page component (src/pages/index.tsx) into your repository. The Footer and Welcome page may require some additional work depending on what content has already been altered.