llmoptimizer
Version:
Generate an llms.txt summary of your website/docs for LLMs (framework-agnostic with Vite/Next/Nuxt/Astro/Remix helpers).
72 lines (70 loc) • 1.8 kB
text/typescript
interface CustomLLMFile {
filename: string;
includePatterns: string[];
fullContent: boolean;
title?: string;
description?: string;
ignorePatterns?: string[];
orderPatterns?: string[];
includeUnmatchedLast?: boolean;
version?: string;
rootContent?: string;
}
interface DocsLLMsOptions {
generateLLMsTxt?: boolean;
generateLLMsFullTxt?: boolean;
generateMarkdownFiles?: boolean;
docsDir?: string;
includeBlog?: boolean;
blogDir?: string;
ignoreFiles?: string[];
includeOrder?: string[];
includeUnmatchedLast?: boolean;
pathTransformation?: {
ignorePaths?: string[];
addPaths?: string[];
};
excludeImports?: boolean;
removeDuplicateHeadings?: boolean;
title?: string;
description?: string;
version?: string;
rootContent?: string;
fullRootContent?: string;
customLLMFiles?: CustomLLMFile[];
llmsTxtFilename?: string;
llmsFullTxtFilename?: string;
statsOutFile?: string;
sections?: Array<{
name: string;
links: Array<{
title: string;
url: string;
notes?: string;
}>;
}>;
optionalLinks?: Array<{
title: string;
url: string;
notes?: string;
}>;
autoSections?: boolean;
emitCtx?: boolean;
ctxOutFile?: string;
ctxFullOutFile?: string;
}
type DocsPostBuildProps = {
outDir: string;
siteConfig: {
title?: string;
tagline?: string;
baseUrl?: string;
url?: string;
};
};
type DocsPlugin = {
name: string;
postBuild?: (props: DocsPostBuildProps) => void | Promise<void>;
};
declare function docsLLMs(options?: DocsLLMsOptions): DocsPlugin;
export { type CustomLLMFile, type DocsLLMsOptions, docsLLMs };