Skip to content

feat: Add docusaurus-plugin-llms for enhanced documentation generation#598

Open
fairlighteth wants to merge 2 commits intomainfrom
feat/add-llms-txt
Open

feat: Add docusaurus-plugin-llms for enhanced documentation generation#598
fairlighteth wants to merge 2 commits intomainfrom
feat/add-llms-txt

Conversation

@fairlighteth
Copy link
Contributor

@fairlighteth fairlighteth commented Feb 27, 2026

Description

Adds the docusaurus-plugin-llms plugin to generate llms.txt and llms-full.txt files at build time, following the llmstxt.org standard. This makes our documentation easily consumable by LLMs and AI-powered
tools by providing structured, plain-text representations of the full docs site.

Also adds a dedicated docs page explaining the available files and how to use them with popular AI tools like Cursor and Windsurf.

Screenshot 2026-02-27 at 08 10 08

Changes

  • Install docusaurus-plugin-llms@0.3.0 as a dev dependency
  • Add plugin configuration to docusaurus.config.ts with the following options:
    • excludeImports: true to strip MDX import statements from output
    • removeDuplicateHeadings: true to clean up redundant headings
    • ignoreFiles: ['mevblocker/**'] to exclude deprecated MEV Blocker docs
    • pathTransformation.ignorePaths: ['docs'] to produce correct URLs (since routeBasePath is /)
  • Add docs/llms.md page with usage instructions for Cursor, Windsurf, and other AI tools

After deployment, files will be available at:

Summary by CodeRabbit

  • New Features
    • Generates standardized LLM index files (concise and full versions) for site content to improve compatibility with AI tools.
  • Documentation
    • Added guidance on the LLM index format, usage, and integration with AI tools and viewers.
  • Chores
    • Added tooling dependency to support LLM index generation in the build/dev setup.

@fairlighteth fairlighteth requested a review from a team as a code owner February 27, 2026 08:03
@vercel
Copy link

vercel bot commented Feb 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Feb 27, 2026 8:11am

Request Review

@fairlighteth fairlighteth requested a review from a team February 27, 2026 08:03
@fairlighteth fairlighteth self-assigned this Feb 27, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

📝 Walkthrough

Walkthrough

Adds the "docusaurus-plugin-llms" plugin and devDependency, configures it to generate llms.txt and llms-full.txt, exclude imports and duplicate headings, ignore specified files/paths, and introduces a new docs page describing llms.txt usage.

Changes

Cohort / File(s) Summary
Plugin Configuration
docusaurus.config.ts
Added ['docusaurus-plugin-llms', { generateLLMsTxt: true, generateLLMsFullTxt: true, excludeImports: true, removeDuplicateHeadings: true, ignoreFiles: ['mevblocker/**'], pathTransformation: { ignorePaths: ['docs'] } }] to plugins.
Dependencies
package.json
Added devDependency docusaurus-plugin-llms version ^0.3.0.
Documentation
docs/llms.md
New docs page describing llms.txt and llms-full.txt format, usage guidance, and integration notes for Cursor/Windsurf and other tools.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through configs, docs, and charts,
A plugin planted seeds in knowledge parts.
llms.txt sings neat and true,
Docs sprout paths for me and you —
Hop on, the garden's fresh and new! 🌿

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding docusaurus-plugin-llms to generate llms.txt files for AI tools, which directly aligns with the changeset.
Description check ✅ Passed The description provides clear context with a well-structured 'Changes' section using checkboxes that detail all modifications, exceeding the template requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-llms-txt

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 and usage tips.

@socket-security
Copy link

socket-security bot commented Feb 27, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addeddocusaurus-plugin-llms@​0.3.08610010090100

View full report

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/llms.md`:
- Line 24: The Windsurf documentation link in the docs/llms.md entry is broken
(404); locate the Windsurf URL near the existing "See [Cursor
docs](https://docs.cursor.com/context/@-symbols/@-docs)" line and replace the
invalid Windsurf docs URL with the correct, valid Windsurf documentation page
(verify the target by opening it in a browser to confirm no 404), updating the
markdown link so the Windsurf reference resolves correctly.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 20b3a34 and f928134.

📒 Files selected for processing (1)
  • docs/llms.md


Use the `@Docs` feature to add the llms.txt URL as a documentation source. This gives Cursor accurate context about CoW Protocol, CoW AMM, and Governance when generating code suggestions.

See [Cursor docs](https://docs.cursor.com/context/@-symbols/@-docs) for more details.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# First, check the file content at the specified lines
echo "=== File content check ==="
cat -n docs/llms.md | sed -n '20,35p'

Repository: cowprotocol/docs

Length of output: 958


🏁 Script executed:

#!/bin/bash
# Verify URL accessibility
echo "Checking Cursor docs URL..."
curl -I -s -o /dev/null -w "HTTP %{http_code}\n" https://docs.cursor.com/context/@-symbols/@-docs

echo "Checking Windsurf docs URL..."
curl -I -s -o /dev/null -w "HTTP %{http_code}\n" https://docs.windsurf.com/windsurf/memories

Repository: cowprotocol/docs

Length of output: 135


Fix broken Windsurf documentation URL.

The Windsurf documentation URL on line 30 returns HTTP 404 (not found). The Cursor documentation URL on line 24 is accessible. Please verify and update the Windsurf URL to point to a valid documentation page.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/llms.md` at line 24, The Windsurf documentation link in the docs/llms.md
entry is broken (404); locate the Windsurf URL near the existing "See [Cursor
docs](https://docs.cursor.com/context/@-symbols/@-docs)" line and replace the
invalid Windsurf docs URL with the correct, valid Windsurf documentation page
(verify the target by opening it in a browser to confirm no 404), updating the
markdown link so the Windsurf reference resolves correctly.

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