Skip to content

feat(seo): og-image with real wordmark + single-clone rule#35

Merged
miquelmatoses merged 1 commit into
mainfrom
feat/og-image-real-logo
May 23, 2026
Merged

feat(seo): og-image with real wordmark + single-clone rule#35
miquelmatoses merged 1 commit into
mainfrom
feat/og-image-real-logo

Conversation

@miquelmatoses
Copy link
Copy Markdown
Collaborator

og-image

Replaces the Pillow-rendered og-image (which spelled the brand Cercol without the accent and used a plain typeface) with one built from the canonical wordmark SVG that the website header ships.

  • New src/assets/brand/cercol-wordmark.svg is a 1:1 copy of the paths in src/components/CercolLogo.jsx. The React component stays the runtime source of truth; this file is the asset-pipeline copy.
  • scripts/generate_og_image.mjs composes a 1200x630 SVG (blue <rect> + nested wordmark with color=#ffffff) and rasters it with @resvg/resvg-js. Reproducible: node scripts/generate_og_image.mjs.
  • The old Pillow Python script is removed; no other caller referenced it.

Pixel-sampled verification on the new output: corners and centre between letters are brand blue (0, 71, 186), letter strokes are white (255, 255, 255), y=315 horizontal scan shows 61 white pixels across the wordmark band, y=400 shows 0 (clean margin below).

CLAUDE.md rule

Rewritten to explain WHY the post-merge git pull rule exists (the worktree pattern silently desynced the operator's canonical clone, hiding files freshly committed on main), and adds the broader rule: do NOT create git worktree checkouts. Work always from the canonical clone at /Users/miquelmatoses/Claude/cercol.

Gates

  • pytest 117 + 21s
  • vitest 204
  • vite build OK

🤖 Generated with Claude Code

Replace the Pillow-rendered og-image (which spelled the brand
"Cercol" without the accent and used a plain typeface) with one
built from the canonical wordmark SVG that the website header
ships. Output is a 1200x630 PNG with brand-blue background
(#0047ba) and white wordmark centred, no claim text.

- src/assets/brand/cercol-wordmark.svg: canonical SVG copy of the
  wordmark paths from src/components/CercolLogo.jsx. The React
  component stays the source of truth at runtime; this file is the
  copy used by the asset pipeline so the OG image cannot drift
  away from the brand.
- scripts/generate_og_image.mjs: composes a 1200x630 SVG (blue
  rect plus nested wordmark with currentColor=#ffffff) and rasters
  it with @resvg/resvg-js. Reproducible: `node scripts/generate_og_image.mjs`.
- scripts/generate_og_image.py: removed. The Pillow output is
  replaced by the resvg one; no other caller referenced it.
- @resvg/resvg-js added as a devDependency.
- public/og-image.png regenerated. New size 15 KB (was 25 KB).

Pixel sampling confirms the layout:
  corner (10, 10)     -> rgb(0, 71, 186)   blue
  corner (1190, 620)  -> rgb(0, 71, 186)   blue
  center (600, 315)   -> rgb(0, 71, 186)   blue   (between letters)
  mid-left (300, 315) -> rgb(255, 255, 255) white (letter stroke)
  y=315 scan: 61 white pixels across the band -> wordmark visible.
  y=400 scan: 0 white pixels                  -> clean margin below.

CLAUDE.md rule rewritten. The previous version said "after every
gh pr merge, run git pull". The new one explains WHY that rule
exists (the worktree pattern caused the operator's canonical clone
to silently lag behind main, hiding files like public/og-image.png
that were freshly committed) and adds the broader rule: do NOT
create `git worktree` checkouts; work always from the canonical
clone at /Users/miquelmatoses/Claude/cercol.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@miquelmatoses miquelmatoses merged commit 4a10443 into main May 23, 2026
7 checks passed
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