This folder contains the Astro-rendered portion of the docs site. The API reference docs (anything with a URL containing /api/) are live on Astro. The rest of the Astro docs are in development.
Only the API docs have been migrated from Hugo to Astro.
| Doc type | Description | Status |
|---|---|---|
| API docs | The API reference under /api/. Generated from the OpenAPI spec bundle and SDK code examples, and prerendered at build time. |
Live. |
| Product docs | All other docs. .mdoc files in src/content/en/, rendered on demand (SSR). |
Proof of concept only. Only test fixtures in dd_e2e/. |
| Single-sourced docs | Docs located in other repositories or content-management systems. These are imported into our build. | Development not started. |
- Node.js >= 24 (see
.nvmrc;nvm usepicks it up) - Yarn 4 via Corepack (pinned by the
packageManagerfield). Enable it once withcorepack enable.
cd astro
yarn install
yarn playwright install chromium # browser tests only
yarn devThe dev server starts at http://localhost:4321. The first page you visit will take several seconds to load, but the site should behave normally after that.
You can view the component test pages at http://localhost:4321/dd_e2e/.
yarn dev is not an accurate representation of how JavaScript will run on the production site. If you need to preview interactive behavior:
- Run
yarn build:en(for English only) oryarn build(all languages) to create an accuratedistfolder. - Run
yarn preview. The component test pages will be at http://localhost:4322/dd_e2e/.
| Command | Description |
|---|---|
yarn build |
Production build to dist/ |
yarn preview |
Preview the production build locally |
yarn typecheck |
Type-check the project |
yarn format |
Format files with Prettier |
yarn test |
Type-check, then run unit and browser tests |
yarn test:headless |
Run unit tests (Vitest) |
yarn test:browser |
Run browser tests (Playwright) |
yarn test:headlessPlaywright starts a dev server automatically. If you already have yarn dev running on port 4321, it reuses it.
yarn test:browserUseful flags:
| Flag | Purpose |
|---|---|
Tabs/tests |
Run only the spec files whose path matches |
--ui |
Interactive UI mode: time-travel, re-run individual tests, inspect DOM |
--headed |
Watch tests run in a real Chromium window |
--debug |
Step through with the Playwright Inspector |
--update-snapshots |
Regenerate screenshot baselines after an intentional visual change |
After a failed run, open the HTML report for side-by-side diffs of expected vs. actual screenshots:
yarn playwright show-reportNOTE: This is not necessary for most development work. It's mainly useful for testing view transitions between the sites, to verify that navigation between them is seamless.
To test a blended version of the docs site that contains both Astro and Hugo pages, similar to how the sites are blended in production, you can run both sites behind the Caddy proxy at Caddyfile.
Before you start:
- Install Caddy.
- Install Hugo's dependencies with
cd hugo && make dependencies.
In three terminal tabs, from the repo root:
cd hugo && make start-proxied # Hugo on :1313, baseURL set to :1314cd astro && yarn dev:proxied # Astro on :4321, HMR through :1314caddy run # Proxy on :1314Then visit http://localhost:1314 to view the blended site.