feat: /build redirects to missing-elements.github.io/h5p/build/, with its fragment

Merged
AL
13h ago
+88-872

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.html is now a redirect to https://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.com ChatGPT adds. Without JavaScript, a <noscript> refresh goes to the new address without the fragment, and the page links to it. The page is noindex with 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.css and e2e/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-author dependency.
  • README: /build is 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 /build arrives at …/h5p/build/;
  • with JavaScript off, /build still 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-author dependency.
  • 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.