Overview

This project is created using Docusaurus 2. Docusaurus is a modern static website generator.

  • It helps us create a documentation site in no time.
  • It builds a single-page application with fast client-side navigation.
  • It leverages power of React to make site interactive.

How it works for us

  • We have created this repository as a container.
  • Any docs repo can be added in this to create build or to add run local.
  • The docs repo should be cloned in docs->repo folder.

How to run local

To run docs in local follow the given steps:

  • Clone the doc-gen-docusaurus repo from 'git@github.com:AntaresSystems/doc-gen-docusaurus.git'.
  • Run 'npm install' o download the dependencies.
  • Go to docs->repo folder.
  • Clone the docs repository you want to run using command 'git clone {path} .'
  • Run the server using 'npm run start'.

Create you own docs repo

  • Create a new github repo as well as its build repo.
  • Clone the repo in docs->repo.
  • Copy the contents of sample repo into the repo.
  • Customize the files in doc-gen as per your project requirements. You can customize the following files:
    • custom-sidebar.js: This is the main file to configure sidebar of your docs project.
    • custom-style.css: This file applies custom styles to your project.
    • custom-script.js: If you want to run some javascript in staring of your project.
    • custom-config.js: Configure some paths for the product.
  • Add your .md files in it.
  • Commit the changes in repo.

Docs build

  • Docs build can be applied by build-mgmt like every other repo.
  • Internally, docusaurus-build.sh does the following steps:
    • It copies the docs repo from the path given into docs->repo.
    • Then it creates the build in dist folder.
    • Build is then copied from dist folder to its build repo.
    • Commit the build in its repo.