|
| 1 | +# Contribution guide |
| 2 | + |
| 3 | +> This guide applies to **litestar.dev** — the marketing and community website |
| 4 | +> for the Litestar framework. To contribute to the framework itself, see |
| 5 | +> [`litestar-org/litestar/CONTRIBUTING.rst`](https://github.com/litestar-org/litestar/blob/main/CONTRIBUTING.rst). |
| 6 | +
|
| 7 | +## Setup |
| 8 | + |
| 9 | +1. Install [Node.js 24](https://nodejs.org/). |
| 10 | +2. Enable Corepack so the pinned `pnpm` version is used: `corepack enable`. |
| 11 | +3. Install dependencies: `pnpm install`. |
| 12 | + |
| 13 | +## Workflow |
| 14 | + |
| 15 | +1. Fork and clone the repo, then create a branch. |
| 16 | +2. `pnpm dev` — dev server at http://localhost:3000. |
| 17 | +3. `pnpm format && pnpm lint && pnpm test-all` before pushing (mirrors CI). |
| 18 | +4. Open a PR with a descriptive title referencing any related issue. |
| 19 | + |
| 20 | +## Tests |
| 21 | + |
| 22 | +| Project | Command | Purpose | |
| 23 | +| ------- | ----------------- | ------------------------------------------------------------- | |
| 24 | +| `unit` | `pnpm test-unit` | Pure-function tests (helpers, composables) | |
| 25 | +| `nuxt` | `pnpm test-nuxt` | Tests needing the Nuxt runtime | |
| 26 | +| `build` | `pnpm test-build` | Post-build smoke tests — run **after** `pnpm generate-github` | |
| 27 | + |
| 28 | +`pnpm test-all` runs `unit` + `nuxt`. |
| 29 | + |
| 30 | +## Content |
| 31 | + |
| 32 | +Drop a Markdown / YAML file in the right place — `nuxt generate` picks it up. |
| 33 | + |
| 34 | +| Add | Where | |
| 35 | +| ------------------ | ------------------------------------------------ | |
| 36 | +| Blog post | `content/blog/` | |
| 37 | +| Sponsor | `content/sponsors/` | |
| 38 | +| Starter / template | `content/starters/` or `content/templates/` | |
| 39 | +| Page copy | `content/*.yml` (schemas in `content.config.ts`) | |
| 40 | + |
| 41 | +## UI changes |
| 42 | + |
| 43 | +For anything visual, run `pnpm dev` and check dark mode + mobile width. Run |
| 44 | +`pnpm generate-github` to catch SSR / prerender / OG-image errors that only |
| 45 | +appear at build time. |
0 commit comments