diff --git a/src/layouts/ReferenceItemLayout.astro b/src/layouts/ReferenceItemLayout.astro index 70d8b63ede..66c8c6e2d3 100644 --- a/src/layouts/ReferenceItemLayout.astro +++ b/src/layouts/ReferenceItemLayout.astro @@ -25,6 +25,13 @@ import _ from 'lodash'; const { entry, relatedEntries } = Astro.props; const currentLocale = getCurrentLocale(Astro.url.pathname); +const isSound = entry.data.module === "p5.sound"; +const githubRepo = isSound + ? "processing/p5.sound.js" + : "processing/p5.js"; +const githubRef = isSound + ? "main" + : `v${p5Version}`; const examples = parseReferenceExamplesAndMetadata(entry.data.example) // Remove empty lines at the beginning and end of the examples @@ -289,9 +296,9 @@ const descriptionParts = description.split( entry.data.file && entry.data.line &&(