fix: skip rel=alternate markdown link on versioned docs pages#2283
Merged
fix: skip rel=alternate markdown link on versioned docs pages#2283
rel=alternate markdown link on versioned docs pages#2283Conversation
Co-authored-by: barjin <61918049+barjin@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix rel=alternate markdown links for versioned pages
fix: skip Feb 25, 2026
rel=alternate markdown link on versioned docs pages
|
Preview for this PR was built for commit |
katzino
approved these changes
Feb 25, 2026
birosrichard
approved these changes
Feb 25, 2026
Member
|
@copilot run the linter autofix ( |
Co-authored-by: barjin <61918049+barjin@users.noreply.github.com>
Contributor
Author
Done in |
|
Preview for this PR was built for commit |
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.
rel=alternatemarkdown links 404 on versioned pagesuseAllDocsDatafrom@docusaurus/plugin-content-docs/clientto detect versioned pages without URL regex parsing<link rel="alternate">when the current page is a versioned (non-latest) docs pagenpm run lint:fix) - resolvedimplicit-arrow-linebreakandmax-lenerrorsOriginal prompt
rel=alternatemarkdown links lead to 404 for versioned pages #2282🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.
Note
Low Risk
Small, UI-only head tag change gated by Docusaurus docs metadata; risk is limited to accidentally suppressing the alternate link on some pages.
Overview
Prevents broken
rel="alternate"markdown links on versioned (non-latest) Docusaurus docs pages by detecting when the currentpathnamefalls under a non-last docs version viauseAllDocsDataand skipping link rendering.Also refactors the layout wrapper to use
pathnamefromuseLocation()directly and adjusts the inline predicate formatting to satisfy lint rules.Written by Cursor Bugbot for commit 2285289. Configure here.