-
Notifications
You must be signed in to change notification settings - Fork 5
How to Version Docs
Yos Riady edited this page Apr 30, 2020
·
16 revisions
Before you proceed, make sure you have comit-js-sdk
and comit.network
repos in the same directory on your machine:
.
├──work/
| ├── comit-js-sdk/ ~ tag 0.15.2
| └── comit.network/
└── docs/
└── comit-sdk/ # Generated Docs
└── versioned_docs/
└── version-0.15.2/ # Generated Folder
└── comit-sdk/ # Generated Docs
- Only modify files in
docs/
. You can create new.md
files or modify existing files.- Avoid modifying
versioned_docs/
directly. - Instead, use the
yarn docusaurus docs:version
command explained in Publishing as a New Version
- Avoid modifying
- In
comit.network/
, regenerate SDK docs by runningyarn build:sdk
.- This command uses the
comit-js-sdk
repo version on your machine e.g.master
or0.15.2
. - This command will automatically generate SDK docs of
comit-js-sdk
and update the website files.
- This command uses the
- Commit and push your changes. Merge it.
- Your changes won't be viewable in
https://comit.network/docs/
, but it will be inhttps://comit.network/docs/next/
.
- Your changes won't be viewable in
- To publish your changes to
https://comit.network/docs/
, runyarn docusaurus docs:version <your version e.g. 0.15.3>
.- The above command will create a
version-0.15.3
folder inversioned_docs/
andversion-0.15.3-sidebars.json
inversioned_sidebars
. Think of these files as versioned snapshots of the documentation.
- The above command will create a
- Commit and push your changes. Merge.
- Your changes will be published under
https://comit.network/docs/
- The website is automatically redeployed whenever
master
is updated.
- Your changes will be published under
You want to update the documentation for an existing version in versioned_docs/version-0.15.2
.
- First, make sure you have the
comit-js-sdk
checked out to the existing version and notmaster
.
.
├──work/
| ├── comit-js-sdk/ ~ tag 0.15.2
| └── comit.network/
└── docs/
└── comit-sdk/ # Generated Docs
└── versioned_docs/
└── comit-sdk/ # Generated Docs
- In
comit.network/
, regenerate SDK docs by runningyarn build:sdk
.- This step ensures that the current
comit-sdk/
indocs/
does not overwrite the folder in the existing version. Instead, we use the samecomit-sdk/
version.
- This step ensures that the current
- Remove the version string (e.g. e.g.
0.15.2
) you want to overwrite inversions.json
. - Then, run
yarn docusaurus docs:version 0.15.2
.