Repository navigation
Measure a real export before shipping, and title a one page site properly - #434
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Fixes #417, and fixes a regression it found on its first run.
npm run check:export -- --slug weftexports that template through the running app, serves the result as a plain folder the way anybody hosts it, runs Lighthouse against that, and exits non-zero under 95 performance or 100 accessibility. Numbers in the README and anywhere else now come from a command rather than from memory.Measured today, four templates: kept, aurabeauty, weft and orbitcrm each score 100 performance, 100 accessibility, 100 SEO, 96 best practices. Asking for 101 performance makes it exit 1 and say why, and an unknown template name exits 1 rather than measuring something else.
The export route now accepts
template: "<slug>"and fills in that template's sections, theme, style, name and description, with anything sent alongside winning. The editor does not need it; the gate and the plugin do.The regression: since #426 every single page export has been titling the browser tab and the share card "Home" instead of the site's name. The page list calls its first entry Home, which is right in a nav beside About and Contact and wrong on a site with no other page. Writing a test for the template export is what surfaced it. Both cases are pinned now, and the multi-page titles are unchanged.
One mistake worth recording, because it cost the first run: the script used spawnSync for Lighthouse, which blocks this process's event loop, so the server it had just started could not answer a single request and Chrome died with "Target closed" against a server that was listening and deaf. It spawns asynchronously now, and a test fails if that comes back.
tsc and eslint clean, vitest 716 of 716.