Skip to content

OffchainLabs/arbitrum-docs

Repository files navigation

Arbitrum Docs

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

File structure

This repository is organized as follows:

Documentation Content

  • docs/: Main documentation content directory
    • arbitrum-bridge/: Bridge-related documentation
    • build-decentralized-apps/: Developer guides and references
    • for-devs/: Developer tools and third-party integrations
    • for-users/: User-focused documentation
    • how-arbitrum-works/: Technical explanations of Arbitrum
    • intro/: Introduction and glossary
    • launch-arbitrum-chain/: Arbitrum chain deployment guides
    • learn-more/: Additional learning resources
    • node-running/: Node operation guides
    • partials/: Reusable content components and troubleshooting guides
    • run-arbitrum-node/: Node setup and configuration
    • sdk/: Auto-generated SDK documentation—Do not edit
    • stylus/: Stylus smart contract development
    • stylus-by-example/: Generated Stylus examples—Do not edit
    • welcome/: Getting started content

Application Code

  • src/: Docusaurus application source code
    • components/: React components for the documentation site
    • css/: Styling and themes
    • pages/: Custom pages and landing pages
    • resources/: Global variables and configuration
    • scripts/: Build scripts
    • theme/: Docusaurus theme customizations

Configuration & Dependencies

  • submodules/: Git submodule containing SDK source code
    • arbitrum-sdk/: Git submodule containing SDK source code
    • stylus-by-example/: Git submodule containing Stylus examples
  • scripts/: Repository maintenance, build scripts, and content generators
  • static/: Static assets (images, files, JSON data)

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

  1. Clone this repo
git clone git@github.com:OffchainLabs/arbitrum-docs.git
  1. Install node dependencies
yarn
  1. Update the submodules
git submodule update --init --recursive
  1. Build
yarn build
  1. Start the development server
yarn start

Dev Build

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

yarn start

Build

While in the root directory, this command will build the site:

yarn build

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

yarn serve

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:

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 root directory, run the following command:
npx tsx scripts/build-glossary.ts

This part will update the glossary.

  1. Commit your changes and open a PR.

Formatting

  1. Run yarn format from the root directory.

About

Arbitrum Docs! Content + Webapp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 138