Skip to content

feat(md-exports): Link Markdown export in page body and head - #20916

Open
coolguyzone wants to merge 2 commits into
masterfrom
coolguyzone/feat/md-export-notice
Open

coolguyzone wants to merge 2 commits into
masterfrom
coolguyzone/feat/md-export-notice

Conversation

@coolguyzone

@coolguyzone coolguyzone commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

Every page has a Markdown export at <path>.md, but the only link to it was "View as Markdown" in the Copy page dropdown. That menu renders client-side on click, so it isn't in the server HTML at all, and agents fetching a page never see the URL.

This adds two pointers that are in the server-rendered HTML:

  • Body notice: a short, muted line under each page's title and description: "Markdown version: docs.sentry.io/<path>.md. Index of all pages: docs.sentry.io/llms.txt." The URLs are written out as link text, so they survive tools that strip hrefs. The protocol is dropped from the visible text (the href keeps it) so screen readers don't spell out "https://" on every page. It's rendered once in DocPage, so no MDX changes are needed.
  • Head tag: <link rel="alternate" type="text/markdown" href="…/<path>.md"> via alternates.types in generateMetadata.

The notice sits outside div#main, so it's excluded from the generated .md exports and the Algolia index. The Copy page dropdown is unchanged.

To verify on the preview:

  • View source on any page and confirm the notice and the rel="alternate" link are there.
  • Fetch a page's .md export and confirm the notice is not in it.
  • Run a page through an HTML-to-text tool (e.g. r.jina.ai/<url>) and confirm the line survives near the top.
  • Check spacing in light and dark mode.
  • With VoiceOver (Cmd+F5), read down from the H1 on a deeply nested platform page and confirm the notice is brief.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace YYYY-MM-DD with the due date. You can update this information later by editing the PR description.

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • No deadline: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've supplied a deadline.

Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

🤖 Generated with Claude Code

The only pointer to a page's .md export was inside the Copy page
dropdown, which renders client-side on click, so agents fetching the
HTML never saw it.

Add a server-rendered notice under each page's title linking the .md
export and llms.txt, plus a <link rel="alternate" type="text/markdown">
tag. The notice sits outside div#main, so it stays out of the generated
Markdown exports and the Algolia index.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
develop-docs Ready Ready Preview Nov 19, 2026 10:14pm UTC
sentry-docs Ready Ready Preview Nov 19, 2026 10:14pm UTC

Request Review

Screen readers read the notice on every page, right before the content,
and spelled out each full URL. Drop the protocol from the visible link
text (the href keeps it) and trim the wording.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cursor

cursor Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Getting ready to monitor this change · Rollout details

Status Service Environment
⏳ Getting ready to monitor this change

This branch was successfully deployed

2 active deployments
Preview – sentry-docs — 7ef4759c Deployed Nov 19, 2026 by vercel[bot]
Preview – develop-docs — 7ef4759c Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant