Merge pull request #9 from Salastil/claude/source-management-content-1w2yno

Fix Local category page never showing Local-tagged sources
This commit is contained in:
Salastil
2026-07-21 21:02:10 -04:00
committed by GitHub
+4 -2
View File
@@ -3,10 +3,12 @@ import { getFeed } from '$lib/api';
const PAGE_SIZE = 15;
// Every category page (including "Local") filters by its category name — sources are
// assigned categories directly via checkboxes in the admin Sources tab, so a source
// tagged "Local" shows up here the same way one tagged "Tech" shows up on /category/tech.
export const load: PageLoad = async ({ params, fetch }) => {
const name = params.name;
const isLocal = name.toLowerCase() === 'local';
const filters = isLocal ? { geo: 'philadelphia' } : { category: name };
const filters = { category: name };
const initial = await getFeed({ ...filters, limit: PAGE_SIZE }, fetch);
return { initial, filters, name, pageSize: PAGE_SIZE };
};