feat: /build redirects to missing-elements.github.io/h5p/build/, with its fragment
Closes #17. Also closes #16, which this supersedes: the build page takes the new site's own design, not the player's page.css.
Merge after missing-elements/missing-elements.github.io#8 is deployed, so the redirect never points at a page that isn't there yet.
What changed
build.htmlis now a redirect tohttps://missing-elements.github.io/h5p/build/. It keeps the address's fragment, so a link a chat wrote before,/build#source=…, still builds its source there. A query is dropped, such as the?utm_source=chatgpt.comChatGPT adds. Without JavaScript, a<noscript>refresh goes to the new address without the fragment, and the page links to it. The page isnoindexwith a canonical link. Its inline script is allowed by hash, which the existing CSP plugin writes.- The page's code and tests go:
src/build-page.ts,src/build-source.ts,src/build.cssande2e/build.spec.ts. They live on in the new site, unchanged except the stylesheet. /bundles/stays until the next library pack release, for copies of the h5p-author skill installed before the move. The plugin's comment and the README say when it goes and what goes with it: the plugin, its test and the@missing-elements/h5p-authordependency.- README:
/buildis described as the redirect, with a short "The build page moved" section, and the bundles section has its end date.
Tests
The new e2e/build-redirect.spec.ts answers the other site with a stand-in page and checks where the browser goes:
/build#source=…arrives at…/h5p/build/#source=…, with and without a query;- bare
/buildarrives at…/h5p/build/; - with JavaScript off,
/buildstill arrives there.
All 10 tests pass locally: the player page's, the bundles' and these. Mutation check: a redirect that drops location.hash fails the first test, and it passes again once the line is restored.
Summary by cubic
/build now redirects to the build page's new home at missing-elements.github.io/h5p/build, closing #17 and superseding #16. With JavaScript, the redirect keeps the address's fragment, so old /build#source=… links still build their source there; a query is dropped. Without JavaScript, a <noscript> refresh goes to the new address without the fragment.
- The build page's code, styles and tests move to the new site;
/bundles/stays until the next library pack release, for skill copies installed before the move, then goes with its plugin, test and the@missing-elements/h5p-authordependency. - New e2e tests verify the redirect keeps the fragment with JavaScript and still lands on the new address without it, with no console or policy errors.
- Merge after missing-elements/missing-elements.github.io#8 is deployed, so the redirect never points at a missing page.