docs: add "Copy Page as Markdown" + llms.txt to docs site#25975
docs: add "Copy Page as Markdown" + llms.txt to docs site#25975krrish-berri-2 merged 4 commits intolitellm_internal_stagingfrom
Conversation
[Infra] Promote Internal Staging to main
Adds the signalwire llms-txt Docusaurus plugin + theme so every docs page gets: - A "Copy Page" dropdown in the breadcrumbs (Copy, View Markdown, Ask ChatGPT, Ask Claude) — defaults from the theme hook, no extra config required. - A raw `.md` companion at `<page>.md` for LLM consumption. - Site-wide `/llms.txt` index and `/llms-full.txt` corpus. The signalwire plugin README documents a `copyPageButton` option that the v1.2.2 Joi schema actually rejects; the theme's defaults cover the same feature set, so only `content.enableMarkdownFiles` and `enableLlmsFullTxt` are set. Theme is pinned to `1.0.0-alpha.9` because the floating version resolves to a broken canary whose `main` points at a missing file. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Drop the caret ranges on the two packages added in the prior commit so the docs site pulls byte-identical npm tarballs on every install. Matches the existing convention in this package.json (everything else is already exact) and protects against supply-chain substitution if a malicious patch version is published under the same minor. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
Greptile SummaryAdds Confidence Score: 5/5Safe to merge — docs-only change with no impact on litellm core or proxy. All remaining findings are P2: the docs/my-website/docusaurus.config.js — verify whether
|
| Filename | Overview |
|---|---|
| docs/my-website/docusaurus.config.js | Adds plugin + theme registration; the ui.copyPageContent config block uses a key that differs from the documented API (copyPageButton), likely silently ignored. |
| docs/my-website/package.json | Adds two @signalwire packages, both pinned to exact pre-release versions with no carets — matches the project's existing pinning convention. |
| docs/my-website/package-lock.json | Lockfile updated with integrity SHA-512 hashes for all new transitive dependencies; no unexpected additions. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[docusaurus build] --> B["docusaurus-plugin-llms-txt v2.0.0-alpha.7"]
B --> C["/llms.txt index"]
B --> D["/llms-full.txt corpus"]
B --> E["/docs/page.md companions"]
A --> F["docusaurus-theme-llms-txt v1.0.0-alpha.9"]
F --> G["Copy Page button in breadcrumbs"]
G --> H["Copy markdown to clipboard"]
G --> I["View raw .md"]
G --> J["Ask ChatGPT"]
G --> K["Ask Claude"]
Reviews (2): Last reviewed commit: "docs: upgrade signalwire llms-txt plugin..." | Re-trigger Greptile
| "@inkeep/cxkit-docusaurus": "0.5.107", | ||
| "@mdx-js/react": "3.1.1", | ||
| "@signalwire/docusaurus-plugin-llms-txt": "1.2.2", | ||
| "@signalwire/docusaurus-theme-llms-txt": "1.0.0-alpha.9", |
There was a problem hiding this comment.
Alpha dependency in production docs build
1.0.0-alpha.9 is a pre-release tag; the package can introduce breaking changes between alpha bumps without a semver major. The PR description explains the trade-off (the ^0.0.0-* floating range resolved to a broken canary), but it's worth tracking an upgrade path to a stable release once one ships. Consider adding a comment or a tracking issue so this doesn't get forgotten.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
…tton The stable v1.2.2 plugin we first pinned does not call setGlobalData during contentLoaded, so the theme's CopyPageContent component always returned null (its `!siteConfig` bailout). The theme v1.0.0-alpha.9 is built against the v2-alpha plugin API, which is the version that actually wires the copy-content JSON and plugin config into the theme via setGlobalData. Pins plugin to 2.0.0-alpha.7 (exact, no caret) and switches the config to the v2 schema: - top-level `markdown` + `llmsTxt` replace the v1 `content` block - new `ui.copyPageContent` (off by default in v2) enables the button with view-markdown + ChatGPT + Claude actions. Verified end-to-end: production build serves the dropdown with "Copy Raw Markdown", "View Markdown", "Reference in ChatGPT", and "Reference in Claude" on /docs/routing (button mounts at ~x=960 in the breadcrumbs row). Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
dd76cc5
into
litellm_internal_staging
Relevant issues
N/A — docs-site ergonomics improvement.
Summary
Every page on docs.litellm.ai now has a Copy Page dropdown (in the breadcrumbs) with:
.mdtwin (/docs/<page>.md)The site also now exposes:
/llms.txt— index of every doc with titles + descriptions (llmstxt.org format)/llms-full.txt— the full concatenated corpus for LLM ingestion/docs/<page>.md— a raw-markdown companion next to every HTML pageWired up via
@signalwire/docusaurus-plugin-llms-txt+@signalwire/docusaurus-theme-llms-txtin docs/my-website/docusaurus.config.js.Why
Users (and the LLMs they use) frequently want to paste docs content into a chat. A one-click "copy as markdown" is much better than selecting rendered HTML, and the
/llms.txt+ per-page.mdoutputs make the docs first-class AI context.Reviewer notes
copyPageButtonis not set. The plugin's README shows acopyPageButton: { buttonLabel, actions: { ai: {...} } }block, but the Joi schema in v1.2.2 rejects those keys — the theme reads defaults from its own hook (useCopyButtonConfig) which already enable Copy / View Markdown / ChatGPT / Claude. No extra config needed to get the full button.1.0.0-alpha.9. The floating range^0.0.0-…resolved to a canary whosemainpoints to a missinglib/index.js, which made Docusaurus fail to load the theme. Both packages are pinned to exact versions (no carets) for supply-chain safety, matching the existing convention in thispackage.json.npx docusaurus buildsucceeds;build/llms.txt(834 lines),build/llms-full.txt(~200k lines), and per-page.mdfiles are all generated.Pre-Submission checklist
tests/test_litellm/directory — N/A, docs-site-only change (no Python code modified)make test-unit— no Python code toucheddocs/my-website/@greptileaiScreenshots / Proof of Fix
To verify locally:
🤖 Generated with Claude Code