Skip to content

docs: Add markdown support for documentation with edge middleware and conversion scripts#8796

Merged
mscolnick merged 3 commits intomainfrom
ms/markdown-accept
Mar 21, 2026
Merged

docs: Add markdown support for documentation with edge middleware and conversion scripts#8796
mscolnick merged 3 commits intomainfrom
ms/markdown-accept

Conversation

@mscolnick
Copy link
Copy Markdown
Contributor

@mscolnick mscolnick commented Mar 20, 2026

  • 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.

… 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.
Copilot AI review requested due to automatic review settings March 20, 2026 19:09
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 20, 2026

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

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Mar 20, 2026 7:44pm

Request Review

@mscolnick mscolnick changed the title ms/markdown accept docs: Add markdown support for documentation with edge middleware and conversion scripts Mar 20, 2026
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Mar 20, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 .md variants (including via Accept: text/markdown).
  • Configure Vercel to serve .md files with text/markdown content-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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@mscolnick mscolnick enabled auto-merge (squash) March 20, 2026 19:54
Copy link
Copy Markdown
Contributor

@akshayka akshayka left a comment

Choose a reason for hiding this comment

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

Owner approval, but I didn't review the Vercel related code

@mscolnick mscolnick merged commit 2635b5e into main Mar 21, 2026
52 checks passed
@mscolnick mscolnick deleted the ms/markdown-accept branch March 21, 2026 14:36
@github-actions
Copy link
Copy Markdown

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.21.2-dev30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants