Merge branch 'main' into documentation

This commit is contained in:
scrappy_fiddler 2026-01-11 12:18:42 +01:00
commit 20ea2980a2
4 changed files with 7 additions and 5 deletions

View file

@ -103,8 +103,10 @@ export async function renderPatternAudio(
} }
export function webaudioRepl(options = {}) { export function webaudioRepl(options = {}) {
const audioContext = options.audioContext ?? getAudioContext();
setAudioContext(audioContext);
options = { options = {
getTime: () => getAudioContext().currentTime, getTime: () => audioContext.currentTime,
defaultOutput: webaudioOutput, defaultOutput: webaudioOutput,
...options, ...options,
}; };

View file

@ -10,8 +10,8 @@ import bundleAudioWorkletPlugin from 'vite-plugin-bundle-audioworklet';
import tailwind from '@astrojs/tailwind'; import tailwind from '@astrojs/tailwind';
import AstroPWA from '@vite-pwa/astro'; import AstroPWA from '@vite-pwa/astro';
const site = `https://strudel.cc/`; // root url without a path const site = process.env.STRUDEL_SITE || `https://strudel.cc/`; // root url without a path
const base = '/'; // base path of the strudel site const base = process.env.STRUDEL_BASE || '/'; // base path of the strudel site
const baseNoTrailing = base.endsWith('/') ? base.slice(0, -1) : base; const baseNoTrailing = base.endsWith('/') ? base.slice(0, -1) : base;
// this rehype plugin fixes relative links // this rehype plugin fixes relative links

View file

@ -25,7 +25,7 @@ const baseNoTrailing = BASE_URL.endsWith('/') ? BASE_URL.slice(0, -1) : BASE_URL
<base href={BASE_URL} /> <base href={BASE_URL} />
<!-- Scrollable a11y code helper --> <!-- Scrollable a11y code helper -->
<script {`${baseNoTrailing}/make-scrollable-code-focusable.js`} is:inline></script> <script src={`${baseNoTrailing}/make-scrollable-code-focusable.js`} is:inline></script>
<script src="/src/pwa.ts"></script> <script src="/src/pwa.ts"></script>
<!-- this does not work for some reason: --> <!-- this does not work for some reason: -->

View file

@ -24,7 +24,7 @@ const baseNoTrailing = BASE_URL.endsWith('/') ? BASE_URL.slice(0, -1) : BASE_URL
<base href={BASE_URL} /> <base href={BASE_URL} />
<!-- Scrollable a11y code helper --> <!-- Scrollable a11y code helper -->
<script src{`${baseNoTrailing}/make-scrollable-code-focusable.js`} is:inline></script> <script src={`${baseNoTrailing}/make-scrollable-code-focusable.js`} is:inline></script>
<script src="/src/pwa.ts"></script> <script src="/src/pwa.ts"></script>
<!-- this does not work for some reason: --> <!-- this does not work for some reason: -->