Merge branch 'main' into documentation
This commit is contained in:
commit
20ea2980a2
4 changed files with 7 additions and 5 deletions
|
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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: -->
|
||||||
|
|
|
||||||
|
|
@ -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: -->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue