This Aptos Developer Documenatation is built using Docusaurus 2. Follow the below steps to build the docs locally to test your contribution.
IMPORTANT: These installation steps apply to macOS environment.
Before you proceed, make sure you install the following tools.
- Install Node.js by executing the below command on your Terminal:
brew install node
- Install the latest Yarn by executing the below command on your Terminal:
brew install yarn
git clone https://github.com/aptos-labs/aptos-core.git
cd
into thedeveloper-docs-site
directory in your clone.
cd aptos-core/developer-docs-site
- Run
yarn
.
yarn
This step will configure the Docusaurus static site generator.
- Start the Yarn server locally. This will also open the locally built docs in your default browser.
NOTE: This step will not generate static html files, but will render the docs dynamically.
yarn start
Execute the below steps if you want to generate static html documentation files. A build
directory will be created with the static html files and assets contained in it.
- Make sure you install Yarn dependencies.
yarn install
- Build static html files with Yarn.
$ yarn build
This command generates static html content and places it in the build
directory.
- Finally, use the below command to start the documentation server on your localhost.
npm run serve