This documentation is built using Docusaurus 2, a modern static website generator.
- GitHub account.
- Markdown editor. For example, Visual Studio Code.
- Installed and set up Docusaurus 2.
- Clone the repo.
cd
to it and runyarn
to install the required modules.
From the cloned repo directory, run yarn start
to fire up a local dev server and auto-open up the built docs instance in your default browser.
Most changes are reflected live, as soon as you present them, without having to restart the server.
If you need to, generate static content in the build
directory running yarn build
.
You can then serve the content using any static contents hosting service.
To deploy:
- Navigate to the Actions tab on the repo page.
- Under
All wokflows
, on the left, clickDeploy
. - Click the
Run wokflow
button on the right, then choose the branch and environment to deploy to.- Deploy to
STAGE
to view and test your doc updates in a safe environment. - When tested and ready, deploy to
PROD
available to general public.
- Deploy to
- Click the green
Run workflow
button right below the chosen values.
Currently, we're using the following Gitflow:
- Create a feature branch from the
stage
branch. Use the branch naming format described farther in this doc. - Work on the documentation for the feature.
- When done, test your documentation deploying it to
STAGE
. - When tested, create a pull request to the
stage
branch and add colleagues as reviews, at your discretion. Use the pull request naming format described farther in this doc. - When merged, test the
stage
branch deploying it toSTAGE
. - When ready, create a pull request to the
main
branch. - When merged, test the
main
branch deploying it toSTAGE
. - When tested, deploy the
main
branch toPROD
.
The common pattern for a branch name <type>/<JIRA-TASK-NUMBER-description>
.
Types:
-
feature
— tasks and stories -
bugfix
— bugs such as typos -
hotfix
— on-the-spot updates
Naming examples:
-
feature/FOOBAR-1-create-ankr-earn-docs
-
bugfix/FOOBAR-2-fix-typos
-
hotfix/FOOBAR-3-update-sc-addresses-for-earn
The common pattern for a pull request title or commit message is <type>[optional scope]: <TASK-000 description>
.
Naming examples:
-
feat: FOOBAR-555 add docs for Ankr Protocol
-
fix(Fantom staking): FOOBAR-666 fix typos
-
chore: FOOBAR-777 update smart contract addresses for Ankr Earn
- Create a new markdown file in a related folder that lives under the
docs
folder, e.g.staking.md
should live somewhere indocs/Earn
, as it's related to ANKR Earn. - At the beginning of the file, insert yaml front matter with the page title and a unique id (emphasis on the word unique). For example:
The job must be triggered manually when https://www.ankr.com/docs/ updated.