fix(ssg-md): use .md links instead of .html in Overview SSG-MD mode#2944
Merged
fix(ssg-md): use .md links instead of .html in Overview SSG-MD mode#2944
Conversation
Fixed an issue where the Overview component was using .html links instead of .md links when rendering in SSG-MD mode (process.env.__SSR_MD__). - Added toMdLink helper function to convert links to .md format - Applied .md extension to item links, header links, and sub-item links - Properly handles links with hash fragments 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a link formatting issue in the Overview component when rendering in SSG-MD mode. The component was generating .html links instead of .md links for markdown-based static site generation.
Key changes:
- Added a
toMdLinkhelper function to convert internal links to.mdformat - Applied the conversion to item links, header links with hash fragments, and sub-item links
- Added logic to skip conversion for links with existing extensions and external URLs
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Rsdoctor Bundle Diff AnalysisFound 3 projects in monorepo, 1 project with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 node_mdPath:
📦 Download Diff Report: node_md Bundle Diff Generated by Rsdoctor GitHub Action |
Added detailed PR title format guidelines including: - Conventional Commits format requirements - Scope examples for different modules and packages - Clear examples from recent PRs This helps maintain consistent PR titles for better project navigation and easier filtering of changes by module/package. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Improved the implementation of route path to .md path conversion by using existing utility functions instead of manual string processing. - Use normalizeHref() to properly handle route paths - Use withBase() to add base path correctly - Replace .html extension with .md after normalization - More reliable and consistent with other parts of the codebase 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Applied prettier formatting to AGENTS.md for consistency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Timeless0911
approved these changes
Dec 29, 2025
This was referenced Dec 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixed an issue where the Overview component was using
.htmllinks instead of.mdlinks when rendering in SSG-MD mode (process.env.__SSR_MD__).Changes
toMdLinkhelper function to convert links to.mdformat in theOverviewMarkdowncomponent.mdextension to:[Introduction](/guide/start/introduction)→[Introduction](/guide/start/introduction.md))/guide/basic/ssg-md#features→/guide/basic/ssg-md.md#features)Context
When using the SSG-MD feature (llms.txt generation), pages are rendered as
.mdfiles instead of.htmlfiles. The Overview component needs to generate correct.mdlinks to ensure proper navigation in the generated markdown documentation.Test Plan
llms: trueconfiguration.mdlinks in the generated markdown filespath.md#anchor)🤖 Generated with Claude Code