# Video.js site guide This file contains site-specific gotchas. Read `site/README.md`, `site/package.json`, the relevant implementation, and its tests for the current architecture and commands. ## Sources of truth - Commands and versions: `package.json` - Astro/Vite/Markdown configuration: `astro.config.mjs` - Content schemas: `src/content.config.ts` - Framework/style support and type guards: `src/types/docs.ts` - Sidebar and route availability: `src/docs.config.ts` - Design tokens and variants: `src/styles/globals.css` - Guide authoring: `src/content/docs/how-to/write-guides.mdx` - API builder contract: `scripts/api-docs-builder/src/tests/e2e.test.ts` - Deployment workflow: root `.github/workflows/` If this guide conflicts with those files, use the executable source and update this guide. ## Commands From the repository root: ```bash pnpm dev:site pnpm build:site pnpm -F site test [path-or-pattern] pnpm -F site api-docs pnpm -F site astro check ``` ## Styling and components - Inspect `src/styles/globals.css` before choosing Tailwind classes. Prefer existing theme tokens and semantic utilities. - Use the custom `intent:` variant for pointer/focus intent where existing site code does; do not replace it mechanically with `hover:`. - Use arbitrary values only when no shared token fits and the exception is intentional. - Use `clsx` in React and `class:list` in Astro for conditional classes. - React islands are independent roots. Use Nanostores for cross-island state instead of React context. - React Compiler is enabled; do not add memoization without a measured or documented need. ## Content - Docs and blog content use `.mdx`. Changelog entries under `src/content/changelog/` are generated `.md` files and are the exception. - Blog filenames are `YYYY-MM-DD-slug.mdx`; `src/utils/globWithParser.ts` removes the date from the route slug. - Use `FrameworkCase` and `StyleCase` for conditional guide content and keep `src/docs.config.ts` in sync. - Use `