({
diff --git a/website/src/pages/swatch/index.astro b/website/src/pages/swatch/index.astro
index e10ebcb78..36088db51 100644
--- a/website/src/pages/swatch/index.astro
+++ b/website/src/pages/swatch/index.astro
@@ -5,6 +5,9 @@ import { Content } from '../../../../my-patterns/README.md';
import HeadCommon from '../../components/HeadCommon.astro';
const myPatterns = await getMyPatterns();
+
+const { BASE_URL } = import.meta.env;
+const baseNoTrailing = BASE_URL.endsWith('/') ? BASE_URL.slice(0, -1) : BASE_URL;
---
@@ -23,12 +26,12 @@ const myPatterns = await getMyPatterns();
Object.entries(myPatterns).map(([name, tune]) => (
{name}
-
+
))
}
diff --git a/website/src/pages/workshop/getting-started.mdx b/website/src/pages/workshop/getting-started.mdx
index 410c6da5c..3d37a5cf7 100644
--- a/website/src/pages/workshop/getting-started.mdx
+++ b/website/src/pages/workshop/getting-started.mdx
@@ -7,7 +7,7 @@ import { MiniRepl } from '../../docs/MiniRepl';
# Welcome
-
+![Strudel Icon](/icons/strudel_icon.png)
Welcome to the Strudel documentation pages!
You've come to the right place if you want to learn how to make music with code.
diff --git a/website/src/repl/Footer.jsx b/website/src/repl/Footer.jsx
index 356250938..cbf0b63b4 100644
--- a/website/src/repl/Footer.jsx
+++ b/website/src/repl/Footer.jsx
@@ -13,6 +13,9 @@ import { FilesTab } from './FilesTab';
const TAURI = window.__TAURI__;
+const { BASE_URL } = import.meta.env;
+const baseNoTrailing = BASE_URL.endsWith('/') ? BASE_URL.slice(0, -1) : BASE_URL;
+
export function Footer({ context }) {
const footerContent = useRef();
const [log, setLog] = useState([]);
@@ -154,7 +157,7 @@ function WelcomeTab() {
To learn more about what this all means, check out the{' '}
-
+
interactive tutorial
. Also feel free to join the{' '}
diff --git a/website/src/repl/Header.jsx b/website/src/repl/Header.jsx
index c78e33270..5e991f8a0 100644
--- a/website/src/repl/Header.jsx
+++ b/website/src/repl/Header.jsx
@@ -9,6 +9,8 @@ import React, { useContext } from 'react';
import { useSettings, setIsZen } from '../settings.mjs';
// import { ReplContext } from './Repl';
import './Repl.css';
+const { BASE_URL } = import.meta.env;
+const baseNoTrailing = BASE_URL.endsWith('/') ? BASE_URL.slice(0, -1) : BASE_URL;
export function Header({ context }) {
const {
@@ -123,7 +125,7 @@ export function Header({ context }) {
{!isEmbedded && (
diff --git a/website/src/repl/prebake.mjs b/website/src/repl/prebake.mjs
index 28678c9d3..74ca00534 100644
--- a/website/src/repl/prebake.mjs
+++ b/website/src/repl/prebake.mjs
@@ -3,6 +3,9 @@ import { registerSynthSounds, registerZZFXSounds, samples } from '@strudel.cycle
import './piano.mjs';
import './files.mjs';
+const { BASE_URL } = import.meta.env;
+const baseNoTrailing = BASE_URL.endsWith('/') ? BASE_URL.slice(0, -1) : BASE_URL;
+
export async function prebake() {
// https://archive.org/details/SalamanderGrandPianoV3
// License: CC-by http://creativecommons.org/licenses/by/3.0/ Author: Alexander Holm
@@ -14,16 +17,16 @@ export async function prebake() {
// => getting "window is not defined", as soon as "@strudel.cycles/soundfonts" is imported statically
// seems to be a problem with soundfont2
import('@strudel.cycles/soundfonts').then(({ registerSoundfonts }) => registerSoundfonts()),
- samples(`./piano.json`, `./piano/`, { prebake: true }),
+ samples(`${baseNoTrailing}/piano.json`, `./piano/`, { prebake: true }),
// https://github.com/sgossner/VCSL/
// https://api.github.com/repositories/126427031/contents/
// LICENSE: CC0 general-purpose
- samples(`./vcsl.json`, 'github:sgossner/VCSL/master/', { prebake: true }),
- samples(`./tidal-drum-machines.json`, 'github:ritchse/tidal-drum-machines/main/machines/', {
+ samples(`${baseNoTrailing}/vcsl.json`, 'github:sgossner/VCSL/master/', { prebake: true }),
+ samples(`${baseNoTrailing}/tidal-drum-machines.json`, 'github:ritchse/tidal-drum-machines/main/machines/', {
prebake: true,
tag: 'drum-machines',
}),
- samples(`./EmuSP12.json`, `./EmuSP12/`, { prebake: true, tag: 'drum-machines' }),
+ samples(`${baseNoTrailing}/EmuSP12.json`, `${baseNoTrailing}/EmuSP12/`, { prebake: true, tag: 'drum-machines' }),
samples(
{
casio: ['casio/high.wav', 'casio/low.wav', 'casio/noise.wav'],