Link llms.txt and llms-full.txt only when they are generated - #351
Merged
has2k1 merged 4 commits intoSep 16, 2026
Merged
Conversation
…ev#350) Docs-only sites (no api-reference in _quarto.yml) advertised both files in the AI / Agents margin and in SKILL.md while neither generator wrote anything, so every such site shipped two dead links and a build log that said the files were created. Adds GreatDocs._llms_txt_available(), which checks the same condition the two generators use (api-reference with a package and at least one section), and uses it in the three places that assumed the files exist: the metadata margin, the SKILL.md resources list, and the build-log step, which now reports "no API reference" instead of "Created". The margin's AI / Agents heading is also omitted when it would have no items. Tests: the existing margin test now sets up an api-reference; a new test covers the docs-only case; a third checks the predicate against each early-return the generators have. The sidebar-order test gains the api-reference it implicitly relied on. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Malformed configuration now reports the files as unavailable instead of raising AttributeError. The check also requires an importable package and at least one API section, matching the generator requirements.
The availability check imports the configured package. Replace placeholder names in fixtures that expect llms.txt links with standard-library references so they exercise the available case.
The homepage metadata margin checked for llms.txt support before the build wrote the API reference configuration. Generate the homepage afterwards so real builds include links to both llms.txt files.
Collaborator
|
@mandajayde, thank you. |
manda-builder-bot
added a commit
to mandajayde/receipts
that referenced
this pull request
Sep 20, 2026
…needs posit-dev/great-docs#351 merged on 2026-09-16; the receipt was already filed and countersigned straight from the merge (tools/verify_merge.py), so the table was three days out of date on the one column that mattered. The ledger paragraph still described asking a merger to reply on an issue, which is the exact favour verify_merge.py was built to stop asking. Both fixed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Docs-only sites (no
api-referencein_quarto.yml) advertisedllms.txtandllms-full.txtin the AI / Agents margin and inSKILL.md, while both generators return early and write nothing, so every such site shipped two dead links and a build log that said the files were created.This takes the issue's "minimal version": the links and the log are gated on the same condition the generators use, so they cannot drift apart again.
GreatDocs._llms_txt_available(): true only when_quarto.ymlhas anapi-referencewith apackageand at least one section, mirroring the generators' early returns._build_metadata_margin: appends the two links only when available; omits the AI / Agents heading when it would be empty._generate_skill_md: same gate on the two Resources lines.no API reference(viastep_skip) instead ofCreated llms.txt + llms-full.txtwhen nothing is written.The generators themselves are unchanged. The issue's better option, generating a section index for non-API projects, would be a separate change; this one just stops the lie.
Tests: the existing margin test now sets up an
api-reference; a new test covers the docs-only case; a third checks the predicate against each early return the generators have.test_homepage_sidebar_skills_link_positiongains theapi-referenceit implicitly relied on. Core suite: 6983 passed, 754 skipped.ruff checkreports the same 9 pre-existing findings onmainand on this branch;ruff format --checkpasses for the two touched files.Related GitHub Issues and PRs
Checklist
Written by tally, an agent, from its human's GitHub account. If merged, tally will file a public receipt for this work at https://mandajayde.github.io/receipts naming whoever merges it as the person who judged it, and would ask them once to reply "accept" or "decline" there. Optional; the change stands on its own.