---
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 data, regen GEO files, build, deploy.

## Workflow

### 1. Scrape

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

Stops at first known track. 0 added = up to date, stop.

Scraper auto-regens `public/llms.txt` and `public/llms-full.txt` on new tracks. Verify output:
```
Generated llms.txt and llms-full.txt (N releases, latest: Track Title)
```

### 2. Verify scraped data

Read each new `.md` in `src/content/releases/`. Check:

- **Title format** — `Track Name (Mix Name)`, parens around mix. e.g. `Your Dreams (Original Mix)`. Fix missing brackets.
- **releaseDate** — `YYYY-MM-DD`, not empty, not future years, not 1970.
- **label** — real label name, not empty.
- **artwork** — full `https://` URL to Beatport CDN (`geo-media.beatport.com`). Must resolve 500x500.
- **collaborators** — JSON array. `[]` valid. No `Rafael Osmo`.
- **beatportUrl** — points to `beatport.com/track/`.

Fix issues before proceeding.

### 3. Build

```bash
npm run build
```

Must pass. Fix errors before 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 deploys on push.

## GEO File Strategy

`llms.txt` + `llms-full.txt` serve AI crawlers (ChatGPT, Perplexity). Fully script-generated, no LLM.

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

**Script sources:**
- `src/content/pages/bio.md` → bio + mission
- `src/content/pages/osmo-music.md` → label description
- `src/content/releases/*.md` → discography by date
- `src/content/podcast/*.md` → podcast episodes
- `src/components/Footer.astro` → social + booking links

**Manual update** (editorial): Edit `bio.md` or `osmo-music.md` on milestone — Beatport rank change, new album, label news. Re-run `node scripts/generate-llms-txt.mjs`, commit.

## Common Issues

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