/** * Runtime helpers usable inside `.astro` pages and islands. * * These give custom pages and components access to Blume project data * (config, navigation, page collections) without reaching into generated * runtime internals. The surface grows with the customization milestone. */ import type { BlumeData, BlumeRoute } from "../core/data.ts"; export type { BlumeData, BlumeDataConfig, BlumeFeed, BlumeRoute, } from "../core/data.ts"; export type { Heading, NavNode, Navigation, NavTab, PageRecord, } from "../core/types.ts"; /** Query for {@link getBlumeCollection}. */ export interface BlumeCollectionQuery { /** Astro collection to read from. Defaults to `"docs"`. */ collection?: string; /** Include drafts, hidden pages, and translation fallbacks. Default `false`. */ includeHidden?: boolean; /** Restrict to a locale code (matches `route.locale`). */ locale?: string; /** Restrict to routes whose path starts with this prefix, e.g. `"/blog"`. */ prefix?: string; } /** * Select content routes from the `blume:data` snapshot — for building custom * index pages, listings, or feeds without touching generated internals. Pass the * imported `data` and an optional query; results are sorted by path. * * ```astro * --- * import data from "blume:data"; * import { getBlumeCollection } from "blume/runtime"; * const posts = getBlumeCollection(data, { prefix: "/blog" }); * --- *