Skip to content

Give each colour link its own title and preview - #16

Merged
ericchernuka merged 3 commits into
masterfrom
ec/dial-it-in-seo
Nov 10, 2026
Merged

ericchernuka merged 3 commits into
masterfrom
ec/dial-it-in-seo

Conversation

@ericchernuka

Copy link
Copy Markdown
Owner

Summary

Shared colour links used to unfurl as the home page, because link previews don't run JavaScript. The build now writes a page per link, each with that colour's head.

 vite build
   dist/index.html                 # home: "Huebo: Dial in your colour (HSB/HSV picker)"
+  dist/200.html                   # "Hue 200 and its 64 shades | Huebo"
+  dist/200/62/75.html             # "#4998BF · HSB 200 62 75 | Huebo"
+  …4,680 links in all, via cleanUrls
+  dist/sitemap.xml                # home + 72 hues, no picks

src/picker/page-head.ts decides each page's title, description and canonical link. The plugin in vite.config.ts and the <title> in Picker both use it. ADR-0006 explains why it's done at build time and why picks stay out of the sitemap.

Also in here:

  • The home copy and the share card now say "Dial in your colour" and "Dial it in."
  • New robots.txt, rel=canonical, og:locale and WebApplication JSON-LD.
  • The value on the card now sizes itself to leave room for Copy. A wide value like 255,255,128 used to push Copy onto the next line.

Evidence

  • Before: curl /200/62/75 | grep title gave <title>Huebo</title>, the same for every link.
    After:
    /200/62/75  #4998BF · HSB 200 62 75 | Huebo
    /200        Hue 200 and its 64 shades | Huebo
    /           Huebo: Dial in your colour (HSB/HSV picker)
    
    In the browser, the title follows the dial's stepper and Back.
  • New page-head.test.ts: given a pick, the title leads with the hex. If index.html loses a tag that withHead fills, it throws. The sitemap has 73 URLs and no picks.
  • Before: with RGB 255,255,128, Copy dropped to the next line at 1100, 1024 and 960 wide.
    After: Copy stays beside the value at every size from 600 to 1440 wide. At 960 wide the font is 26px.
  • pnpm check passes, 126 tests.

Merge Danger

Door: two-way

Reverting removes the generated pages. The only lasting effect is anything crawlers or chat apps have already cached.

Blast Radius: routing

cleanUrls changes how Vercel resolves paths. Once the preview deploy is up, check that /200/62/75 serves its own page and that unknown paths still fall through to the app. The value is a little smaller on narrow roomy cards.

Link previews don't run JavaScript, so every shared colour unfurled as the
home page. The build now writes an HTML page per link (4,680 of them) with
that colour's title, description, canonical URL and og tags, all from
src/picker/page-head.ts. The app's <title> comes from the same module.
Vercel serves them through cleanUrls. ADR-0006 has the reasoning.

The home copy now leads with "Dial in your colour" and mentions HSV, since
that's what a lot of people search for. The share card says "Dial it in."
Also adds robots.txt, a sitemap of home and the 72 hues, a canonical link,
og:locale and WebApplication JSON-LD.
The value scaled with the card's width alone, so a wide value like
255,255,128 pushed Copy onto the next line on cards under about 450px.
Its size now leaves room for Copy and the widest value.
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
huebo Ready Ready Preview Nov 10, 2026 3:24am UTC

With cleanUrls, Vercel no longer serves /index.html by that name, so the
catch-all rewrite returned 404 and paths like /red never reached the app's
redirect to hue 60.
@ericchernuka
ericchernuka merged commit cfc80f6 into master Nov 10, 2026
3 checks passed
@ericchernuka
ericchernuka deleted the ec/dial-it-in-seo branch November 12, 2026 04:01

This branch was successfully deployed

1 active deployment
Preview — 23b9e375 Deployed Nov 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant