This website is built using Docusaurus 2, a modern static website generator.
- install yarn. You could install it via npm
npm install --global yarn$ git clone git@github.com:bybit-exchange/docs-v2.git # clone the repo
$ cd docs-v2
$ yarn # install the dependencies
$ yarn add docusaurus-plugin-openapi-docs
$ yarn add docusaurus-theme-openapi-docs
Running the below script copies our custom js files into an untracked lib directory, which enables sending authenticated requests to the bybit API.
It should be run on the first installation and on subsequent yarn upgrades.
$ chmod +x setup.sh
$ ./setup.sh
As we have english and chinese in the application, so you need to start them separately.
$ yarn start # start the local EN site
$ yarn start --locale zh # start the local CN site
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
βββ docs # put english mdx files here
β
βββ i18n
βΒ Β βββ en
βΒ Β βΒ Β βββ docusaurus-plugin-content-docs
βΒ Β βΒ Β βΒ Β βββ current.json
βΒ Β βΒ Β βββ docusaurus-theme-classic
βΒ Β βΒ Β βββ navbar.json
βΒ Β βββ zh
βΒ Β βββ docusaurus-plugin-content-docs
βΒ Β βΒ Β βββ current # maintain CN mdx files here
βΒ Β βΒ Β βΒ Β βββ derivatives
βΒ Β βΒ Β βββ current.json # CN sidebar name
βΒ Β β
βΒ Β βββ docusaurus-theme-classic
βΒ Β βββ navbar.json # CN navbar name
βββ sidebars.js # sort and organize side category
βΒ
βββ docusaurus.config.js # basic configs, including logo, path, and navbar, etcyarn buildThis command generates static content into the build directory and can be served using any static contents hosting service.
yarn deploy