export interface Doc { text: string; title: string; filename: string; path: string; pin?: 'top' | 'bottom'; /** sub-order within a pin bucket (lower first); section docs use this */ order?: number; /** parent doc name or slug — groups this doc into a nav section */ parent?: string; hidden?: boolean; headTitle?: string; description?: string; keywords?: string | string[]; image?: string; noindex?: boolean; bakes?: Array<[string, { dialect: string; js: string; }]>; author?: string; date?: string; } export interface ExtractDocsOptions { paths: string[]; ignore?: string[]; output?: string; } /** * Parse & strip a leading YAML frontmatter block (`---\n…\n---`). Every prose * toolchain (Jekyll/Hugo/Astro/Obsidian/Pandoc) uses it, so authors paste it in; * without this the `---` was rendered as content (and became the doc title). * * A minimal, dependency-free subset: `key: value` lines mapped onto doc metadata * (`title`, `order`→number, `author`, `date`, `draft: true`→hidden). Only strips * when the block actually parses as ≥1 key/value pair, so a genuine leading `---` * horizontal rule is left alone. Frontmatter wins over the JSON-comment metadata. */ export declare function parseFrontmatter(content: string): { data: Partial; body: string; }; export declare function extractDocs(options: ExtractDocsOptions): Doc[]; export declare function saveDocsJSON(docs: Doc[], outputPath: string): void;