Skip to content

Conversation

@rakesh2OO5
Copy link

Summary

This PR fixes incorrect GitHub source and issue links shown on the p5.sound 2.x reference site.

The visible “Edit this file” and issue links are generated in
ReferenceItemLayout.astro, not in the reference builder comments.
Because of this, p5.sound entries were incorrectly routing users to
processing/p5.js instead of processing/p5.sound.

Changes

  • Select the correct GitHub repository based on entry.data.module
  • Route p5.sound reference links to processing/p5.sound
  • Preserve existing behavior for p5.js references

Notes

  • This fix targets the 2.0 branch, as the issue affects the 2.x reference site
  • No reference content or rendering logic was changed

Fixes #1030

@rakesh2OO5
Copy link
Author

Note: this PR includes some minor formatting-only changes in the same file from reapplying the fix cleanly. Happy to split or adjust if you’d prefer the diff to be strictly minimal.

@kunstewi
Copy link

kunstewi commented Jan 4, 2026

hi @rakesh2OO5 did you test these changes locally, can you attach a screenshot or a video sample so it's easy for the maintainers the review the PR.

@rakesh2OO5
Copy link
Author

Thanks for checking! Yes, I tested this locally.

I ran the site with npm run dev and verified that:

  • p5.sound reference pages now link to the correct GitHub repo (processing/p5.sound)
  • Non-sound references still link to processing/p5.js

I’ve attached screenshots showing examples like delayTime() and getLevel() pointing to the correct source files and line numbers. Happy to provide a short video as well if that’s preferred.
Screenshot 2026-01-04 162020
Screenshot 2026-01-04 162858
Screenshot 2026-01-04 162930
Screenshot 2026-01-04 162948
Screenshot 2026-01-04 162957

@kunstewi
Copy link

kunstewi commented Jan 4, 2026

@rakesh2OO5 everything looks fine to me. Could you please tell me how were you able to get the beta.p5js.org page run locally ? On my end, even after setting the versions of p5Version = "2.1.2" and p5SoundVersion = "0.2.0" and running npm run build and npm run dev still opens the p5js.org page locally not the beta.p5js.org that has the wrong links problem.

@rakesh2OO5
Copy link
Author

Hi @kunstewi, thanks for checking and for the question!

I didn’t actually run the beta.p5js.org site locally as a separate app. What I did instead was:

1.Run the site locally using npm run dev as usual

2.Switch to the 2.x reference context by navigating to routes like
/reference/p5.sound/... (these correspond to the beta / 2.x reference content)

3.Verify the “Edit this file” / source links rendered on those pages

The key thing is that the bug isn’t about which domain (p5js.org vs beta.p5js.org) is served locally, but about how the reference layout generates GitHub source links for 2.x entries.

Locally, the dev server will still open under localhost, but the rendered links reflect the 2.x data (module = p5.sound) and that’s where the incorrect repo routing was happening.

Let me know if you’d like, I can also add a short note to the PR clarifying this distinction for reviewers.

@kunstewi
Copy link

kunstewi commented Jan 4, 2026

hey @davepagurek please take a look at this.

@kunstewi
Copy link

kunstewi commented Jan 5, 2026

hey @rakesh2OO5 check out the proposed changes by dave, and please make the adjustments accordingly, thank you.

@rakesh2OO5
Copy link
Author

Thanks for the review!

I’ve pushed an updated and corrected version of this fix to PR #1075, which supersedes this PR.

Closing this one in favor of #1075 to keep the review focused on a single branch.

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.

p5.js 2.x reference pages for p5.sound functions link to wrong repository

3 participants