Celestia Docs is built using Docusaurus 2, a modern static website generator. Learn more in the Docusaurus Documentation.
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.
In order to version the API docs, you will need to do a few things.
-
change into the
docs/
repository -
Replace
your-new-version
with your desired version ofcelestia-node
. -
In
docs/src/theme/Navbar/Content/index.js
add your new version to line 55:
Change this:
const versions = ['v0.11.0-rc8'];
To this:
const versions = ['your-new-version', 'v0.11.0-rc8'];
- Do the same thing in
docs/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.js
on line 24:
const versions = ['your-new-version', 'v0.11.0-rc8'];
- Next, you'll need to update the API page and links.
In docs/developers/node-api.md
, edit line 11:
can be found [here](/api/v0.11.0-rc8).
Change the above to:
can be found [here](/api/your-new-version).
- In the
docs/developers/node-tutorial.mdx
page,
Change this:
## RPC CLI guide
This section of the tutorial will teach you how to interact with a
Celestia node's
[RPC (Remote Procedure Call) API](/api/v0.11.0-rc8).
To this:
## RPC CLI guide
This section of the tutorial will teach you how to interact with a
Celestia node's
[RPC (Remote Procedure Call) API](/api/your-new-version).
- Change the path in the
docs/developers/overview.md
page.
Change this:
* [Node API docs](/api/v0.11.0-rc8)
To this:
* [Node API docs](/api/your-new-version)
- Next, change the linked API in
sidebars.js
Change this:
{
"type": "link",
"label": "Celestia Node API",
"href": "/api/v0.11.0-rc8"
},
To this:
{
"type": "link",
"label": "Celestia Node API",
"href": "/api/your-new-version"
},
- Lastly, generate or copy the final openrpc.json for the version that you are using.
git clone https://github.com/celestia-node.git
cd celestia-node
git checkout tags/your-new-version
make openrpc-gen | pbcopy
Paste that into docs/src/openrpc-spec/openrpc-your-new-version.json
and remove the first line of output from the terminal.
- Duplicate
docs/src/pages/api/v0.11.0-rc8.js
and change the name of the new version todocs/src/pages/api/your-new-version.js
. Change the import in the newly named file to what you created above:
import(`@site/src/openrpc-spec/openrpc-your-new-version.json`)
- Start your newly versioned site to reflect the latest versioning changes!