This website is built using Docusaurus 2, a modern static website generator.
- install latest version of NodeJs (version greater than 16.14). You could install it via npm
npm install -g n
- install yarn. You could install it via npm
npm install --global yarn
$ git clone [email protected]:bybit-exchange/docs.git # clone the repo
$ cd docs
$ yarn # install the dependencies
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-TW # 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, etc
yarn build
This command generates static content into the build
directory and can be served using any static contents hosting service.
Ensure you have set the GIT_USER
environment variable before trying to deploy.
yarn deploy