docs: Add markdown support for documentation with edge middleware and conversion scripts#8796
docs: Add markdown support for documentation with edge middleware and conversion scripts#8796
Conversation
… conversion scripts - Updated `pyproject.toml` to include `beautifulsoup4` and `markdownify` dependencies for markdown conversion. - Enhanced GitHub Actions workflow to generate markdown versions of documentation and add edge middleware for serving markdown files. - Introduced `html_to_markdown.py` script to convert HTML documentation to markdown format. - Added `middleware.js` for handling markdown content negotiation in Vercel. - Patched Vercel configuration to include middleware routing for markdown files. - Updated `vercel.json` to set appropriate headers for markdown files.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds a docs-to-markdown export path for the deployed documentation site, enabling content negotiation (Accept: text/markdown) and direct .md URLs on Vercel.
Changes:
- Add HTML→Markdown conversion script and required Python dependencies for docs builds.
- Add Vercel Edge Middleware + Vercel config patching to serve
.mdvariants (including viaAccept: text/markdown). - Configure Vercel to serve
.mdfiles withtext/markdowncontent-type (and CORS header).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Adds docs-group dependencies needed for HTML→Markdown conversion. |
docs/vercel.json |
Adds headers so .md files are served as text/markdown. |
docs/scripts/html_to_markdown.py |
New converter that walks built HTML output and emits index.md alongside index.html. |
docs/scripts/middleware.js |
New edge middleware to serve markdown via .md URLs or Accept: text/markdown. |
docs/scripts/patch_vercel_config.py |
Patches Vercel build output routing to activate middleware. |
.github/workflows/docs.yml |
Runs markdown generation and injects edge middleware into the prebuilt Vercel output before deploy. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
akshayka
left a comment
There was a problem hiding this comment.
Owner approval, but I didn't review the Vercel related code
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.21.2-dev30 |
pyproject.tomlto includebeautifulsoup4andmarkdownifydependencies for markdown conversion.html_to_markdown.pyscript to convert HTML documentation to markdown format.middleware.jsfor handling markdown content negotiation in Vercel.vercel.jsonto set appropriate headers for markdown files.