Skip to content

Add LLMS output and llms.txt support, enables it over docsy.dev - #2605

Merged
chalin merged 1 commit into
docsy:mainfrom
chalin:chalin-m24-llms-txt-2026-0408
Apr 8, 2026
Merged

chalin merged 1 commit into
docsy:mainfrom
chalin:chalin-m24-llms-txt-2026-0408

Conversation

@chalin

@chalin chalin commented Apr 8, 2026 •

Copy link
Copy Markdown
Collaborator
  • Contributes to Add support for agent-friendly content generation, phase 1 #2596
  • Adds LLMS output format and generated llms.txt site index.
  • Adds layouts/index.llms.txt and updates layouts/all.md to include a link to the LLMS index.
  • Configures outputFormats in hugo.yaml and enable LLMS output on the site config.
  • Adds agent-docs afdocs config and test goldens for llms.txt, update golden test harness to support a skip flag, and add the llms.txt golden.
  • Adds afdocs as a devDependency and npm scripts to run checks, update various npm script paths, and update spelling/cspell ignores.
  • Includes a temporary workaround for Hugo scrollspy attribute escaping in docs/blog base templates.

Preview


AFDocs score: 98% (over selected metrics)
$ npm run _check:afdocs -- https://deploy-preview-2605--docsydocs.netlify.app/
...
Agent-Friendly Docs Scorecard
==============================

https://deploy-preview-2605--docsydocs.netlify.app/ · 4/8/2026, 6:09:59 PM

  Overall Score: 98 / 100 (A)

  Category Scores:
    Content Discoverability               97 / 100 (A)
    Markdown Availability                 92 / 100 (A)
    Page Size and Truncation Risk        100 / 100 (A+)
    Content Structure                    100 / 100 (A+)
    URL Stability and Redirects          100 / 100 (A+)
    Observability and Content Health     100 / 100 (A+)
    Authentication and Access            100 / 100 (A+)

  Check Results:

    Content Discoverability
      PASS  llms-txt-exists                llms.txt found at 1 location(s)
      PASS  llms-txt-valid                 llms.txt follows the proposed structure (H1, blockquote, heading-delimited link sections)
      PASS  llms-txt-size                  llms.txt is 1,537 characters (under 50,000 threshold)
      WARN  llms-txt-links-resolve         12/13 same-origin links resolve (92%); 1 broken
            Fix: 1 of 13 links in your llms.txt return errors. Audit and fix or remove broken URLs to prevent agents from hitting dead ends.
      PASS  llms-txt-links-markdown        13/13 same-origin links point to markdown content (100%)
      WARN  llms-txt-directive             llms.txt directive found in 12 of 13 pages (1 missing)
            Fix: An llms.txt directive was found on some pages but is missing from others, or is buried deep in the page. Ensure the directive appears near the top of every documentation page.

    Markdown Availability
      PASS  markdown-url-support           12/13 pages support .md URLs (92%)
      PASS  content-negotiation            12/13 pages support content negotiation (92%)

    Page Size and Truncation Risk
      PASS  rendering-strategy             All 13 pages contain server-rendered content
      PASS  page-size-markdown             All 12 pages under 50K chars (median 3K, max 9K)
      PASS  page-size-html                 All 13 pages convert under 50K chars (median 2K, 7% boilerplate)

    Content Structure
      PASS  tabbed-content-serialization   No tabbed content detected across 13 pages
      PASS  section-header-quality         No tabbed content found; header quality check not applicable
      PASS  markdown-code-fence-validity   All 1 code fences properly closed across 13 pages

    URL Stability and Redirects
      PASS  http-status-codes              All 13 pages return proper error codes for bad URLs
      PASS  redirect-behavior              No redirects detected across 13 pages

    Observability and Content Health
      PASS  cache-header-hygiene           All 14 endpoints have appropriate cache headers

    Authentication and Access
      PASS  auth-gate-detection            All 13 pages are publicly accessible
      SKIP  auth-alternative-access        All docs pages are publicly accessible; no alternative access paths needed

Introduce a new LLMS output format and generated llms.txt site index. Adds layouts/index.llms.txt and updates layouts/all.md to include a link to the LLMS index. Configure outputFormats in hugo.yaml and enable LLMS output on the site config. Add agent-docs afdocs config and test goldens for llms.txt, update golden test harness to support a skip flag, and add the llms.txt golden. Add afdocs as a devDependency and npm scripts to run checks, update various npm script paths, and update spelling/cspell ignores. Also include a temporary workaround for Hugo scrollspy attribute escaping in docs/blog base templates.
@chalin chalin added enhancement New feature or request AI labels Apr 8, 2026
@chalin
chalin merged commit 5593f3e into docsy:main Apr 8, 2026
11 checks passed
@chalin
chalin deleted the chalin-m24-llms-txt-2026-0408 branch April 8, 2026 22:13
@chalin chalin added this to the 0.15.0 milestone Apr 8, 2026
chalin added a commit to chalin/docsy that referenced this pull request Oct 7, 2026
The template listed a project's `AGENTS.md` page in the site index when a
content page by that path existed (docsy#2605). Only docsy.dev has one, through
a mount of the repo file, and the llms.txt proposal has no such notion:
AGENTS.md guides agents working in a repository, llms.txt guides agents
reading a site. Removed from the template; the llms.txt golden follows,
and the docs golden picks up the agent-support description. Changelog and
release-post expected diffs note the dropped line.

Release 0.18.0 artifacts: no changelog or post mention of the removed AGENTS.md llms.txt line
chalin added a commit that referenced this pull request Oct 7, 2026
- Contributes to #2775
- **Scope**: the 0.18.0 artifacts refreshed for the merges after #2840 (`0fdf3a6f` to `64411422`), merged `main` only; version guidance follows the changelog's official support policy
  - **Release post**
    - Linux Foundation stated as Docsy's home, with the module-path migration and canonical-path cleanup
    - `llms.txt` section (#2841, #2851)
    - Hugo section routing to the companion
    - Default script-dependency versions, with a reconcile action for existing overrides
    - Override notes as a `<details>` under the Upgrade step
  - **Hugo 0.165.0-0.166.0 upgrade guide**, new: the companion carrying the Hugo mechanics (the 0.16.0 model), one action block per change
  - **Changelog**, **user guide**, **maintainer notes**: aligned with the posts (one home per fact; the guide owns the evergreen rules the posts point to)
  - **Agent-support page**: reorganized around parallel Markdown-output and `llms.txt` sections, in Hugo's glossary terms (site, project, site root)
  - **Theme** (widening): `all.llms.txt` no longer lists an `AGENTS.md` page, a docsy.dev experiment from #2605 that leaked into the theme; `llms.txt` golden updated
  - **Version params**: both posts freeze every version param they render; the toolchain-versions test guards the frozen script pins and the companion's title bound
  - Post dates set; `draft: true` kept
- **Out of scope**
  - Tag-time fields: draft flip, version stamp, `UNRELEASED` removal, the release link
  - CSP guidance home and the print-gap line: owner decisions pending
  - The dropped `AGENTS.md` `llms.txt` line: no changelog or post mention (experimental, docsy.dev-only; owner call)
  - Relative links in Markdown output versions: pre-existing, #2858
- **Coverage** (ledger, ten rows)
  - #2850: changelog, post (Other notable changes)
  - #2852: changelog, post, companion guide
  - #2851: user guide, changelog, post
  - #2853: post table
  - #2792: changelog, post
  - #2841: user guide, changelog, post
  - #2848: changelog, post (the LF fact)
  - #2829: post version table (the Dart Sass pin)
  - #2849, #2846: internal; release notes only
  - #2854: guide only
- **Preview(s)**
  - https://deploy-preview-2855--docsydocs.netlify.app/blog/2026/0.18.0/
  - https://deploy-preview-2855--docsydocs.netlify.app/blog/2026/hugo-0.165.0+/
  - https://deploy-preview-2855--docsydocs.netlify.app/project/about/changelog/#next
  - https://deploy-preview-2855--docsydocs.netlify.app/docs/update/
  - https://deploy-preview-2855--docsydocs.netlify.app/docs/content/agent-support/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant