From 0296b3993c36e959a634347fd71a4e714a5dd045 Mon Sep 17 00:00:00 2001 From: Dawid Nowak Date: Wed, 28 Oct 2026 15:58:40 +0100 Subject: [PATCH] Give llms.txt a header and leave out pages without content The generated llms.txt had a one-sentence header, entries titled "Untitled" for tip fragments, and links to pages whose Markdown holds only a Vue component. The header now says what QuestPDF is, how to install it, where to start, and links llms-full.txt; license and policy pages are linked as HTML. --- docs/.vitepress/config.ts | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 49eb26e..f02a298 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -4,6 +4,24 @@ import imageSizePlugin from "./markdownit-imagesize-plugin"; const isProd = process.env.NODE_ENV === 'production'; +const llmsTxtHeader = `# QuestPDF + +> C# library for generating PDF documents with a fluent, code-first API. +> Layout engine with automatic paging: tables, headers and footers, page numbers, images, SVG, and barcodes through ZXing.Net. + +## About + +- Install: \`dotnet add package QuestPDF\` +- License: [Pricing](https://www.questpdf.com/pricing.html), [License Selection Guide](https://www.questpdf.com/license/guide.html), binding terms in [LICENSE.md](https://github.com/QuestPDF/QuestPDF/blob/main/LICENSE.md) +- What QuestPDF can do: [Features Overview](https://www.questpdf.com/features-overview.html) +- Policies: [Security](https://www.questpdf.com/security-policy.html), [Privacy](https://www.questpdf.com/privacy-policy.html), [Terms of Service](https://www.questpdf.com/terms-of-service.html) +- Start here: [Quick start](/quick-start.md), then [In-Depth Invoice Tutorial](/invoice-tutorial.md) +- Everything in one file: [llms-full.txt](/llms-full.txt) + +## Table of Contents + +{toc}`; + function getPlausibleScript() : HeadConfig[] { if (!isProd) return []; @@ -23,7 +41,16 @@ export default defineConfig({ cleanUrls: false, vite: { - plugins: [llmstxt()] + plugins: [llmstxt({ + customLLMsTxtTemplate: llmsTxtHeader, + ignoreFilesPerOutput: { + llmsTxt: [ + 'api-reference/tip-*.md', + 'license.md', 'license/community.md', 'license/guide.md', 'license/professional-enterprise.md', 'license/purchase-success.md', + 'pricing.md', 'features-overview.md', 'contact.md', 'privacy-policy.md', 'security-policy.md', 'terms-of-service.md', + ], + }, + })] }, head: [