This repository is a Docusaurus 3 documentation site for NVIDIA CCluster. Agents should optimize for safe documentation edits, correct CSS overrides, and working builds.
- Framework: Docusaurus 3 with
@docusaurus/preset-classic - Config: docusaurus.config.js (site settings, navbar, footer)
- Sidebar: sidebars.js (page order, icons, grouping)
- Custom CSS: src/css/docs.css (all Infima/layout overrides)
- Icons: src/theme/DocSidebarItem/Link/icons.js (lucide-react icon map)
- Content: MDX files in docs/ with
routeBasePath: '/' - Static assets: static/ (images, CNAME, favicon)
- Deployment: GitHub Pages via .github/workflows/deploy.yml
npm start # dev server with hot-reload
docker compose up # containerized dev server
npm run build # production build → build/
npx docusaurus serve # serve production build locally- docs/home/ — getting started pages (introduction, quickstart)
- docs/deployments/ — LLM serving, inference, compute
- docs/clients/ — SDK/client usage docs
- docs/resources/ — operational and supporting guides
- docs/examples/ — example pages and nested example groups
- src/theme/ — swizzled Docusaurus components
- src/css/ — custom CSS overrides
body
└── .navbar (padding zeroed; .navbar__inner handles gutters)
└── .navbar__inner (max-width: 1440px, margin: auto, padding: 0 2rem)
└── .main-wrapper (width: 100%, max-width: 1440px, margin: auto, padding: 0 2rem)
└── [docSidebarContainer] (width: 220px, margin-right: 2rem)
└── .row
└── .col [docItemCol] (main content)
└── .col.col--3 (TOC column)
:root { --doc-sidebar-width: 252px; }This syncs Docusaurus's internal layout calculation with actual sidebar width (220px + 32px margin). Without it, dead space appears beside the content.
| Rule | Reason |
|---|---|
.main-wrapper { width: 100% } |
Parent is flex with shrink:0; without this, content sets wrapper width → horizontal overflow |
.navbar { padding-left: 0; padding-right: 0 } |
Zeroes Infima default so .navbar__inner padding aligns logo with sidebar |
[class*='docItemCol'] { min-width: 0 } |
Flex items default to min-width: auto, preventing shrink below content size |
.markdown { overflow-wrap: anywhere } |
Prevents long inline code from causing horizontal scroll |
.table-of-contents:has(> li:only-child) { visibility: hidden } |
Hides TOC when only one heading (mirrors old Mintlify behavior), preserves column space |
- Ensure
.main-wrapperhaswidth: 100% - Ensure
[class*='docItemCol']hasmin-width: 0 - Ensure
.markdownhasoverflow-wrap: anywhere - For specific overflowing elements:
max-width: 100%; overflow-x: auto
Update both values together:
[class*='docSidebarContainer'] { width: Xpx; min-width: Xpx; }
:root { --doc-sidebar-width: calc(Xpx + 32px); }sidebars.jsassigns icon names viacustomProps: { icon: 'icon-name' }src/theme/DocSidebarItem/Link/index.js— swizzled component rendering sidebar linkssrc/theme/DocSidebarItem/Link/icons.js— maps icon names → lucide-react components
To add a new icon: import from lucide-react, add to ICON_MAP with key matching customProps.icon.
- Frontmatter:
title,description, optionalsidebar_label - Images: wrap in
<Frame>component for bordered screenshots - Image paths:
/images/filename.png(stored instatic/images/) - For tall images, add inline style:
maxHeight: '360px', width: 'auto', margin: '0 auto' - Hero card image height: controlled by
.ccluster-docs-hero-card__img { aspect-ratio: 5/2 }in CSS
- Production: GitHub Pages, triggered on push to
main - Custom domain:
docs.centml.ai(configured viastatic/CNAME) - TLS: automatic via GitHub (Let's Encrypt)
- Workflow:
.github/workflows/deploy.ymlrunsnpm ci→npm run build→ deploy-pages
onBrokenMarkdownLinksdeprecation warning (harmless, Docusaurus v4 migration path)- Broken links to
/resources/cliand/resources/sdk(pages not yet created)
sidebars.jsis the source of truth for page order and visibility- A file existing on disk does not mean it is in the nav
- Prefer local image references
/images/file.png - Preserve existing MDX style and frontmatter keys
- Keep docs changes scoped; this repo is docs-only, no application code
- Test with
npm run buildbefore pushing — catches broken links and build errors
- Read this file and docusaurus.config.js
- Run
npm run buildto verify nothing is broken - Inspect the target page's MDX and any component it uses
- Confirm whether the page is in
sidebars.jsor just exists on disk - Check
src/css/docs.cssbefore adding new style rules — the override may already exist