Skip to content

Add markdown alternate link to page heads#722

Open
nearestnabors wants to merge 4 commits intomainfrom
feature/add-markdown-alternate-link
Open

Add markdown alternate link to page heads#722
nearestnabors wants to merge 4 commits intomainfrom
feature/add-markdown-alternate-link

Conversation

@nearestnabors
Copy link
Contributor

Summary

  • Adds a <link rel="alternate" type="text/markdown"> tag to every page's <head> element
  • Allows crawlers to discover the markdown version of each page at /path/to/page.md
  • Handles root paths (//index.md) and trailing slashes

Test plan

  • Verify the link tag appears in page source
  • Confirm the href correctly maps to the markdown path for various pages

🤖 Generated with Claude Code

Adds a <link rel="alternate" type="text/markdown"> tag to every page's
<head> element, allowing crawlers to discover the markdown version of
each page at /path/to/page.md.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 4, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Feb 4, 2026 11:54pm

Request Review

@teallarson
Copy link
Contributor

Screenshot 2026-02-04 at 1 59 24 PM I am not seeing these in the deploy preview

Replace CommonJS require() with ES module imports and __dirname with
import.meta.dirname to fix lint error.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolve conflict in update-example-dates.js by using import.meta.dirname
(simpler modern Node.js API) instead of fileURLToPath approach.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nearestnabors
Copy link
Contributor Author

@teallarson works
image

Verifies that:
- getMarkdownAlternatePath generates correct .md paths
- Every page.mdx file maps to a valid markdown alternate path
- All locales have correctly formed markdown alternate paths

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants