---
name: update-releases
description: Use when updating the rafaelosmo.com site with new Beatport releases. Covers scraping, data verification, and deployment.
---

# Update Releases — rafaelosmo.com

## Overview

Scrape new tracks from Beatport, verify the scraped data is sane, regenerate GEO files, build, and deploy.

## Workflow

### 1. Scrape

```bash
node scripts/scrape-new-releases.js
```

Stops automatically at the first already-known track. If 0 tracks added, site is up to date — stop here.

The scraper automatically regenerates `public/llms.txt` and `public/llms-full.txt` when new tracks are added. Verify the output line confirms this:
```
Generated llms.txt and llms-full.txt (N releases, latest: Track Title)
```

### 2. Verify scraped data

Read each newly created `.md` file in `src/content/releases/`. Check:

- **Title format** — must be `Track Name (Mix Name)` with parentheses around the mix. e.g. `Your Dreams (Original Mix)`. Fix any missing brackets.
- **releaseDate** — must be `YYYY-MM-DD`, not empty, not obviously wrong (e.g. not in the future by years, not year 1970).
- **label** — must be a real label name, not empty.
- **artwork** — must be a full `https://` URL to a Beatport CDN image (`geo-media.beatport.com`). Check it resolves to 500x500.
- **collaborators** — must be a JSON array. `[]` is valid. Must not contain `Rafael Osmo`.
- **beatportUrl** — must point to `beatport.com/track/`.

Fix any issues found before proceeding.

### 3. Build

```bash
npm run build
```

Must complete with no errors. If build fails, fix the issue — do not proceed to deploy.

### 4. Commit and push

```bash
git add src/content/releases/ public/llms.txt public/llms-full.txt
git commit -m "feat: add N new releases from Beatport"
git push
```

Cloudflare Pages CI picks up the push and deploys automatically.

## GEO File Strategy

`llms.txt` and `llms-full.txt` serve AI crawlers (ChatGPT, Perplexity, etc.) and are fully script-generated — no LLM needed.

| File | Content | Update trigger |
|------|---------|----------------|
| `llms.txt` | Curated summary: trimmed bio (3 paragraphs), key releases, latest release, total count, links | Every scrape run (dynamic values only — narrative comes from `bio.md`) |
| `llms-full.txt` | Full bio, label info, complete discography, podcast list, all links | Every scrape run (fully regenerated) |

**Sources the script reads:**
- `src/content/pages/bio.md` → bio narrative + mission
- `src/content/pages/osmo-music.md` → label description
- `src/content/releases/*.md` → full discography sorted by date
- `src/content/podcast/*.md` → podcast episodes
- `src/components/Footer.astro` → social + booking links

**Manual update needed** (editorial, not scripted): Update `bio.md` or `osmo-music.md` when there's a milestone — Beatport ranking change, new album, major label news. Re-run `node scripts/generate-llms-txt.mjs` and commit.

## Common Issues

| Issue | Fix |
|-------|-----|
| Mix name missing parentheses | Edit title in `.md`: `Name Mix` → `Name (Mix)` |
| Artwork URL is 95x95 | Replace `95x95` → `500x500` in URL |
| `releaseDate` is today's date | Track had no publish date — check Beatport manually |
| 0 tracks added | Already up to date, or scraper selectors broke — check `__NEXT_DATA__` still exists on page |
| Build fails on new file | Check frontmatter YAML is valid (no unescaped quotes) |
| llms files not regenerated | Run `node scripts/generate-llms-txt.mjs` manually, then commit |
