Skip to content

Improve markdown conversion quality#1229

Open
GBKS wants to merge 1 commit intomasterfrom
feature/markdown-negotiation-tweaks
Open

Improve markdown conversion quality#1229
GBKS wants to merge 1 commit intomasterfrom
feature/markdown-negotiation-tweaks

Conversation

@GBKS
Copy link
Copy Markdown
Contributor

@GBKS GBKS commented Apr 22, 2026

Refactor HTML-to-Markdown converter to eliminate navigation chrome and noise artifacts, improving content quality for AI consumption.

Based on BOLTy's feedback in this comment.

Refactor HTML-to-Markdown converter to eliminate navigation chrome and noise artifacts, improving content quality for AI consumption.
@GBKS GBKS self-assigned this Apr 22, 2026
@GBKS GBKS added Enhancement New feature or request Dev Development-focused tasks. labels Apr 22, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 22, 2026

Deploy Preview for bitcoin-design-site ready!

Name Link
🔨 Latest commit ec6661a
🔍 Latest deploy log https://app.netlify.com/projects/bitcoin-design-site/deploys/69e870cfb4489f0008ec8dde
😎 Deploy Preview https://deploy-preview-1229--bitcoin-design-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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

This PR refactors the Netlify Edge HTML-to-Markdown conversion to reduce non-content “chrome” in the generated markdown and improve the content signal for AI/agent consumption.

Changes:

  • Introduces a shared selector list to prune common non-content elements (nav/header/footer, sidebars, anchors, etc.) before conversion.
  • Updates conversion to render only a selected “primary content” root (e.g., article/main) instead of always converting the full <body>.
  • Improves the fallback (regex-based) converter by stripping more noise and refining link/image rendering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread netlify/edge-functions/markdown-negotiation.ts
Comment thread netlify/edge-functions/markdown-negotiation.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dev Development-focused tasks. Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants