add simple local sample serving

This commit is contained in:
Felix Roos 2024-03-30 01:48:07 +01:00
parent 1e8a3c2918
commit 39204ad94d
4 changed files with 301 additions and 7 deletions

View file

@ -194,6 +194,9 @@ export const samples = async (sampleMap, baseUrl = sampleMap._base || '', option
if (sampleMap.startsWith('github:')) {
sampleMap = githubPath(sampleMap, 'strudel.json');
}
if (sampleMap.startsWith('local:')) {
sampleMap = `/strudel.json`;
}
if (sampleMap.startsWith('shabda:')) {
let [_, path] = sampleMap.split('shabda:');
sampleMap = `https://shabda.ndre.gr/${path}.json?strudel=1`;