- Installation
- Fork and clone the Aptos repo
- Build and serve the docs locally
- Build static html files
- Debug/Format files
Visit the
README.md
underapps/docusaurus
for more steps on building / developing in this repo
We now use lychee-broken-link-checker to check for broken links in the GitHub Markdown. We use a corresponding link checker for pages on Aptos.dev.
With results visible at: https://github.com//aptos-labs/developer-docs/actions/workflows/links.yml
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 pnpm by executing the below command on your Terminal:
curl -fsSL https://get.pnpm.io/install.sh | sh -
git clone https://github.com/aptos-labs/developer-docs.git
- Run
pnpm
.
pnpm install
This step will configure the Docusaurus static site generator.
- Start the 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.
pnpm start
-
See your changes staged at: http://localhost:3000/
-
Create a pull request with your changes as described in our Contributing README.
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 dependencies.
pnpm install
- Build static html files with pnpm.
pnpm 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.
pnpm run serve
Fix formatting issues by running:
pnpm fmt
The src/contributors.json file (which powers the list of Authors at the bottom of doc pages) needs to be manually generated.
In order to generate the contributor map you must authenticate with GitHub. The best way to do that is using GitHub CLI ([installation guide(https://github.com/cli/cli#installation)]). Once you have the GitHub CLI installed, you can run the following command to authenticate:
gh auth login --scopes read:user,user:email
Once that is done, you can generate the map with this command:
pnpm contributors