Skip to main content

llms-txt Would Overwrite an Existing File

project
website.llms-txt: true wants to write a file that already exists in the output directory and was not generated by llms-txt.

Q-5-28 — llms-txt Would Overwrite an Existing File

website.llms-txt: true wants to write a file that already exists in the output directory and was not generated by llms-txt. Overwriting it silently would destroy that content.

What this means

When llms-txt is enabled, Quarto writes three kinds of files into the output directory alongside your rendered pages:

  • a markdown companion next to every page (about.html gets about.md),
  • llms.txt, an organized index of those companions, and
  • llms-full.txt, all companions concatenated.

These paths share a namespace with your own files. If a copied resource — or any file already sitting in the output directory — occupies one of them, Quarto refuses to overwrite it and fails the render instead:

# _quarto.yml
project:
  type: website
  resources:
    - about.md        # copied to _site/about.md …

website:
  llms-txt: true      # … which is also about.html's companion path

Quarto tracks the files it generated in previous renders (in .quarto/llms-manifest.json), so re-renders update its own output freely; only files it cannot prove are its own are protected.

How to fix it

Pick whichever matches your intent:

  • Rename or move the conflicting file so the companion path is free.
  • Drop it from project.resources (or delete it from the output directory, if it was left behind by something else).
  • Disable the feature with website.llms-txt: false if you’d rather ship your own hand-written files at these paths.

Why an error and not a warning

The same policy as alias redirects (Q-5-24): a build that silently replaces one file’s content with another’s ships wrong content with no signal. Failing the render costs a rename; the silent overwrite costs a page.