Skip to content

Support llms.txt for kind section and doc-rooted sites - #2841

Merged
chalin merged 83 commits into
docsy:mainfrom
chalin:chalin-m24-llms-doc-rooted-fix-2026-1003
Oct 6, 2026
Merged

chalin merged 83 commits into
docsy:mainfrom
chalin:chalin-m24-llms-doc-rooted-fix-2026-1003

Conversation

@chalin

@chalin chalin commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator
  • Fixes llms.txt missing for doc-rooted sites #2834
  • Scope:
    • llms.txt renders from the page publishing a language's root: home, or the docs section on a doc-rooted site
    • the agent directive and the Markdown versions' llms.txt link follow that page, per language
    • the theme's LLMS template is all.llms.txt, so pages of kind section can render it (a site's own index.llms.txt still wins for home)
    • doc-rooted recipe: LLMS in the docs landing page's outputs
    • user guide: root page vs home page terms, language-correct llms.txt links via the Docsy-private _root-llms-txt-path shortcode, Shortcodes § Markdown output variants
  • Out of scope:
    • the reporter's mounted-content layout (same mechanism, not reproduced)
    • rel="describedby" discovery per llms.txt spec v2 (filed on the agent-support task)
  • Why resolve the root page, not reconfigure home: LLMS as the home's only output makes site.Home.RelPermalink the llms.txt URL (navbar brand on every page). Start at _partials/td/root-page.html.
  • All-sites output change: every Markdown version's llms.txt link is now per-language and omitted when the language publishes none; the directive sentence names llms.txt
  • Previews:

chalin added 3 commits October 3, 2026 10:45
…y on the root page

The LLMS index was a home-only output and the directive gated on the
home's output formats, so a doc-rooted site (home link-only, docs
section at the root) published no llms.txt while its Markdown
alternates linked one. The new root-page partial resolves the page
that publishes a site's root (home, or the top-level section rendered
in its place); the index layout becomes all.llms.txt so that page can
render it, and the directive and all.md link the index it publishes,
per language, or omit it. Our doc-rooted variant gives the docs
landing page the LLMS output via its config cascade.

Fixes docsy#2834
@chalin
chalin requested a review from a team October 3, 2026 15:27
@chalin chalin added this to the 0.18.0 milestone Oct 3, 2026
@netlify

netlify Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for docsydocs ready!

Name Link
🔨 Latest commit 7ad9f3c
🔍 Latest deploy log https://app.netlify.com/projects/docsydocs/deploys/6ac4dd24ee52c90008fe79c1
😎 Deploy Preview https://deploy-preview-2841--docsydocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

chalin added 13 commits October 3, 2026 11:30
…cale links in the doc-rooted fixture

Review round 1 (r1.1, r1.7, r1.8, r1.9).
…ion precedence, the docs index, and the reporter's shape

Review round 3 (r3.1-r3.3, r3.7-r3.13). Also: imperative recipe step, agent-support override note moved to the per-kind bullet with the layout linked, no shadowed $root in the locale loop, and the doc-rooted cascade's outputs list explained.
A blob/main link to a file this branch adds 404s in the link check until the merge (CI, round 4).
…-rooted-fix-2026-1003

# Conflicts:
#	docsy.dev/content/en/project/about/changelog.md
…us LLMS

Page outputs replace the kind's list, so the cascade restates it; the test
makes drift red and both configs point at it.
@chalin chalin changed the title Fix llms.txt for doc-rooted sites Easier llms.txt config for doc-rooted sites Oct 5, 2026
chalin added 8 commits October 5, 2026 09:54
…directive, section formats kept

Replaces the config-list equality test with the behavior it stood for, red when the cascade's outputs entry is missing or drifts; the config comments go, the test being the one home.
The recipe documents the docs section at the root and nothing else; a
name-agnostic scan supported shapes outside it.
@chalin chalin changed the title Easier llms.txt config for doc-rooted sites Support llms.txt for doc-rooted sites and other sections Oct 5, 2026
@chalin chalin changed the title Support llms.txt for doc-rooted sites and other sections Better support llms.txt for doc-rooted sites and other sections Oct 5, 2026
chalin added 2 commits October 5, 2026 15:58
Restores the entry's form; the marker was an owner call applied without
one.
`all.llms.txt` quoted the rendering page's `description`, so a
section-kind `llms.txt` (`outputs.section` with `LLMS`) carried that
section's summary under the site title. The summary is now the root
page's, falling back to the home page's; a section-kind file is
byte-identical to the root one. Fixture pins it. Changelog says
"any page of kind `section`" (r6 L2, three runs).
@chalin chalin changed the title Support llms.txt on doc-rooted sites, and from any section Support llms.txt for kind section and doc-rooted sites Oct 5, 2026
chalin added 3 commits October 5, 2026 16:12
A title-only page (no description, content, or child pages) on a site
without `llms.txt` ended without a final newline: the title line
trimmed its own, and the always-present link paragraph used to supply
the file's last one. The title line now keeps its newline and each
block drops one leading newline, so every element ends in exactly one.
Output is otherwise unchanged (cold cross-check: 849 shape comparisons,
0 differences beyond the intended ones). Fixture pins the title-only
shape.
chalin added 16 commits October 5, 2026 19:38
- Rephrases the description without its internal colon: the section listing already joins title and description with one; golden refreshed
- Child-page list: home lists children too, not only sections
- Points the Markdown-variant how-to at the Shortcodes page's new section
- Names the llms.txt summary's source in its enable section
- Links the root-page term and the outputs-replacement rule to their homes
- Changelog entry lands on the recipe's agent-support step
@chalin
chalin merged commit 47c889c into docsy:main Oct 6, 2026
14 checks passed
@chalin
chalin deleted the chalin-m24-llms-doc-rooted-fix-2026-1003 branch October 6, 2026 11:41
chalin added a commit that referenced this pull request Oct 6, 2026
- **Scope**: bump [link-cache](https://github.com/chalin/link-cache) from 0.4.1 to 0.6.0 (exact, from the npm registry) and adopt its one-rule model
  - Writes the lock under a one-run `NPM_CONFIG_MIN_RELEASE_AGE` override: own package, exercised on this branch as a commit-pinned git dependency before its 2026-10-02 release; nothing else resolved under the override
- **Out of scope** (deferred; the refresh workflow stays parked):
  - Re-enabling the refresh workflow (CLA blocks bot-authored PRs)
  - Pruning lapsed `expires` entries on every refresh run
- **Merge order** with cache-touching PRs written under 0.4.1: this PR lands after them, rebased and re-migrated (done for #2841)
  - Their `status` entries merge cleanly, but 0.6.0's check rewrites them to `result`, which fails CI's `is:clean`; `npm run fix:link-cache` normalizes them
- **Cache schema migration**: `link-cache.jsonc` is main's entries rewritten by one 0.6.0 run (`status` → `result`), plus the two package-doc links the notes now cite
- **Refresh lane**: header, dispatch input, prune log line, and PR-body text aligned with the 0.6.0 rule
- **Maintainer notes**: seed, prune, and field guidance updated to 0.6.0, linking the package's docs; also drops a "née refcache" aside and the consumer-site lead's run-in label on the same page
- **Validation**:
  - Migration preserves every entry's timestamp and is byte-stable on a second run
  - `check:links` over docsy.dev under 0.6.0 is diff-free (17,993 links, 0 errors)
  - `test:repo`, `test:lychee`, and `check` green
- **Preview**: [maintainer notes § Link checking](https://deploy-preview-2792--docsydocs.netlify.app/project/about/maintainer-notes/#link-checking-and-the-link-cache)
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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

llms.txt missing for doc-rooted sites

1 participant