Skip to content

feat: Add LLM-friendly documentation endpoints#245

Merged
udhaykumarbala merged 29 commits into0gfoundation:mainfrom
udhaykumarbala:udhay/feature-llm-markdown-endpoints
Feb 18, 2026
Merged

feat: Add LLM-friendly documentation endpoints#245
udhaykumarbala merged 29 commits into0gfoundation:mainfrom
udhaykumarbala:udhay/feature-llm-markdown-endpoints

Conversation

@udhaykumarbala
Copy link
Collaborator

Summary

This PR makes 0G documentation accessible to AI coding tools (Claude Code, Cursor, GitHub Copilot, ChatGPT, etc.) following the industry standard used by Vercel, Supabase, LangChain, and others.

New Endpoints

Endpoint Description
/llms.txt Index of all docs with descriptions (12KB)
/llms-full.txt Complete documentation in single file (484KB)
/[any-page].md Raw markdown for any documentation page

Why This Matters

Before: Developers using AI tools had to manually copy-paste docs or scrape HTML.

After: AI tools can directly fetch clean markdown:

# One API call = entire 0G documentation
docs = requests.get("https://docs.0g.ai/llms-full.txt").text

Benefits for 0G Developers

  • Better AI assistance - Claude/Copilot can read 0G docs directly
  • Faster onboarding - AI tools understand 0G APIs instantly
  • Accurate code generation - AI has real contract addresses, RPCs, SDKs
  • "Vibe coding" support - Works with Cursor, Windsurf, Claude Code

Industry Standard

Implements llmstxt.org standard, adopted by:

  • Vercel Docs
  • Supabase Docs
  • LangChain Docs
  • n8n, FastHTML, and 100+ projects

Technical Details

  • Zero runtime cost - Files generated at build time
  • Backward compatible - No changes to existing HTML docs
  • CORS enabled - AI tools can fetch cross-origin
  • Auto-updated - Regenerates on every deploy

Files Changed

File Change
docusaurus.config.ts Register plugins
package.json Add docusaurus-plugin-llms
src/plugins/markdown-endpoint-plugin.js Raw .md endpoints
vercel.json CORS headers configuration

Test plan

  • Build succeeds locally
  • llms.txt generated with 66 doc entries
  • llms-full.txt generated (484KB, 15K lines)
  • Raw .md files copied to build output
  • Deploy to Vercel preview and verify endpoints

Related

Closes #242

🤖 Generated with Claude Code

@vercel
Copy link

vercel bot commented Feb 18, 2026

@udhaykumarbala is attempting to deploy a commit to the 0g-Frontend Team on Vercel.

A member of the Team first needs to authorize it.

Implements industry-standard LLM documentation access:

- Add llms.txt and llms-full.txt generation (llmstxt.org standard)
- Add raw markdown endpoints (.md URLs return raw content)
- Configure CORS headers for AI tool access

Resolves: 0gfoundation#242

New endpoints:
- /llms.txt - Documentation index with descriptions
- /llms-full.txt - Complete docs in single file (484KB)
- /*.md - Raw markdown for any page
@udhaykumarbala udhaykumarbala force-pushed the udhay/feature-llm-markdown-endpoints branch from b9abd31 to fd97a75 Compare February 18, 2026 19:08
@vercel
Copy link

vercel bot commented Feb 18, 2026

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

Project Deployment Actions Updated (UTC)
0g-doc Ready Ready Preview, Comment Feb 18, 2026 7:17pm

Request Review

@udhaykumarbala udhaykumarbala merged commit da39a74 into 0gfoundation:main Feb 18, 2026
5 of 6 checks passed
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.

[Improvement]: Add LLM-compatible markdown endpoint support (.md access to raw docs)

1 participant