Skip to content

Deploy the docs

The docs live in docs/ as an independent Astro Starlight application. They build into a static site with a client-side React island for the live example. There is no server adapter or required runtime service.

Use Node.js 22.12 or later. From the repository root:

Terminal window
npm ci --prefix docs
npm run docs:dev

Open http://localhost:4321. To validate and build:

Terminal window
npm run docs:build
npm run docs:preview

docs:build runs Astro’s type checks before building. Its output is docs/dist/, including the Pagefind search index. Search is available in the production build and preview.

  1. Import nord-forge/the-grid into Vercel.
  2. Keep Root Directory at the repository root, rather than docs.
  3. Choose the Astro framework preset if it is not selected automatically.
  4. Use Node.js 24.x, or a supported version at least 22.12.
  5. Deploy. The tracked vercel.json configures the install, build, and output paths.
Setting Value
Install command npm ci --prefix docs
Build command npm run build --prefix docs
Output directory docs/dist
Root directory Repository root

The root directory matters: examples import the current library source from src/. Keeping the repository root available lets Vercel build the docs without needing a separately published npm package or installing the library’s development tooling.

The production docs are at the-grid.nickbevers.dev. Astro uses this URL for canonical links and the sitemap by default.

When moving to a different domain, set the Vercel environment variable DOCS_SITE_URL to that full URL and connect the domain to the project. Rebuild after changing it.

No environment variables are required for the docs or live example. The example data is generated in the browser.

Write Markdown or MDX in docs/src/content/docs/. Navigation is configured in docs/astro.config.mjs; styling lives in docs/src/styles/site.css.

The site uses the supplied SVG wordmark with light and dark variants and a matching favicon. The logo’s wordmark uses the font stack defined in the SVG.

See Astro’s Vercel deployment guide and Starlight’s configuration reference for platform and framework options.