export interface FrontmatterResult { title?: string; description?: string; body: string; } export interface Section { heading: string; body: string; } export interface BuildIndexOptions { /** Path to the content/docs directory containing .mdx files. */ contentDir: string; /** Directory where docs-index.db and docs-index.txt are written. */ outputDir: string; /** * Base directory used to resolve paths. * Mirrors fumadocs' file.cwd (the app working directory). * Defaults to contentDir when not specified. */ fileCwd?: string; } /** * Splits YAML frontmatter from MDX content. * Returns title, optional description, and the body after the closing `---`. */ export declare function parseFrontmatter(content: string): FrontmatterResult; /** * Extracts a description from rendered body text. * Strips fenced code blocks and headings, then returns the first three sentences. */ export declare function extractDescription(body: string): string; /** * Resolves `path[#anchor]` directives in MDX * content, replacing each with a fenced code block. Paths are resolved * relative to the MDX file's directory unless the `cwd` attribute is present, * in which case fileCwd is used (mirrors fumadocs' file.cwd semantics). * Additional attributes (e.g. meta='…') are tolerated and ignored. */ export declare function resolveIncludes(content: string, mdxFilePath: string, fileCwd?: string): Promise; /** * Strips JSX component tags (uppercase-initial or namespaced) from content, * preserving text and fenced code blocks inside them. * Also strips MDX import/export declarations. */ export declare function stripJsx(content: string): string; /** * Splits a body string into sections on `## ` heading boundaries. * Content before the first heading is returned as a section with an empty heading. */ export declare function splitIntoSections(body: string): Section[]; export declare function buildIndex({ contentDir, outputDir, fileCwd, }: BuildIndexOptions): Promise; //# sourceMappingURL=build-index.d.ts.map