Skip to content

docs: generate llms.txt instead of maintaining it by hand - #33

Open
Mandalorian-Wang wants to merge 1 commit into
boxlite-ai:mainfrom
Mandalorian-Wang:main
Open

docs: generate llms.txt instead of maintaining it by hand#33
Mandalorian-Wang wants to merge 1 commit into
boxlite-ai:mainfrom
Mandalorian-Wang:main

Conversation

@Mandalorian-Wang

Copy link
Copy Markdown
Contributor

What happened

I deleted the BoxLite Cloud section from llms.txt in ffe3d36 (PR #32). That sync 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. 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.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 accumulated:

Problem Detail
5 dead links manage-sandbox/configuration, guides/production-best-practices, guides/building-from-source, guides/macos-sandbox-debugging, architecture/internals — all renamed, moved, or deleted in earlier passes
Stale group names Manage Sandbox / Guides / Resources against the live Manage sandboxes / From demo to production / FAQ and releases
Stale structure The three use-case mode groups, flattened in the site long ago
Missing section No BoxLite Cloud

What this adds

scripts/gen-llms-txt.py derives the file from docs.json plus each page's frontmatter. 85 entries, matching the 85 pages in the navigation, zero dead links.

--check is wired into the docs-lint workflow, 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 date
  • python3 scripts/lint-docs.py . → 164 pages, no violations
  • npx mint broken-links → no broken links
  • Entry count reconciles against docs.json (85/85); every linked .mdx confirmed to exist on disk

Note on the current deployment

Separately from this change, docs.boxlite.ai is 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 on 879dad7 reported success ("Your changes are now live"). The same commit's content renders correctly under local mint dev, and mint validate / mint broken-links both 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

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>
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ff9ef609-9b22-4d89-aa64-c6fcca66807a


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant