This is the source code for the Noir documentation site at noir-lang.org.
This website is built using Docusaurus 3, a modern static website generator.
Note: The docs folder is now a standalone project and no longer part of the main Noir yarn workspace. This change was made to resolve conflicts with Netlify deployments.
Interested in contributing to the docs?
Check out the contributing guide here.
- Node.js (tested and working with v21.6.1)
- Yarn (tested and working with v4.5.2)
This project requires recent versions of Rust and Cargo to be installed. Any build errors should indicate dependencies that need installing, and at what version.
Navigate to the docs directory and install dependencies:
cd docs
yarn installFrom the docs directory:
- Fetch and generate the list of recent stable documentation versions to build:
yarn version::stables- Start a development server serving docs preview:
yarn devThis command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
From the docs directory:
- Fetch and generate the list of recent stable documentation versions to build:
yarn version::stables- Build the docs:
yarn buildThis command generates static content into the build directory and can be served using any static contents hosting service.
- Verify build by serving a preview locally:
yarn serveThe site will be deployed at noir-lang.org/docs/. Test production configuration locally:
yarn production:serveAccess at: http://localhost:3000/docs/
When a new Noir version is released, a versioned snapshot of the docs needs to be created. This is
normally done automatically by the release workflow (.github/workflows/release.yml), but can also
be done manually.
From the docs directory, run:
yarn cut_version <VERSION>For example: yarn cut_version v1.0.0-beta.20
This script does three things:
- Removes the new version from
versions.json(sinceyarn version::stableswill have added it from the GitHub release, but the versioned docs snapshot doesn't exist yet). - Builds the docs (running preprocessing to resolve
#include_codedirectives and generate the Nargo CLI reference). - Runs
yarn docusaurus docs:version <VERSION>to snapshot the current docs intoversioned_docs/version-<VERSION>/and create a matching sidebar inversioned_sidebars/.
After this, the new version will appear in the version dropdown on the site.
Important: The
#include_codedirectives must be resolved before the snapshot is taken. Theversioned_docs/directory should never contain raw#include_codedirectives — CI will reject PRs that introduce them.
All commands should be run from the docs directory:
| Command | Description |
|---|---|
yarn install |
Install dependencies |
yarn dev |
Start development server |
yarn build |
Build production site |
yarn serve |
Serve built site locally |
yarn version::stables |
Update stable versions list |
yarn cut_version <VERSION> |
Cut a new versioned docs snapshot |
yarn clean |
Clean build artifacts |