This is the updated documentation for BNB Chain for a better user experience and navigation. This website is built using Docusaurus 2, a modern static website generator. Navigation bar are updated providing a better division of topics and easier navigation for the users. Multiple files have been re-formatted and new files are also included.
-
Node version >= 14 or above
- node -v
- v16.13.0
- node -v
-
npm --version
- 8.1.0
-
Yarn _version >= 1.5 _
- yarn --version
- 1.22.17
- yarn --version
The easiest way to install Docusaurus is to use the command line tool that helps you scaffold a skeleton Docusaurus website. You can run this command anywhere in a new empty repository or within an existing repository, it will create a new directory containing the scaffolded files.
npx create-docusaurus@latest [name] [template]
Clone the reository and run the following commands.
Install the packages.
Using npm
npm install
Using Yarn
$ yarn install
Start local development server
Using npm
npm run start
Using 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.
We recommend to use the yarn package for building and deploying this website.
Using npm
npm run build
Using Yarn
$ yarn run build
This command generates static content into the build
directory and can be served using any static contents hosting service.
Using npm
npm run serve
Using Yarn
$ yarn run serve
The website is run locally on your deault browser on http://localhost:3000.
In a javascript-sdk directory cloned in this repo's parent directory, use the yarn build:docs
command to generate the file, then copy the generated file in docs/jsdoc.md
over the existing docs/api-reference/js-sdk/jsdoc.md
:
$ cp ./docs/jsdoc.md ../docs-site/docs/api-reference/js-sdk/jsdoc.md
$ swagger-codegen generate -i ./rpc-openapi.json -l html2 -o ./static/rpc-swagger
$ swagger-codegen generate -i ./swagger.json -l html2 -o ./static/api-swagger