Repository navigation
Pages: an index of every demo, each at its own path - #56
Merged
Merged
Conversation
The site root was the mandelbrot demo, microgpt sat at /microgpt/, and pathtrace and ptcanvas weren't deployed at all. - build-pages.sh builds mandelbrot, pathtrace and ptcanvas into /<demo>/, each with its own COI service worker, next to /microgpt/. - site/index.html is a static index: a screenshot tile per demo (site/img/, captured from these builds), plus mandelbrot-aot as a native tile linking to its source. Old root links with a query (?x=…&zoom=…) redirect to mandelbrot/. The root keeps a copy of coi-serviceworker.js for browsers that registered it there. - test/pages_site_test.py serves the site header-free under a project subpath and checks the index (images, links, layout, redirect) and that every demo isolates through its own service worker and boots without page errors. The Pages workflow runs it before deploying and now also builds and tests on pull requests, without deploying them. - README, CLAUDE.md and the microgpt README point at the new paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The site root was the mandelbrot demo, microgpt sat at
/microgpt/, and pathtrace and ptcanvas weren't deployed. This adds an index page with a screenshot tile per demo and deploys every browser demo at its own path.Site layout
/is a static index (site/index.html): a large mandelbrot tile, then pathtrace, ptcanvas, microgpt, mandelbrot-aot (native, links to its source), and a short "run it locally / source" tile. It's a dark grid that collapses to one column on phones./mandelbrot/,/pathtrace/,/ptcanvas/and/microgpt/each hold the single-file demo and their owncoi-serviceworker.js.?x=…&zoom=…) redirect tomandelbrot/, so existing start-view links keep working. A bare root link now opens the index.coi-serviceworker.js, so browsers that registered it when mandelbrot lived there keep a valid script.Screenshots (
site/img/, about 480 KB in total) were captured from these builds with let-go v1.13.0 in headless Chromium:?x=-0.743643&y=0.131825&zoom=250&maxiter=384;mandelbrot-aot-zoom.gif.Checks
test/pages_site_test.pyserves_siteheader-free under/let-go-lab/. It checks that the index's images load, its local links resolve, it doesn't overflow at 1280 or 390px, and the redirect works. It also checks that every demo becomes cross-origin isolated through its own service worker and boots without page errors.pages.ymlruns that test before deploying, and now also runs the build and the test on pull requests, without deploying them.bash -npasses onbuild-pages.sh; shellcheck isn't installed here.Adding a browser demo now means adding it to
DEMOSinbuild-pages.shandtest/pages_site_test.py, plus a tile insite/index.html(noted in CLAUDE.md).🤖 Generated with Claude Code