Skip to content

Comments

Fix contributor docs links generated from .md references#1188

Open
rishabhk119 wants to merge 1 commit intoprocessing:mainfrom
rishabhk119:fix-contribute-md-links
Open

Fix contributor docs links generated from .md references#1188
rishabhk119 wants to merge 1 commit intoprocessing:mainfrom
rishabhk119:fix-contribute-md-links

Conversation

@rishabhk119
Copy link

This PR fixes some broken links in the Contribute pages that were still pointing to '.md' files (for eg.'./contributor_guidelines.md#software-design-principles'), which caused 404s on the built site.

What I changed:
-Updated rewriteRelativeMdLinks in src/scripts/utils.ts so that relative .md links are rewritten to /contribute/.../ URLs, keeping the #anchor part.
-Absolute URLs and links that don’t end with .md still go through rewriteRelativeLink and are unchanged.

How I tested it:
-Ran `npm run dev.
-Opened the Contribute pages locally and checked that links like “software design principles” now go to '/contribute/contributor_guidelines/#software-design-principles' and no longer 404.

@rishabhk119
Copy link
Author

I’ve opened a PR to fix the broken .md links in the Contribute pages by updating rewriteRelativeMdLinks so links like ./contributor_guidelines.md#software-design-principles become /contribute/contributor_guidelines/#software-design-principles. This addresses some of the contributor docs links mentioned in the report. Thanks

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.

1 participant