File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 7777 cp -r website/out/* _site/
7878 mkdir -p _site/playground
7979 cp -r playground/dist/* _site/playground/
80- # SPA fallback — serve index.html for all playground routes
81- cp _site/playground/index.html _site/playground/404.html
80+ # SPA fallback for playground routes
81+ # GitHub Pages only checks root 404.html, so use a redirect
82+ cat > _site/404.html << 'FOUROHFOUR'
83+ <!DOCTYPE html><html><head><meta charset="utf-8"><script>
84+ var p = window.location.pathname;
85+ if (p.startsWith('/gnata-sqlite/playground')) {
86+ var base = '/gnata-sqlite/playground/';
87+ var route = p.slice(base.length);
88+ window.location.replace(base + '?route=' + encodeURIComponent(route) + window.location.hash);
89+ }
90+ </script></head><body></body></html>
91+ FOUROHFOUR
8292
8393 - uses : actions/upload-pages-artifact@v3
8494
You can’t perform that action at this time.
0 commit comments