Skip to content

llms.txt: HTML tags in website.title are not stripped #14590

Description

@cderv

Bug description

When website.title contains HTML tags (e.g. <small>), those tags appear verbatim in the generated llms.txt file. For example, a title like:

website:
  title: "My Site <small>Version 1.0</small>"

produces an llms.txt opening line of:

# My Site <small>Version 1.0</small>

The HTML markup should be stripped so llms.txt contains plain text.

Steps to reproduce

# _quarto.yml
project:
  type: website

website:
  llms-txt: true
  title: "My Site <small>Version 1.0</small>"

format:
  html:
    theme: cosmo

Render and inspect _site/llms.txt — the opening heading contains the raw HTML tag.

Relevant code

The site title is written directly without any HTML stripping:

lines.push(`# ${siteTitle}`);

Notes

Reported by the Connect team, where a documentation site uses <small> in the title alongside an env shortcode. The shortcode resolution part is already handled by #14237. This is the remaining piece: HTML markup in website.title is not stripped before being written to llms.txt.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingllms-txt

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions