Static site generators rely on query helpers to map markdown or MDX files into navigable page routes. When building sites using tools like Astro content collections, developers often write custom filter predicates to build topic hubs, sidebar navigation, or tag lists. However, a filter predicate intended for a specific UI component can accidentally remove valid files from the primary site-wide catalog, making those pages completely invisible to readers and sitemaps. Identifying which predicate removed an otherwise eligible article requires comparing raw source files against global collections and downstream route outputs.
Quick solution:
import { getCollection } from 'astro:content' ;
// Fetch the global unfiltered set first const allArticles = await getCollection ( 'articles' , ( { data } ) => { return import . meta . env . PROD ? data . draft !== true : true ; } ) ;
// Derive topic subsets safely from the global set const technicalArticles = allArticles . filter ( ( item ) => item . data .…