This repo is the source for docs.arbitrum.io, built with Docusaurus. Content is the product. Trust these instructions; only search the repo when something here is incomplete or demonstrably wrong.
- Type: Docusaurus 3 documentation site (TypeScript + React + MDX).
- Runtime: Node
22.x(pinned inpackage.jsonenginesand every workflow). Yarn classic (yarn.lockis committed). - Size: ~900MB with deps; docs tree is thousands of
.md/.mdxfiles.sidebars.jsis ~61KB andvercel.jsonis ~87KB — edit them by search, not by reading end-to-end. - Output: A static site deployed from
master; every PR gets a Vercel preview deployment.
Always run commands from the repo root. The order below is the one CI uses.
- Install (required before anything else). CI uses frozen-lockfile; match it.
yarn install --frozen-lockfile
- Dev server. Clears the Docusaurus cache first. First boot is slow (30–90s).
yarn start
- Production build. This is what GitHub Actions
build.ymlruns on every PR. Broken links, bad MDX, or unknown sidebar paths fail here.yarn build
- Format (Prettier). The
main.ymlworkflow runsyarn format:check. Always runyarn formatbefore committing — the pre-commit hook will reformat staged files but only if you run Prettier on them first; CI will fail on unformatted files.yarn format # writes + checks yarn format:check # check only (mirrors CI)
- Type check.
yarn typecheck
- Markdown lint. Excludes
docs/sdk/**(auto-generated).yarn lint:markdown
- Deleted-markdown check.
test.ymlruns this on every PR to catch links pointing at removed pages.yarn tsx scripts/check-markdown.ts --ci
yarn startandyarn buildboth runyarn && yarn clearfirst. If you change code and rebuild, don't also runyarn clearmanually — you'll just double the work.- The Husky pre-commit hook (
.husky/pre-commit) runs Prettier, markdownlint, andyarn typecheckon staged files. It skips in CI (HUSKY=0,CI=true, orGITHUB_ACTIONS=truedisables it). Do not bypass with--no-verify; fix the underlying issue. docs/sdk/**is auto-generated — do not hand-edit, and it is excluded from markdownlint.- If
.gitmoduleschanges, the pre-commit hook runsgit submodule update --init --recursive. Submodules live insubmodules/.
docs/— all published content (see below).sidebars.js— sidebar structure. Any new page must be added here or it is orphaned.vercel.json— redirects. Always add a redirect when you move or rename a page.docusaurus.config.js— site config, plugins, i18n locales (en,ja,zh).CONTRIBUTE.md— the style bible. Read before writing prose..prettierrc.js,.markdownlint.json— formatting config.scripts/— repo tooling (glossary build, orphan finder, doc manifest, markdown checks).
| Path | Contents |
|---|---|
get-started/ |
Onboarding and introductions |
intro/ |
Introduction and glossary entry point |
arbitrum-bridge/ |
Bridge user docs |
build-decentralized-apps/ |
App developer guides and references |
stylus/, stylus-by-example/ |
Stylus (Rust/WASM) smart contracts |
how-arbitrum-works/ |
Protocol concepts (Nitro, ArbOS, BoLD, AnyTrust) |
run-arbitrum-node/, node-running/ |
Node operator guides |
launch-arbitrum-chain/ |
Orbit / Arbitrum chain deployment |
for-devs/ |
Dev tools and third-party integrations |
for-users/ |
End-user documentation |
partials/ |
Reusable MDX fragments (imported with import ... from '../partials/_foo.mdx') |
partials/glossary/ |
Glossary terms — see glossary frontmatter below |
sdk/ |
Auto-generated, do not edit |
notices/ |
Deprecation and migration notices |
Standard page frontmatter (required for new docs):
---
title: 'Sentence-case page title'
description: One-line SEO description.
content_type: how-to # or concept, quickstart, faq, reference, troubleshooting, gentle-introduction
target_audience: Who this page is written for.
sidebar_position: 1 # optional
---Glossary term frontmatter (files under docs/partials/glossary/_<slug>.mdx):
---
title: State Transition Function
key: state-transition-function
titleforSort: State Transition Function
---After adding or editing glossary terms, run:
yarn build-glossaryThis repo is reviewed like product documentation. Reviewers repeatedly flag the same issues — front-load these to avoid rework:
- Sentence-case for all titles, headings, sidebar labels, and section titles. Not Title Case.
- Descriptive link text. Link to the destination page's title verbatim; never "click here" or "this".
- Address the reader as "you". Short sentences, plain translation-friendly English, contractions OK.
- Write for a specific reader persona: node runner, chain owner, app developer, Stylus developer, or third-party integrator. Pick one per page and say so in the intro.
- Admonitions use the
:::form, not GitHub's> [!NOTE]:Types::::note Content here. :::
note,info,tip,caution,warning,danger. - Separate procedural from conceptual. Keep how-tos tight; link to concept pages for background.
- One canonical term per page. Use
parent chain/child chain, notL1/L2, unless the context explicitly requires the older terms.Orbit chainandArbitrum chainare not interchangeable. - Distinguish actors correctly: sequencer vs full node, chain owner vs node runner, validator vs batch poster.
All four must be updated or the build / CI will fail:
sidebars.js— update the path entry.vercel.json— add a redirect from the old URL.- Internal links and anchors across
docs/**— update any that pointed at the old slug. - Translated copies under
i18n/ja/andi18n/zh/— mirror the move.
Run yarn build locally to catch broken links before pushing.
| Workflow | File | Command | What it catches |
|---|---|---|---|
| Build | .github/workflows/build.yml |
yarn build |
Broken MDX, unknown sidebar paths, bad imports |
| Format | .github/workflows/main.yml |
yarn format:check |
Any unformatted .md / .mdx / .ts / .tsx / .scss / .json |
| Tests | .github/workflows/test.yml |
yarn tsx scripts/check-markdown.ts --ci |
Links to deleted markdown files |
Additional scheduled / external workflows (check-undocumented-issues.yml, daily-release-check.yml, sbom-export.yaml, update-external-content.yml) do not gate PRs.
Reviewers reject PRs that:
- Include unrelated changes (dependency bumps mixed with content edits,
yarn.lockchurn from a strayyarn install, local caches, editor junk). - Move or rename pages without redirects and sidebar updates.
- Introduce new terms that appear nowhere else in the docs.
- Describe future releases or governance votes in present tense after they have shipped.
- Use sequencer-only settings in a full-node guide (or vice versa).
The PR template at .github/pull_request_template.md requires a document-type selection and the CONTRIBUTE.md checklist. For new content PRs, answer these in the description: audience, problem, discovery, document type.
Only search or explore when:
- A command here fails and the error message is not obviously about your own change.
- You need a detail not covered above (specific component, specific script).
- You suspect this file is stale (check
git log -1 .github/copilot-instructions.md).
Otherwise, follow the steps above in order. They match what CI runs.