docs: generate llms.txt instead of maintaining it by hand - #33
Open
Mandalorian-Wang wants to merge 1 commit into
Open
docs: generate llms.txt instead of maintaining it by hand#33Mandalorian-Wang wants to merge 1 commit into
Mandalorian-Wang wants to merge 1 commit into
Conversation
I deleted the BoxLite Cloud section from llms.txt in ffe3d36. The sync that landed that commit deliberately excluded `cloud/` and `docs.json` because both held content the source tree could not produce — but llms.txt is derived from the whole page set the same way, and I did not think of it, so the source-tree version overwrote it and took all 21 Cloud lines with it. Restoring those lines by hand would leave the underlying problem in place. llms.txt duplicates two facts that already live elsewhere: the navigation tree (docs.json) and each page's title and description (its own frontmatter). A hand-maintained third copy rots silently, and this one had: * five dead links — manage-sandbox/configuration, guides/production-best-practices, guides/building-from-source, guides/macos-sandbox-debugging, and architecture/internals, all renamed, moved, or deleted in earlier passes * group names from a superseded IA ("Manage Sandbox", "Guides", "Resources" against the live "Manage sandboxes", "From demo to production", "FAQ and releases") * the three use-case mode groups, flattened in the site long ago * no BoxLite Cloud section scripts/gen-llms-txt.py now derives the file from docs.json plus frontmatter. 85 entries, matching the 85 pages in the navigation, with no dead links. `--check` is wired into the docs-lint workflow so staleness fails CI rather than waiting for a reader to notice. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
What happened
I deleted the BoxLite Cloud section from
llms.txtin ffe3d36 (PR #32). That sync deliberately excludedcloud/anddocs.jsonbecause both held content the source tree could not produce — butllms.txtis derived from the whole page set the same way, and I did not think of it. The source-tree version overwrote it and took all 21 Cloud lines with it.Why this regenerates rather than patches
Restoring those lines by hand would leave the underlying problem in place.
llms.txtduplicates two facts that already live elsewhere — the navigation tree (docs.json) and each page's title and description (its own frontmatter). A hand-maintained third copy rots silently, and this one had accumulated:manage-sandbox/configuration,guides/production-best-practices,guides/building-from-source,guides/macos-sandbox-debugging,architecture/internals— all renamed, moved, or deleted in earlier passesManage Sandbox/Guides/Resourcesagainst the liveManage sandboxes/From demo to production/FAQ and releasesWhat this adds
scripts/gen-llms-txt.pyderives the file fromdocs.jsonplus each page's frontmatter. 85 entries, matching the 85 pages in the navigation, zero dead links.--checkis wired into thedocs-lintworkflow, so staleness fails CI instead of waiting for a reader to notice. Verified both directions: it passes on a synced file, and returns exit 1 when a single heading is altered.Verification
python3 scripts/gen-llms-txt.py --check→ up to datepython3 scripts/lint-docs.py .→ 164 pages, no violationsnpx mint broken-links→ no broken linksdocs.json(85/85); every linked.mdxconfirmed to exist on diskNote on the current deployment
Separately from this change,
docs.boxlite.aiis not serving the content merged in #32: every pre-existing route returns 200 in about 2s while every new route (/cloud,/cloud/*,/getting-started/quickstart-go,/reference/go) returns 504 Gateway time-out, and the homepage still renders two tabs instead of three. The Mintlify deployment check on879dad7reported success ("Your changes are now live"). The same commit's content renders correctly under localmint dev, andmint validate/mint broken-linksboth pass — so this looks like a Mintlify build/cache issue rather than a content one, and merging this PR will not by itself fix it. A manual redeploy with cache clear is the next step there.🤖 Generated with Claude Code