diff --git a/docs-site/public/_redirects b/docs-site/public/_redirects index aa10399..72bf040 100644 --- a/docs-site/public/_redirects +++ b/docs-site/public/_redirects @@ -1,28 +1,11 @@ -# Cloudflare Pages rewrites for the static docs demo SPA. -# Keep these scoped to app routes so runtime JS/CSS/assets are served directly. -/demo /demo/index.html 200 -/demo/ /demo/index.html 200 -/demo/app /demo/index.html 200 -/demo/app/ /demo/index.html 200 -/demo/runtime /demo/runtime/app.html 200 -/demo/runtime/ /demo/runtime/app.html 200 -/demo/runtime/app /demo/runtime/app.html 200 -/demo/runtime/app/ /demo/runtime/app.html 200 -/demo/runtime/home /demo/runtime/app.html 200 -/demo/runtime/home/* /demo/runtime/app.html 200 -/demo/runtime/install /demo/runtime/app.html 200 -/demo/runtime/install/* /demo/runtime/app.html 200 -/demo/runtime/trial /demo/runtime/app.html 200 -/demo/runtime/trial/* /demo/runtime/app.html 200 -/demo/runtime/invite /demo/runtime/app.html 200 -/demo/runtime/invite/* /demo/runtime/app.html 200 -/demo/runtime/devices /demo/runtime/app.html 200 -/demo/runtime/devices/* /demo/runtime/app.html 200 -/demo/runtime/support /demo/runtime/app.html 200 -/demo/runtime/support/* /demo/runtime/app.html 200 -/demo/runtime/settings /demo/runtime/app.html 200 -/demo/runtime/settings/* /demo/runtime/app.html 200 -/demo/runtime/login /demo/runtime/app.html 200 -/demo/runtime/login/* /demo/runtime/app.html 200 -/demo/runtime/admin /demo/runtime/app.html 200 -/demo/runtime/admin/* /demo/runtime/app.html 200 +# Cloudflare Pages rewrites for non-materialized static docs demo runtime routes. +# Use the directory entrypoint so Pages clean URLs do not loop between app.html and app. +/demo/runtime/home/* /demo/runtime/app/ 200 +/demo/runtime/install/* /demo/runtime/app/ 200 +/demo/runtime/trial/* /demo/runtime/app/ 200 +/demo/runtime/invite/* /demo/runtime/app/ 200 +/demo/runtime/devices/* /demo/runtime/app/ 200 +/demo/runtime/support/* /demo/runtime/app/ 200 +/demo/runtime/settings/* /demo/runtime/app/ 200 +/demo/runtime/login/* /demo/runtime/app/ 200 +/demo/runtime/admin/* /demo/runtime/app/ 200 diff --git a/docs-site/public/demo/demo-shell.js b/docs-site/public/demo/demo-shell.js index 4ebc541..a6f3a27 100644 --- a/docs-site/public/demo/demo-shell.js +++ b/docs-site/public/demo/demo-shell.js @@ -138,7 +138,7 @@ params.delete("path"); params.delete("screen"); params.delete("admin_section"); params.set("path", initialRoute); -frame.src = `${runtimeBase}/app.html?${params.toString()}${window.location.hash || ""}`; +frame.src = `${runtimeBase}/app/?${params.toString()}${window.location.hash || ""}`; const routeFromRuntimeUrl = (url) => { if (url.origin !== window.location.origin) return ""; @@ -162,7 +162,7 @@ const runtimeSrc = (route, searchParams = new URLSearchParams()) => { nextParams.delete("screen"); nextParams.delete("admin_section"); nextParams.set("path", normalizePath(route)); - return `${runtimeBase}/app.html?${nextParams.toString()}${window.location.hash || ""}`; + return `${runtimeBase}/app/?${nextParams.toString()}${window.location.hash || ""}`; }; const topbar = document.querySelector(".demo-topbar"); const toggle = document.querySelector(".demo-topbar__toggle"); diff --git a/docs-site/src/pages/demo.astro b/docs-site/src/pages/demo.astro index 6cb8af1..e091b11 100644 --- a/docs-site/src/pages/demo.astro +++ b/docs-site/src/pages/demo.astro @@ -1,5 +1,5 @@ --- -const defaultDemoSrc = '/demo/runtime/app.html?path=/home&mock=tariffs'; +const defaultDemoSrc = '/demo/runtime/app/?path=/home&mock=tariffs'; const docsHref = '/getting-started/demo/'; ---