This website is built using Docusaurus, a modern static website generator.
cd website-new npm install npm run start
This starts a local development server at http://localhost:3000 with hot reload.
/docs/ (at repository root) is the source of truth for ALL documentation.
/docs/ ← SOURCE OF TRUTH (edit here!) ├── index.md # Main QuMat overview ├── qumat/ # Qumat documentation │ ├── core/ # Qumat Core docs │ ├── qdp/ # QDP docs │ ├── quantum-computing-primer/ │ └── papers/ ├── qdp/ # QDP package internals ├── community/ # Community pages ├── about/ # About pages ├── download/ # Download pages ├── api.md, basic-gates.md... # API reference docs └── adr/ # Architecture decisions /website-new/docs/ ← BUILD ARTIFACT (auto-synced, don't edit!) ├── .gitignore # Only tracked file └── [everything synced from /docs/]
The sync script copies /docs/ to website-new/docs/ at build time:
npm run sync # Manual sync npm run start # Auto-syncs before starting dev server npm run build # Auto-syncs before building
Important:
/docs/, NOT in website-new/docs/website-new/docs/ is gitignored (except .gitignore itself)website-new/docs/ will be overwritten on next syncCreate a markdown file in /docs/:
--- title: My New Page --- # My New Page Content here...
Edit website-new/sidebars.ts:
const sidebars: SidebarsConfig = { docsSidebar: [ // ... existing items { type: 'category', label: 'My Section', items: [ 'my-new-page', // matches /docs/my-new-page.md 'folder/another-page', // matches /docs/folder/another-page.md ], }, ], };
npm run sync # Sync changes from /docs/ npm run start # Start dev server to preview
Use kebab-case for all documentation files:
✅ getting-started.md ✅ quantum-gates.md ✅ basic-gates.md ❌ getting_started.md ❌ GettingStarted.md
This creates clean URLs like /docs/getting-started.
Every doc should have frontmatter:
--- title: Page Title # Required: displayed in browser tab sidebar_label: Short Label # Optional: shorter name for sidebar sidebar_position: 1 # Optional: order in auto-generated sidebars ---
/docs/assets/ (for code docs) or website-new/static/img/ (for website) # Relative path (in /docs/)  # Absolute path (in static/)
KaTeX is enabled for math rendering:
Inline math: $E = mc^2$ Block math: $$ \ket{\psi} = \alpha\ket{0} + \beta\ket{1} $$
Syntax highlighting is available for: Python, Java, Scala, Rust, Bash, and more.
```python from qumat import QumatCircuit circuit = QumatCircuit(2) circuit.h(0) ```
/docs/)When releasing, snapshot the current docs:
npm run docusaurus docs:version 0.5
This creates:
versioned_docs/version-0.5/ - Frozen snapshotversions.jsonEdit docusaurus.config.ts:
docs: { lastVersion: 'current', versions: { current: { label: '0.6-dev', path: '', }, '0.5': { label: '0.5', path: '0.5', }, }, }
Blog posts live in website-new/blog/:
--- title: My Blog Post date: 2026-01-22 tags: [news, release] --- Content here... <!--truncate--> More content after the fold...
npm run build # Creates production build in /build npm run serve # Serve production build locally
GitHub Actions automatically deploys to asf-site branch when changes are pushed to main.
Triggers:
website-new/**docs/**qdp/docs/**The build will warn about broken links. Fix them in the source files (/docs/).
npm run sync to re-sync from /docs/sidebars.ts for correct document IDs.md extensionDocument IDs are derived from file paths:
/docs/getting-started.md → getting-started/docs/qumat/core/api.md → qumat/core/api001-migration.md → migrationwebsite-new/ ├── docusaurus.config.ts # Main configuration ├── sidebars.ts # Sidebar navigation ├── package.json ├── scripts/ │ └── sync-docs.js # Documentation sync script ├── docs/ # Synced docs + website-only content ├── versioned_docs/ # Version snapshots ├── blog/ # Blog posts ├── src/ │ ├── components/ # React components │ ├── css/custom.css # Theme customization │ └── pages/ # Custom pages (homepage) └── static/ # Static assets (images, etc.)
| Command | Description |
|---|---|
npm run start | Start dev server with hot reload |
npm run build | Build production site |
npm run serve | Serve production build locally |
npm run sync | Sync docs from /docs/ |
npm run docusaurus docs:version X.Y | Create version snapshot |
npm run clear | Clear Docusaurus cache |