Repository navigation
🐛 fix: strip .mdx as well as .md when building sync-sibling-docs route map - #392
Conversation
…e map rewriteLinks built the synced-route map with target.replace(/\.md$/i, ''), so a page synced with an .mdx target produced /docs/<project>/<page>.mdx. Match .mdx? and add a rewriteLinks test for an .mdx target. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for hivecommons-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this repository have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply. |
There was a problem hiding this comment.
Read scripts/sync-sibling-docs.ts at a912071. Looks correct to me.
- The route map at
scripts/sync-sibling-docs.ts:424-427is keyed ons.sourceand the value is built froms.target;/\.mdx?$/inow strips either extension, matching Docusaurus' extension-less routes for both.mdand.mdxpages. The matcher side (resolveSyncedRoute, line 436) is unchanged and unaffected. - Worth knowing for whoever merges: every
targetin the currentPROJECTStable (lines 76-136) ends in.md— the.mdxsources are mapped to.mdtargets — so this is latent hardening rather than a live bug on today's config. The new test pins the behaviour for when an.mdxtarget is added. - Changelog fragment name/category follows the
fixed-<issue>-<slug>.mdconvention.
No findings.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
/lgtm |
|
/approve |
|
@clubanderson: you cannot LGTM your own PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at a912071. |
Addresses the folded scanner finding on #355:
rewriteLinksinscripts/sync-sibling-docs.tsbuilt the synced-route map withs.target.replace(/\.md$/i, ""), so aSyncedFilewhosetargetends in.mdxproduced a route like/docs/<project>/<page>.mdxinstead of/docs/<project>/<page>./\.mdx?$/iinstead.rewriteLinkstest with an.mdxtarget.Refs #355.