Skip to content

Fix: remove trailing slashes from broken Wikipedia links #892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

reshma045
Copy link

Description:
This PR fixes issue #878 by removing unnecessary trailing slashes from Wikipedia links across the p5.js website and documentation. Trailing slashes on some Wikipedia URLs were causing 404 errors.

Issue: Fixes #878

Changes:
Removed trailing slashes from all wikipedia.org/wiki/ links found using a site-wide search.

Example Fixed Link:
Before: https://en.wikipedia.org/wiki/Screen_reader/ (404)
After: https://en.wikipedia.org/wiki/Screen_reader (Works (HTTP 200))

Verification:

  • Verified changes on local server: http://localhost:4321
  • Checked affected pages in both reference, contributor sections and other pages.
  • Confirmed fixes across all five supported languages

@reshma045
Copy link
Author

Few unrelated tests (CodeEmbed.test.tsx, CodeFrame.test.tsx) failed due to a known syntax error (prevRefreshReg already declared). This failure is unrelated to the changes made in this PR, which only update markdown content and fix external Wikipedia links.

All reference and documentation pages were successfully built and verified locally.

@blackboxlogic
Copy link

It looks like your change is to use old versions of two packages. I'm guessing the add-a-slash behavior was introduced in their newer versions?
Does this mean those packages can never be updated here? Is there something to remind people not to update them? Maybe a unit test, comment?
Was there a bug in those packages and has it been reported to the maintainers of them?

@reshma045
Copy link
Author

Hi @blackboxlogic thank you for the feedback!
Just to clarify, this PR does not modify or downgrade any dependencies or packages. The issue was purely in the markdown and JSON content. Several Wikipedia links had hardcoded trailing slashes (such as /wiki/Some_Article/) that led to 404s. I performed a site-wide search and manually updated only the affected links in the content files (no logic or package behavior involved).
So: 1. No package versions were changed.
2. There is no lock-in to older versions.
3. There's no bug in a package that needs to be reported.
This change is isolated to the content layer and should remain stable regardless of future package updates.

@blackboxlogic
Copy link

Look at your changed files, note that the first one included two package downgrades.

I wonder if you made manual updates to generated files, which I think would be an oops. I'm not familiar with this project, are you?

@reshma045
Copy link
Author

@blackboxlogic You're absolutely right, I initially didn't intend to change any dependencies, but I just noticed that documentation and yuidocjs were accidentally downgraded due to a local npm install resolving older versions (probably because of the lockfile or environment).

I’ve now restored the original versions:
"documentation": "^14.0.3"
"yuidocjs": "^0.10.2"

This PR only contains content fixes now, with no dependency changes. Thanks again for pointing this out!

@blackboxlogic
Copy link

blackboxlogic commented Jul 5, 2025

My question remains about if you made manual edits to generated content (removing all the slashes). I suspect the files you edited are the output from an automated process and changing them directly (while easy) is wrong.

But I'm not familiar with this project.

@blackboxlogic
Copy link

My question remains about if you made manual edits to generated content (removing all the slashes). I suspect the files you edited are the output from an automated process and changing then directly (while easy) is wrong.

But I'm not familiar with this project.

@blackboxlogic
Copy link

Also acknowledging that you're a stranger on the Internet who is trying to fix a problem and I appreciate that, and maybe you're familiar with this project and your change is correct and I shouldn't be so dismissive.

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.

Links to wikipedia are broken
2 participants