| 1 | # htmx Documentation Website |
| 2 | |
| 3 | The htmx documentation site, built with [Astro](https://astro.build/) and [Tailwind CSS](https://tailwindcss.com/). |
| 4 | |
| 5 | ## Development |
| 6 | |
| 7 | From the repo root: |
| 8 | |
| 9 | ```bash |
| 10 | npm run site # or: npm run www |
| 11 | ``` |
| 12 | |
| 13 | Or from this directory: |
| 14 | |
| 15 | ```bash |
| 16 | bun install |
| 17 | bun run dev |
| 18 | ``` |
| 19 | |
| 20 | The dev server starts at `http://localhost:4321`. The `predev` script syncs `../dist/` into `public/js/` automatically. |
| 21 | |
| 22 | ## Building |
| 23 | |
| 24 | ```bash |
| 25 | bun run build |
| 26 | bun run preview # preview the production build |
| 27 | ``` |
| 28 | |
| 29 | ## Testing |
| 30 | |
| 31 | End-to-end tests use [Playwright](https://playwright.dev/): |
| 32 | |
| 33 | ```bash |
| 34 | bun run test # headless |
| 35 | bun run test:headed # with browser window |
| 36 | bun run test:ui # interactive UI mode |
| 37 | ``` |
| 38 | |
| 39 | ## Structure |
| 40 | |
| 41 | ``` |
| 42 | src/ |
| 43 | content/ # Markdown content (docs, reference, patterns) |
| 44 | components/ # Astro components |
| 45 | layouts/ # Page layouts |
| 46 | pages/ # Route pages |
| 47 | lib/ # Utilities and helpers |
| 48 | assets/ # Images and static assets |
| 49 | public/ |
| 50 | js/ # htmx build artifacts (synced from ../dist/) |
| 51 | ``` |