Skip to content

packetstracer/celestia-docs

 
 

Repository files navigation

Celestia Docs Page

Celestia Docs is built using Docusaurus 2, a modern static website generator. Learn more in the Docusaurus Documentation.

Installation 🛠️

yarn

Local Development 🖥️

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.

Build 👷‍♀️

yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment 🚀

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.

API documentation versioning 1️⃣

In order to version the API docs, you will need to do a few things.

  1. change into the docs/ repository

  2. Replace your-new-version with your desired version of celestia-node.

  3. 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'];
  1. 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']; 
  1. 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).
  1. 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).
  1. 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)
  1. 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"
        },
  1. 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.

  1. Duplicate docs/src/pages/api/v0.11.0-rc8.js and change the name of the new version to docs/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`)
  1. Start your newly versioned site to reflect the latest versioning changes!

About

Celestia Documentation Site

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 81.8%
  • CSS 11.8%
  • MDX 5.7%
  • Shell 0.7%