From 5dcd99361f7682e1958e97c916f4cfe0175740de Mon Sep 17 00:00:00 2001 From: rzen Date: Mon, 4 May 2026 17:54:14 -0400 Subject: [PATCH] =?UTF-8?q?site:=20media=20+=20colocation=20=E2=80=94=20ch?= =?UTF-8?q?unk=201/4=20(code,=20configs,=20docs)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Code, configs, README, CHANGELOG, sources/log files, .claude. Subsequent chunks land the renamed media files. --- .claude/scheduled_tasks.lock | 1 + .claude/skills/daily-finds/SKILL.md | 13 ++ CHANGELOG.md | 4 + README.md | 63 ++++-- candidate-sources.md | 10 + daily-finds.log.md | 160 ++++++++++++++ sources.json | 119 +++++++++++ src/components/EntryList.astro | 1 + src/components/FindCard.astro | 101 +++++++-- src/components/FindsGrid.astro | 35 ---- src/components/Masonry.astro | 51 +++-- src/content.config.ts | 27 ++- src/layouts/BaseLayout.astro | 17 +- src/lib/find-hero.ts | 16 ++ src/lib/hero.ts | 36 ++-- src/pages/find/[...slug].astro | 76 ++++--- src/pages/find/index.astro | 89 +++++--- src/pages/finds/[...slug].astro | 34 +-- src/pages/finds/index.astro | 78 +++++-- src/pages/grid.astro | 2 +- src/pages/index.astro | 2 +- src/pages/reviews/[...slug].astro | 47 +++-- src/pages/search.astro | 313 ++++++++++++++++++++++++++++ src/pages/search.json.js | 56 +++++ src/pages/sources.astro | 30 ++- 25 files changed, 1138 insertions(+), 243 deletions(-) create mode 100644 .claude/scheduled_tasks.lock delete mode 100644 src/components/FindsGrid.astro create mode 100644 src/lib/find-hero.ts create mode 100644 src/pages/search.astro create mode 100644 src/pages/search.json.js diff --git a/.claude/scheduled_tasks.lock b/.claude/scheduled_tasks.lock new file mode 100644 index 0000000..6b2571d --- /dev/null +++ b/.claude/scheduled_tasks.lock @@ -0,0 +1 @@ +{"sessionId":"87abedef-67c7-43ce-984d-6586f084558f","pid":85715,"procStart":"Sun May 3 13:48:07 2026","acquiredAt":1777883275428} \ No newline at end of file diff --git a/.claude/skills/daily-finds/SKILL.md b/.claude/skills/daily-finds/SKILL.md index 819a082..4de7583 100644 --- a/.claude/skills/daily-finds/SKILL.md +++ b/.claude/skills/daily-finds/SKILL.md @@ -58,6 +58,19 @@ For every survivor, write one file at `src/content/find/.mdx`: If `link` for a Reddit-discovered item points at a v.redd.it / i.redd.it URL, fetch the post's selftext or comments to find the actual product URL before writing the file. +#### Supporting media + +For every find, try to retrieve a single representative image from the linked page so the find has visual support if it later graduates to a review (or gets surfaced on a tile). + +- **Where to look (in priority order):** `og:image` meta tag → JSON-LD `image` field → main product photo / hero image markup → first article image. +- **Where to save:** `src/assets/finds//hero.`. Preserve the original extension (`.jpg`, `.png`, `.webp`, `.gif`). One file per find — `hero` is the canonical name. +- **What to skip:** images with marketing/sales overlay text (Amazon-style "BEST PRESS / NO GRIT" tags), tiny thumbnails (<400px on the long edge), generic site logos, paywalled CDN URLs that 403 to curl. If the only available shots are marketing collages, skip rather than save a noisy image — a missing hero is fine, a bad one isn't. +- **For Mac/iOS apps:** prefer the App Store hero or developer-site screenshot. For physical products: prefer a clean studio shot or lifestyle photo without overlay copy. For travel destinations: prefer a Wikimedia Commons / Wikipedia image (free-to-use only). For text-only finds (quotes, dad jokes, essays): no media expected — skip. +- **Fetch strategy:** `curl -sL --max-time 25 -A "Mozilla/5.0 (...Safari...)" "" -o `. WebFetch is for HTML, not binaries. +- **Don't register heroes in `src/lib/hero.ts` at this stage.** That's a review-time decision (see `build-review`). The asset just needs to exist on disk so it's there if/when the find graduates. + +Log image-fetch failures (404, 403, marketing-only) as a one-line note in the capture-run section of `daily-finds.log.md` so we can revisit broken media-source patterns later — same way we log fetch issues for source pages. + ### 4. Nominate new sources Watch for new sources organically and via search. No cap on nominees per run — if a day's reading surfaces five plausible new sources, capture all five. diff --git a/CHANGELOG.md b/CHANGELOG.md index 76585c7..675364f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## May 2026 +- Colocate every collection's articles with their media: each entry is now a folder `/index.mdx` with sibling media files. Applied to `reviews/`, `find/` (104 articles + 89 heroes auto-resolved by `src/lib/find-hero.ts` via `import.meta.glob('../content/find/*/hero.{...}')`), `finds/`, and `posts/`. Slug derivation handled by a shared `stripIndex` helper on each glob loader; URLs unchanged across the entire site. MDX paths shortened from `../../assets/reviews//` to `./`. `src/assets/` removed entirely +- Media optimization pass: re-encode the 13 heaviest assets (h264 CRF 28, scale ≤1280px, audio stripped) and convert the two animated GIFs (cotypist, flux-markdown) to MP4 — `dist/` drops from 53 MB to 31 MB (~42% smaller); biggest single wins are `homerow/search.mp4` (6.7 MB → 1.6 MB), `antinote/links.mp4` (2.9 MB → 193 KB), `flux-markdown/demo.gif` (3.9 MB → 1.3 MB MP4). Originals preserved at `src/assets/reviews//source/` and never bundled +- Tile videos on `/` and `/grid/` switched from `preload="metadata"` to `preload="none"` so below-the-fold demos don't fetch on page load +- `src/lib/hero.ts` and the cotypist/flux-markdown review MDX updated to render the new MP4 heroes as inline autoplay-loop muted `