Skip to content

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

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

Add LLMS output and llms.txt support, enables it over docsy.dev#2605
chalin merged 1 commit intogoogle:mainfrom
chalin:chalin-m24-llms-txt-2026-0408

Conversation

@chalin
Copy link
Copy Markdown
Collaborator

@chalin chalin commented Apr 8, 2026

  • Contributes to Add support for agent-friendly content generation #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 google:main Apr 8, 2026
12 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
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