This website is generated with Docusaurus 2 and features Midnight documentation.
To get started, ensure you have Node version v22.17.1 or higher installed:
node -v
Next, globally install Yarn using NPM:
npm install -g yarn
Install packages:
yarn
Run a local instance of the documentation:
yarn start
A browser window should open automatically; if not, visit localhost:3000.
If you see an error message like 'algolia.appId is required', verify your .env
file for accuracy.
- Every change in the repository should follow the review process.
- At least one reviewer is needed to approve changes.
- Documentation should be strict, concise, and focused on providing details on the architecture and processes.
- Use precise language.
- Don't put links or references to other private repositories in documentation.
- Directory structure should be at a maximum of two levels deep.
- Headings should be a maximum of three levels deep at maximum —
###
. - All ambiguous and not widely-known terms should be described in Glossary section.
- API documentation should be automatically updated in midnight-api.
$ yarn
$ yarn start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
$ yarn build
This command generates static content into the build
directory and can be served using any static contents hosting service.
Using SSH:
$ USE_SSH=true yarn deploy
Not using SSH:
$ GIT_USER=<Your GitHub username> yarn deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages
branch.
- Within the component repository you want to create API documentation create
/docs/api
directory. - Setup GHA that:
- updates the API documentation automatically
- creates PR with API changes
- Setup GHA in this repository that:
- copies the data from source component repository
/docs/api
directory into destination/docs/midnight-api/component
- creates a PR with all API changes
- copies the data from source component repository