Skip to content

Commit a588e23

Browse files
committed
Switch playground and content links to clean /play routes
1 parent 1809310 commit a588e23

5 files changed

Lines changed: 13 additions & 7 deletions

File tree

scratch_capture_deadlift.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async function capture() {
3434
const page = await browser.newPage({ viewport: { width: 1024, height: 768 } });
3535

3636
console.log("Navigating to Deadlift...");
37-
await page.goto(`${origin}/play.html#doc=deadlift`, { waitUntil: "load" });
37+
await page.goto(`${origin}/play/deadlift`, { waitUntil: "load" });
3838
await page.reload({ waitUntil: "load" });
3939
await page.waitForFunction(() => window.__posecodeViewer?.duration > 0, null, { timeout: 30000 });
4040
await page.waitForTimeout(2000); // let auto-camera settle

scripts/capture-gifs.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ page.on("pageerror", (e) => console.error("[page]", e.message));
6666

6767
for (const t of targets) {
6868
const [w, h] = t.size;
69-
await page.goto(`${origin}/play.html#doc=${t.id}`, { waitUntil: "load" });
69+
await page.goto(`${origin}/play/${t.id}`, { waitUntil: "load" });
7070
await page.reload({ waitUntil: "load" });
7171
await page.waitForFunction(() => window.__posecodeViewer?.duration > 0, null, {
7272
timeout: 60000,

scripts/generate-content-pages.mjs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ async function main() {
8787
const steps = parseSteps(p.source);
8888
const repeat = parseRepeat(p.source);
8989
const name = slugTitle(p.label);
90-
const hash = `#doc=${p.id}`;
9190
const url = `/moves/${p.id}.html`;
9291

9392
const stepsHtml = steps
@@ -129,7 +128,7 @@ async function main() {
129128
that LLMs like ChatGPT, Claude, and Gemini can write to describe human movement as text.
130129
Every joint angle below is hard-clamped to a safe range of motion.</p>
131130
132-
<a class="btn" href="/play.html${hash}">▶ Open ${esc(name)} in the playground →</a>
131+
<a class="btn" href="/play/${p.id}">▶ Open ${esc(name)} in the playground →</a>
133132
134133
<h2>How to do it</h2>
135134
<ol class="steps">
@@ -189,7 +188,7 @@ ${stepsHtml}
189188
<p>Every example in the Posecode library, grouped by practice. Each page shows the phases,
190189
coaching cues, and the exact <code>.posecode</code> source, plus a live 3D playback.
191190
Prefer to search and filter interactively? Use the
192-
<a href="/play.html">playground's movement library</a> instead.</p>
191+
<a href="/play">playground's movement library</a> instead.</p>
193192
${groupsHtml}
194193
`,
195194
});

scripts/lib/shell.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export function pageShell({ title, description, canonicalPath, jsonLd, bodyHtml,
140140
<div class="wrap">
141141
<a class="brand" href="/"><svg class="logo" aria-hidden="true" viewBox="0 0 100 100" width="18" height="18" fill="none"><g stroke="currentColor" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"><path d="M50 34V55"/><path d="M50 35L34 26L23 15"/><path d="M50 35L66 26L77 15"/><path d="M50 54L36 72L28 88"/><path d="M50 54L64 72L72 88"/></g><circle cx="50" cy="20" r="10" fill="currentColor"/></svg> Posecode</a>
142142
<nav class="links" aria-label="Primary">
143-
<a href="/play.html">Playground</a>
143+
<a href="/play">Playground</a>
144144
<a href="/moves/">Movement library</a>
145145
<a href="/spec.html">Language spec</a>
146146
<a href="/llm-guide.html">LLM guide</a>

vercel.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,12 @@
44
"installCommand": "npm install",
55
"buildCommand": "npm run build -w playground",
66
"outputDirectory": "playground/dist",
7-
"rewrites": [{ "source": "/play", "destination": "/play.html" }]
7+
"redirects": [
8+
{ "source": "/index.html", "destination": "/", "permanent": true },
9+
{ "source": "/play.html", "destination": "/play", "permanent": true }
10+
],
11+
"rewrites": [
12+
{ "source": "/play", "destination": "/play.html" },
13+
{ "source": "/play/:movement", "destination": "/play.html" }
14+
]
815
}

0 commit comments

Comments
 (0)