import type { ChangelogRelease } from '../core/changelog.js'; /** Site details the feed needs beyond the releases themselves. */ export type FeedSite = { /** Canonical origin, e.g. `https://docs.example.com`. */ url: string; /** Feed title, usually the site title. */ title: string; /** One-line feed description. */ description?: string; /** * Path the changelog lives at. Default: `/changelog`. Joined to the origin with * exactly one slash between, so the leading slash is optional. */ path?: string; }; /** * Build an Atom feed body from parsed changelog releases. Framework-agnostic: * wire it into a SvelteKit `src/routes/changelog.xml/+server.ts` over the * generated `svelte-docsmith/changelog` index. * * ```ts * import { releases } from 'svelte-docsmith/changelog'; * import { generateFeed } from 'svelte-docsmith'; * * export const prerender = true; * export function GET() { * const body = generateFeed(releases, { * url: 'https://my-docs.dev', * title: 'My Library' * }); * return new Response(body, { headers: { 'content-type': 'application/atom+xml' } }); * } * ``` * * Atom rather than RSS because it requires an unambiguous per-entry id and * update timestamp, which is exactly what a version and its release date give. */ export declare function generateFeed(releases: ChangelogRelease[], site: FeedSite): string;