This document captures the moving parts behind the hybrid News and Publications experience so future updates stay safe, accessible, and SEO-friendly.
lib/sources/)lib/content/normalize.ts)FeedItem objects with stable IDs (lib/content/hash.ts).lib/content/rank.ts)lib/content/cache.ts)server/index.ts)/api/news, /api/pubs) orchestrate fan-out, dedupe items, enrich with citations/why-text, and stream events.public/components/TerminalFeed.js)lib/sources/*.ts. Keep network requests lightweight and respect source rate limits.lib/sources/index.ts to add the new fan-out promise.lib/content/normalize.ts.("CEQA" OR "California Environmental Quality Act" OR "NEPA" OR "National Environmental Policy Act") AND ("artificial intelligence" OR "AI" OR "machine learning")) unless a page explicitly overrides it.npm run build:ts followed by npm test to ensure the build succeeds./news or /publications in live mode.AUTHORITY (inside lib/content/rank.ts).type parameter in SSE requests to boost specific feeds in custom clients._data/newsTags.js and _data/publicationTags.js. Each entry needs a slug, title, description, and query.news/tag.11ty.js, publications/tag.11ty.js) call fetchTopItems during the Eleventy build. The helper composes the same enrichment pipeline used by SSE responses.npm run build:ts before starting Eleventy so build/lib/server/fetchTop.js exists.components/TerminalFeed.ts. Compile with npm run build:components.window.ceqaAnalytics?.emit. If an analytics provider is later integrated, attach an adapter to window.ceqaAnalytics.public/assets/scripts/library.js. It relies on the same citation helpers (public/assets/scripts/citations.js) and why-text helper (public/assets/scripts/why.js).localStorage under the ceqa_library key; clearing or exporting operates entirely client-side.npm run testnpm run build/news → confirm the live stream loads and the Refresh button pulls a new batch./publications → confirm the live stream loads and the Refresh button pulls a new batch./news/tag/... and /publications/tag/..../library.Following this playbook helps ensure the hybrid experience stays reliable, crawlable, and easy to maintain.