diff --git a/src/layouts/ReferenceItemLayout.astro b/src/layouts/ReferenceItemLayout.astro index 1be268ff42..e89fe36d5c 100644 --- a/src/layouts/ReferenceItemLayout.astro +++ b/src/layouts/ReferenceItemLayout.astro @@ -18,7 +18,7 @@ import type { ReferenceParam, } from "@/types/parsers.interface"; import { setJumpToState } from "../globals/state"; -import { p5Version } from "../globals/p5-version"; +import { p5Version, p5SoundVersion } from "../globals/p5-version"; import flask from "@src/content/ui/images/icons/flask.svg?raw"; const { entry, relatedEntries } = Astro.props; @@ -76,6 +76,12 @@ const relatedReferences = [ const seenParams: Record = {}; +const isSoundModule = entry.data.module === "p5.sound" +const ghSourceRepo = isSoundModule ? "p5.sound.js" : "p5.js" +const ghVersion = isSoundModule ? p5SoundVersion : p5Version +const ghIssuesUrl = `https://github.com/processing/${ghSourceRepo}/issues` +const ghSourceCodeUrl = `https://github.com/processing/${ghSourceRepo}/blob/v${ghVersion}` + --- @@ -243,9 +249,9 @@ const seenParams: Record = {}; entry.data.file && entry.data.line &&(
- Notice any errors or typos? Please let us know. Please feel free to edit + Notice any errors or typos? Please let us know. Please feel free to edit {entry.data.file}