# plekstender-website

Plekstender's website: what it is, every feature documented, the services it uses, and its API reference. A static site ([Astro](https://astro.build) with [Starlight](https://starlight.astro.build)) on Cloudflare Pages.

## Working on it

```bash
npm install
npm run dev      # http://localhost:4321
npm run build    # into dist/
```

- **Pages** are Markdown in `src/content/docs/`; the sidebar is in `astro.config.mjs`.
- **Screenshots** are in `src/assets/screens/`. They're all from made-up music (mocked data, drawn covers), never a real library: taken with the app's screenshot script (see the plekstender repo).
- **The API reference** (`/api-reference/`) is Scalar, drawn from `public/api-reference/openapi.json`. The deploy fetches the latest release's copy (each release has it attached), so it follows the app by itself.
- **Kept up to date**: every plekstender pull request that changes a feature comes with a pull request here, for its docs.

## Deploying

`.github/workflows/deploy.yml` builds it and puts it on Cloudflare Pages (project `plekstender`): `main` as the site, each pull request as a preview, and once a day for a new release's API reference. It needs the repository secrets `CLOUDFLARE_API_TOKEN` (a token with *Cloudflare Pages: Edit*) and `CLOUDFLARE_ACCOUNT_ID`. The Pages project is made on the first deploy, at `plekstender.pages.dev`; a custom domain can be added in Cloudflare's dashboard (then change `site` in `astro.config.mjs`).
