/** * Pure, fs-free RSS 2.0 feed builder for the blog - the feed counterpart of `buildSitemap`. * No `next` or `react` import: the feed is returned as a complete XML string for the consumer * to serve from a route handler (`new Response(xml, { headers: { "Content-Type": * "application/rss+xml; charset=utf-8" } })`), which also works in a Next static export * (`export const dynamic = "force-static"`). * * One feed per locale, mounted by convention at `/rss.xml` (e.g. * `/blog/rss.xml`, or `/en/rss.xml` under `prefixDefaultLocale`) - the same `localePath` the * links, canonicals and sitemap use, so the feed's URLs can never drift from the rendered site. On * a domain-per-locale site (`site.localeOrigins`) each feed and its URLs sit on its locale's origin. */ import type { PostMeta, SiteConfig } from "./types.js"; /** * The root-relative path a locale's feed is mounted at by convention: * `/rss.xml` (e.g. `/blog/rss.xml`, `/en/rss.xml`). * * @param site - the site configuration. * @param lang - the locale code. * @returns the root-relative feed path. */ export declare function rssFeedPath(site: SiteConfig, lang: string): string; /** * Builds one locale's complete RSS 2.0 document from its posts' metadata. * * The channel is the locale's blog index (title from `site.indexName` falling back to `brandName`, * description from `site.description` with the same fallback the overview metadata uses - both * resolved for THIS locale, so a Dutch feed does not announce itself in English); each item carries the * post's absolute URL as both `link` and permalink `guid`, its description, its categories, and * a `pubDate` when the post declares a date. The channel's `lastBuildDate` is the newest post * date, so an unchanged blog produces a byte-identical feed - readers and crawlers see a new * build only when a post actually changed. * * @param posts - the locale's posts' metadata (typically `Blog.getAllPosts(lang)`), newest first. * @param site - the site configuration; `siteUrl` (or the locale's `localeOrigins` entry) makes * every URL absolute. * @param lang - the locale code the feed is for. Defaults to the site's default locale. * @returns the XML document, ready to serve as `application/rss+xml`. */ export declare function buildRssFeed(posts: PostMeta[], site: SiteConfig, lang?: string): string;