# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Overview The **Video.js v10 documentation site** is an Astro-based static site generator with React islands for interactivity. The site serves documentation, blog posts, and interactive demos for the Video.js v10 library. Key architectural feature: **Multi-framework documentation** — the same content generates separate routes for different framework/style combinations (e.g., HTML + CSS, React + CSS), allowing framework-specific documentation from shared MDX sources. ## Commands From `site/` directory: | Command | Purpose | | -------------------- | ---------------------------------------------------- | | `pnpm dev` | Start dev server at `localhost:4321` | | `pnpm build` | Build production site to `./dist/` | | `pnpm api-docs` | Regenerate API reference JSON files | | `pnpm test` | Run all tests once | | `pnpm test:watch` | Run tests in watch mode | | `pnpm test:ui` | Run Vitest with web UI | | `pnpm test:coverage` | Generate coverage report | | `pnpm astro ...` | Run Astro CLI (e.g., `pnpm astro check`) | **From monorepo root:** - `pnpm dev:site` — Start site dev server - `pnpm build:site` — Build site **Running single test file:** ```bash pnpm test sidebar.test.ts ``` ## Astro MCP Server An Astro MCP server is likely available. **Always use Astro best practices and standard patterns** for maintainability. Consult the MCP for Astro-specific guidance when working with: - Astro components and layouts - Content collections - Routing patterns - Integrations - Build optimizations Following Astro conventions ensures consistency and makes the codebase easier to maintain. ## Tailwind v4 Configuration & Gotchas This project uses **Tailwind v4** with a **custom configuration**. Standard Tailwind tokens may not be available. ### CRITICAL: Always Check globals.css First **Before using any Tailwind utility class**, read `src/styles/globals.css` to verify: - Custom color tokens (e.g., `dark-110`, `light-100`, not standard Tailwind colors) - Custom text size tokens (e.g., `text-h1`, `text-h2`, not standard `text-4xl`, `text-5xl`) - Custom tracking values - Custom font weight values - Available custom variants - And possibly more ### Custom Variant: `intent:` (NOT `hover:` or `focus-visible:`) Use the **`intent:` variant** instead of `hover:` and `focus-visible:`: ```astro ``` The `intent:` variant is defined as: ```css @custom-variant intent (&:hover, &:focus-within); ``` ### Arbitrary Tailwind: Last Resort Only **Avoid arbitrary variants like `[&:hover]` or `text-[pink]`**. Use them only as a last resort. **Prefer inline styles** when Tailwind utilities don't exist: ```astro