llms-txt is provided in the schema which imply it is available to book project, unfortunately that's currently not true.
The feature appears to be available because:
- The schema includes
llms-txt as a valid boolean option for both website and book configs.
- The book config imports website config functions.
- The changelog mentions it as a website feature.
|
llms-txt: |
|
boolean: |
|
description: | |
|
Generate llms.txt and .llms.md files for LLM-friendly content consumption. |
|
import { |
|
repoUrlIcon, |
|
websiteConfigActions, |
|
websiteConfigString, |
|
websiteProjectConfig, |
|
} from "../website/website-config.ts"; |
But without the formatExtras hook being inherited or implemented for books, the actual processing never occurs.
-
|
// Add llms.txt finalizer if enabled |
|
if (websiteConfigBoolean(kLlmsTxt, false, project.config)) { |
|
extras[kFilterParams] = extras[kFilterParams] || {}; |
|
extras[kFilterParams]["llms-txt"] = true; |
|
extras.html[kHtmlFinalizers]?.push( |
|
llmsHtmlFinalizer(source, project, format), |
|
); |
|
} |
-
|
// inherit a bunch of behavior from website projects |
|
preRender: bookPreRender, |
|
postRender: bookPostRender, |
|
formatLibDirs: websiteProjectType.formatLibDirs, |
|
metadataFields: () => [...websiteProjectType.metadataFields!(), "book"], |
|
resourceIgnoreFields: () => [ |
|
...websiteProjectType.resourceIgnoreFields!(), |
|
kBook, |
|
], |
There are also no book-specific tests for this feature; only website tests exist which is expected in some regards.
Originally posted by meierluk March 27, 2026
Description
Is the new feature about llms-txt also available for Quarto books (where the HTML output is basically of type website)?
Using the default template for books (see below), I cannot get it running.
project:
type: book
book:
title: "test-book"
author: "Norah Jones"
llms-txt: true
date: "27.3.2026"
chapters:
- index.qmd
- intro.qmd
- summary.qmd
- references.qmd
bibliography: references.bib
format:
html:
theme:
- cosmo
- brand
pdf:
documentclass: scrreprt
```</div>
llms-txtis provided in the schema which imply it is available to book project, unfortunately that's currently not true.The feature appears to be available because:
llms-txtas a valid boolean option for both website and book configs.quarto-cli/src/resources/schema/definitions.yml
Lines 731 to 734 in d577ef4
quarto-cli/src/project/types/book/book-config.ts
Lines 82 to 87 in d577ef4
But without the
formatExtrashook being inherited or implemented for books, the actual processing never occurs.quarto-cli/src/project/types/website/website.ts
Lines 360 to 367 in d577ef4
quarto-cli/src/project/types/book/book.ts
Lines 195 to 203 in d577ef4
There are also no book-specific tests for this feature; only website tests exist which is expected in some regards.
Discussed in https://github.com/orgs/quarto-dev/discussions/14275
Originally posted by meierluk March 27, 2026
Description
Is the new feature about llms-txt also available for Quarto books (where the HTML output is basically of type website)?
Using the default template for books (see below), I cannot get it running.