@@ -18,7 +18,7 @@ import type {
18
18
ReferenceParam ,
19
19
} from " @/types/parsers.interface" ;
20
20
import { setJumpToState } from " ../globals/state" ;
21
- import { p5Version } from " ../globals/p5-version" ;
21
+ import { p5Version , p5SoundVersion } from " ../globals/p5-version" ;
22
22
import flask from " @src/content/ui/images/icons/flask.svg?raw" ;
23
23
24
24
const { entry, relatedEntries } = Astro .props ;
@@ -76,6 +76,12 @@ const relatedReferences = [
76
76
77
77
const seenParams: Record <string , true > = {};
78
78
79
+ const isSoundModule = entry .data .module === " p5.sound"
80
+ const ghSourceRepo = isSoundModule ? " p5.sound.js" : " p5.js"
81
+ const ghVersion = isSoundModule ? p5SoundVersion : p5Version
82
+ const ghIssuesUrl = ` https://github.com/processing/${ghSourceRepo }/issues `
83
+ const ghSourceCodeUrl = ` https://github.com/processing/${ghSourceRepo }/blob/v${ghVersion } `
84
+
79
85
---
80
86
81
87
<Head title ={ entry .data .title } locale ={ currentLocale } />
@@ -243,9 +249,9 @@ const seenParams: Record<string, true> = {};
243
249
entry .data .file && entry .data .line && (
244
250
<div class = " my-xl" >
245
251
<div class = " text-body [&_a]:text-type-magenta-dark [&_a]:!decoration-type-magenta-dark my-lg" >
246
- Notice any errors or typos? <a href = " https://github.com/processing/p5.js/issues " >Please let us know</a >. Please feel free to edit
252
+ Notice any errors or typos? <a href = { ghIssuesUrl } >Please let us know</a >. Please feel free to edit
247
253
<a
248
- href = { ` https://github.com/processing/p5.js/blob/v${ p5Version }/${entry .data .file }#L${entry .data .line }` }
254
+ href = { ` ${ ghSourceCodeUrl }/${entry .data .file }#L${entry .data .line }` }
249
255
>
250
256
{ entry .data .file }
251
257
</a >
0 commit comments