From a2bd8a3d4eba7d8cbce6ce330e47f20860f19267 Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Wed, 21 Jan 2026 16:31:52 -0600 Subject: [PATCH 1/4] docs: Add llms.txt output documentation Document the new llms-txt feature for Quarto websites, which generates LLM-friendly content (llms.txt index and .llms.md files). Co-Authored-By: Claude Opus 4.5 --- _quarto.yml | 1 + docs/websites/website-llms.qmd | 41 ++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 docs/websites/website-llms.qmd diff --git a/_quarto.yml b/_quarto.yml index 30af73472..2334454ac 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -314,6 +314,7 @@ website: - docs/websites/website-drafts.qmd - docs/websites/website-search.qmd - docs/websites/website-tools.qmd + - docs/websites/website-llms.qmd - docs/websites/website-about.qmd - section: "Listing Pages" href: docs/websites/website-listings.qmd diff --git a/docs/websites/website-llms.qmd b/docs/websites/website-llms.qmd new file mode 100644 index 000000000..4aafb461b --- /dev/null +++ b/docs/websites/website-llms.qmd @@ -0,0 +1,41 @@ +--- +title: llms.txt Output +--- + +## Overview + +Quarto can generate [llms.txt](https://llmstxt.org/) format output for your website, making your content more accessible to large language models and AI-powered tools. When enabled, Quarto creates an `llms.txt` index file and `.llms.md` markdown files for each page. + +## Enabling `llms.txt` + +To enable `llms.txt` output, add `llms-txt: true` to your website configuration: + +```{.yaml filename="_quarto.yml"} +website: + title: "My Documentation" + llms-txt: true +``` + +## Generated Output + +When you render your site, Quarto generates two types of files: + +### `llms.txt` Index + +An `llms.txt` file is created at the root of your site. This index lists all pages with their titles, using your site's title and description from the website configuration. + +### Markdown Files + +For each HTML page, a corresponding `.llms.md` file is created alongside it (e.g., `guide.html` gets `guide.llms.md`). These contain clean markdown versions of your content. + +## Content Conversion + +HTML content is converted to markdown using Pandoc. Navigation elements, sidebars, footers, and scripts are removed. Tables, code blocks, callouts, and images are converted to standard markdown formats. Internal links are automatically rewritten from `.html` to `.llms.md` extensions. + +## Draft Handling + +Draft pages are automatically excluded from both `.llms.md` generation and the `llms.txt` index. The 404 page is also excluded from the index. + +## Build Behavior + +On full builds, all `.llms.md` files and the `llms.txt` index are regenerated. On incremental builds, individual `.llms.md` files are updated but `llms.txt` is preserved, matching the behavior of sitemap generation. From 83d760e49256d646d3513cc5daaf752181de0a5f Mon Sep 17 00:00:00 2001 From: Charlotte Wickham Date: Fri, 20 Feb 2026 11:47:25 -0800 Subject: [PATCH 2/4] Updates and tweaks --- docs/websites/website-llms.qmd | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/docs/websites/website-llms.qmd b/docs/websites/website-llms.qmd index 4aafb461b..9589642b3 100644 --- a/docs/websites/website-llms.qmd +++ b/docs/websites/website-llms.qmd @@ -1,5 +1,5 @@ --- -title: llms.txt Output +title: Output for LLMs --- ## Overview @@ -18,11 +18,11 @@ website: ## Generated Output -When you render your site, Quarto generates two types of files: +When you render your site, Quarto creates files in the output directory (typically `_site/`). ### `llms.txt` Index -An `llms.txt` file is created at the root of your site. This index lists all pages with their titles, using your site's title and description from the website configuration. +An `llms.txt` file is created at the root of your site. This index lists all pages with their titles, using your site's title and description from the website configuration in `_quarto.yml`. ### Markdown Files @@ -30,7 +30,27 @@ For each HTML page, a corresponding `.llms.md` file is created alongside it (e.g ## Content Conversion -HTML content is converted to markdown using Pandoc. Navigation elements, sidebars, footers, and scripts are removed. Tables, code blocks, callouts, and images are converted to standard markdown formats. Internal links are automatically rewritten from `.html` to `.llms.md` extensions. +HTML content is converted to markdown using Pandoc. Navigation elements, sidebars, breadcrumbs, footers, and scripts are removed. Tables, code blocks, callouts, tabsets, and images are converted to standard markdown formats. Internal links are automatically rewritten from `.html` to `.llms.md` extensions, including links with anchors. + +## Conditional Content + +To include content only in the `.llms.md` output, use the `llms-txt` format with [conditional content](/docs/authoring/conditional.qmd) classes. + +For example, to include content only in `document.llms.md`: + +```{.markdown filename="document.qmd"} +::: {.content-visible when-format="llms-txt"} +This content appears only in the `.llms.md` output. +::: +``` + +To exclude content from `document.llms.md`: + +```{.markdown filename="document.qmd"} +::: {.content-hidden when-format="llms-txt"} +This content appears in HTML but not in `.llms.md` output. +::: +``` ## Draft Handling From 0fd5eacc99383a5fb11dc797cabae53984687d2b Mon Sep 17 00:00:00 2001 From: Charlotte Wickham Date: Fri, 20 Feb 2026 11:49:31 -0800 Subject: [PATCH 3/4] Add highlight --- docs/prerelease/1.9/_highlights.qmd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/prerelease/1.9/_highlights.qmd b/docs/prerelease/1.9/_highlights.qmd index f10942e67..ad2d3b1f5 100644 --- a/docs/prerelease/1.9/_highlights.qmd +++ b/docs/prerelease/1.9/_highlights.qmd @@ -1,5 +1,7 @@ Quarto 1.9 includes the following new features: +- [Output for LLMs](/docs/websites/website-llms.qmd): Generate `llms.txt` and `.llms.md` files websites, making your content more accessible to large language models and AI-powered tools. + - [Privacy-first cookie consent](/docs/websites/website-tools.qmd#cookie-consent): The default for cookie consent has changed to `type: express`, providing opt-in consent that blocks cookies until users explicitly agree. This privacy-conscious default is designed with modern privacy regulations in mind. - [`aria-label` for videos](/docs/authoring/videos.qmd#accessibility-label): Improve accessibility of embedded videos by providing custom descriptive labels for screen readers instead of the default "Video Player" label. From c8cb13480e8b75cce9cc19ffdf12f3ef9779058d Mon Sep 17 00:00:00 2001 From: Charlotte Wickham Date: Mon, 23 Feb 2026 11:10:50 -0800 Subject: [PATCH 4/4] Typo --- docs/prerelease/1.9/_highlights.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/prerelease/1.9/_highlights.qmd b/docs/prerelease/1.9/_highlights.qmd index 8b78c61aa..8e2e6c327 100644 --- a/docs/prerelease/1.9/_highlights.qmd +++ b/docs/prerelease/1.9/_highlights.qmd @@ -2,7 +2,7 @@ Quarto 1.9 includes the following new features: - [Posit Connect Cloud Publishing](/docs/publishing/posit-connect-cloud.qmd): Publish documents and websites to Posit Connect Cloud using `quarto publish posit-connect-cloud`. -- [Output for LLMs](/docs/websites/website-llms.qmd): Generate `llms.txt` and `.llms.md` files websites, making your content more accessible to large language models and AI-powered tools. +- [Output for LLMs](/docs/websites/website-llms.qmd): Generate `llms.txt` and `.llms.md` files for websites, making your content more accessible to large language models and AI-powered tools. - [Privacy-first cookie consent](/docs/websites/website-tools.qmd#cookie-consent): The default for cookie consent has changed to `type: express`, providing opt-in consent that blocks cookies until users explicitly agree. This privacy-conscious default is designed with modern privacy regulations in mind.