Skip to content

feat(ai): Add .md extension to provide pages in markdown for LLMs #13994

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Draft
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

codyde
Copy link
Contributor

@codyde codyde commented Jun 11, 2025

Adds support for .md at the end of every pre-rendered path. Does this by a hack where we rewrite those paths to public/md-exports/.... The contents of this directory are generated after next build by scraping all html files under .next/server/app

Not ideal but looks like the easiest path for now.

@codyde codyde added the WIP label Jun 11, 2025
Copy link

vercel bot commented Jun 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
develop-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 1:23am
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 1:23am

Copy link

codecov bot commented Jun 11, 2025

Bundle Report

Changes will increase total bundle size by 29.21kB (0.14%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 10.91MB 16 bytes (0.0%) ⬆️
sentry-docs-edge-server-array-push 371.39kB 9 bytes (0.0%) ⬆️
sentry-docs-client-array-push 9.8MB 29.19kB (0.3%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.64MB -0.0%
4288.js (New) 1.04MB 1.04MB 100.0% 🚀
../instrumentation.js -3 bytes 973.36kB -0.0%
9523.js -3 bytes 949.31kB -0.0%
../app/[[...path]]/page.js.nft.json 34 bytes 399.82kB 0.01%
../app/platform-redirect/page.js.nft.json 34 bytes 399.74kB 0.01%
../app/sitemap.xml/route.js.nft.json 34 bytes 397.71kB 0.01%
9567.js -1 bytes 18.65kB -0.01%
2637.js (Deleted) -1.04MB 0 bytes -100.0% 🗑️

Files in 9567.js:

  • ./src/mdx.ts → Total Size: 18.16kB
view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 873.24kB -0.0%
static/chunks/7750-*.js 13.97kB 415.8kB 3.48%
static/chunks/main-*.js 15.17kB 133.44kB 12.82% ⚠️
static/chunks/main-*.js -13 bytes 1.66kB -0.78%
static/nNa38gOQwqJS5uRJDuIxh/_buildManifest.js (New) 684 bytes 684 bytes 100.0% 🚀
static/nNa38gOQwqJS5uRJDuIxh/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/Jruoh1QblEweuJjNbojKm/_buildManifest.js (Deleted) -616 bytes 0 bytes -100.0% 🗑️
static/Jruoh1QblEweuJjNbojKm/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: sentry-docs-edge-server-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
src/middleware.js 9 bytes 207.38kB 0.0%

@codyde codyde changed the title (feat) Adding /llms.txt switch to convert pages to markdown for LLM (DO NOT MERGE - WIP) (feat) Adding .md switch to convert pages to markdown for LLM (DO NOT MERGE - WIP) Jun 18, 2025
…build time, update documentation, and adjust Next.js configuration for .md rewrites. Remove deprecated API route handling.
@BYK BYK marked this pull request as draft June 18, 2025 19:39
@BYK BYK changed the title (feat) Adding .md switch to convert pages to markdown for LLM (DO NOT MERGE - WIP) feat: Add .md extension to provide pages in markdown for LLMs Jun 18, 2025
@BYK BYK removed the WIP label Jun 18, 2025
@BYK BYK changed the title feat: Add .md extension to provide pages in markdown for LLMs feat(ai): Add .md extension to provide pages in markdown for LLMs Jun 18, 2025
@BYK
Copy link
Member

BYK commented Jun 19, 2025

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants