From e8552794fef758b3c8c34ded969f8ce376405d31 Mon Sep 17 00:00:00 2001 From: Ryan Salazar Date: Wed, 20 May 2026 05:55:43 +0000 Subject: [PATCH] categories: update SECTION_CATEGORIES map to match the AI-derived taxonomy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After the AI re-categorization, bb.wp_imported_posts.category holds the new taxonomy: 'Industry News', 'Show Coverage', 'Cameras & Capture', 'Streaming & IP', 'Audio', 'Live Production', 'Cloud & Workflow', 'Post Production', 'Broadcast Production', 'AI & Automation'. The map that drives /gear, /technology, /show-coverage, /news page queries still referenced the OLD taxonomy ('Gear', 'Reviews', 'Technology', 'Streaming') — so /gear and /technology effectively returned nothing-matched and fell through to the catch-all section, causing the duplicate-posts-across-sections behaviour the user reported. /gear → Cameras & Capture, Audio /technology → Streaming & IP, Cloud & Workflow, AI & Automation, Live Production, Post Production, Broadcast Production /show-coverage→ Show Coverage /news → Industry News Co-Authored-By: Claude Opus 4.7 (1M context) --- src/lib/articles/legacy-source.ts | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/lib/articles/legacy-source.ts b/src/lib/articles/legacy-source.ts index fc6ff21..0b832a2 100644 --- a/src/lib/articles/legacy-source.ts +++ b/src/lib/articles/legacy-source.ts @@ -74,11 +74,28 @@ const SECTION_TAGS: Record = { news: [], }; +// Map between site sections and the AI-derived categories now stored in +// bb.wp_imported_posts.category. Each section query uses these to pull +// only the relevant slice of the archive — otherwise /gear and +// /technology would both return everything that doesn't match +// show-coverage (the old fallback). +// Production-tech categories live here: +// "Streaming & IP", "Cloud & Workflow", "AI & Automation", +// "Live Production", "Post Production", "Broadcast Production" +// Hardware/gear: +// "Cameras & Capture", "Audio" const SECTION_CATEGORIES: Record = { - gear: ["Gear", "Reviews"], - technology: ["Technology", "Streaming", "Live Production"], + gear: ["Cameras & Capture", "Audio"], + technology: [ + "Streaming & IP", + "Cloud & Workflow", + "AI & Automation", + "Live Production", + "Post Production", + "Broadcast Production", + ], "show-coverage": ["Show Coverage"], - news: [], + news: ["Industry News"], }; function authorSlug(name: string | null): string {