Skip to content

Fix contributor docs links generated from .md references#1188

Closed
rishabhk119 wants to merge 3 commits intoprocessing:mainfrom
rishabhk119:fix-contribute-md-links
Closed

Fix contributor docs links generated from .md references#1188
rishabhk119 wants to merge 3 commits 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

@ksen0
Copy link
Member

ksen0 commented Feb 24, 2026

Hi! I am looking at this now but I am not able to reproduce the original problem.

  1. I go to https://p5js.org/contribute/contributor_guidelines
  2. I click on "software design principles" in the left hand menu
  3. browser successfully navigates to https://p5js.org/contribute/contributor_guidelines/#software-design-principles

Could you explain please a bit what problem you mean?

Please note that the contributor guidelines that before filing a PR, an issue can to be approved for work. This PR also introduces failing tests and changes that look not required by the description. Unless the original problem can be reproduced, I think it's best to close this PR, but please let me know if I've misunderstood the goal of this work! Thank you

@rishabhk119
Copy link
Author

Thanks a lot for taking the time to review this. After rechecking the page and your comments, I realize I couldn’t reliably reproduce the original issue and my changes ended up going beyond what was actually needed, even causing failing tests, so I’m okay with closing this PR. I really appreciate the guidance about getting an issue approved before starting work, and I’ll make sure to follow that process for future contributions. I also understand maintainers are very busy, so I’ll try to focus on issues that are clearly approved or already actively discussed to avoid creating extra noise. Thank you again for your patience and feedback.

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