Skip to content

OffchainLabs/arbitrum-docs

Repository files navigation

Arbitrum Docs

Arbitrum Docs, built with docusaurus; docs are live at https://developer.arbitrum.io/.

Arbitrum SDK auto-genned docs are included as submodule.

Contribution

For most of the docs content, you can contribute by simply reviewing our docs contribution guidelines and opening a PR!

The following are the only exceptions:

Initial set up

git clone [email protected]:OffchainLabs/arbitrum-docs.git

cd arbitrum-docs/

git submodule update --init --recursive

cd website/

Install node dependencies

yarn

Dev Build

To start a build server to serve the docs site locally, run this command from the /website directory:

yarn start

This command will both generate the arbitrum-sdk docs from the submodule and start the local server. In order to update the arbitrum-sdk docs, you will need to run this command again every time you update files in arbitrum-sdk directory.

Build

While in the /website directory, this command will build the site:

yarn build

To test the build locally, you can use the following command:

yarn serve

Update submodules

arbitrum-sdk repo:

git submodule update --remote arbitrum-sdk

Update glossary

You can add any terms to the glossary by following these steps:

Let's assume you need to add the term "State Transition Function" to the glossary.

  1. Create an .mdx file as follows:

arbitrum-docs/partials/glossary/_state-transition-function.mdx

  1. Ensure that the content of your file follows the following format:
---
title: State Transition Function
key: state-transition-function
titleforSort: State Transition Function
---

The STF (State Transition Function) defines how new blocks are produced from input messages (i.e., transactions) in an Arbitrum chain.
  1. While in the /website directory, run the following command:
npx tsx src/scripts/build-glossary.ts

This part will update the glossary.

  1. Commit your changes and open a PR.