Skip to content

Add favicons, social card and page metadata - #35

Merged
itsdangold merged 6 commits into
masterfrom
dang/meta
Sep 17, 2026
Merged

itsdangold merged 6 commits into
masterfrom
dang/meta

Conversation

@itsdangold

Copy link
Copy Markdown
Contributor

Before

No metadata at all. No description, no icons, no social tags — a shared link
rendered as a bare URL, and the tab showed the browser's blank-document icon.

After

Social card: the Sentry logo over a pixelated Earth rising out of a starfield, with a LIVE indicator

Favicon: the Sentry mark on a 32x32 pixel grid, black on neon green

Title Sentry Live
Description Sentry telemetry command center
Social full og: and twitter: set, summary_large_image, 1200×630 card
Icons SVG, .ico (16/32/48), Apple touch, 192/512, maskable 512
Manifest site.webmanifest

Eleven files in public/, 260 KB, of which the card is 245 KB. Verified through
npm run build into static/.

Both images are generated rather than mocked up. The mark is derived from
Sentry Logo.svg by rasterising the path and sampling it onto a 32×32 grid; the
card composites a captured globe plate, a separate star plate and the lockup.
The scripts live in tools/, which is not served, shipped or run at build time
— see tools/README.md for what each one does and the
four separate guards that keep it out of production.

build-icons.mjs writes the whole icon set from one grid. That grid is derived
from Sentry Logo.svg rather than drawn: the path rasterised at 1024px, cropped
to its tight bounding box, and box-sampled into 32 square cells.

Sizes 32 and up scale it by whole numbers so the pixels stay square. Below 32 a
32-cell grid cannot have whole-number cells at all, so the same mark is rendered
at 16x and averaged down rather than replaced with a simpler drawing.

png.mjs is a dependency-free PNG encoder/decoder and .ico packer, so the repo
can write image files without taking on a dependency.
Nine files: the SVG every current browser picks, an .ico carrying 16/32/48
rasters for the rest, and PNGs for iOS and the manifest. Black mark on #51ff00.

icon-maskable-512 is a separate render at 56% fill. Android crops a maskable
icon to whatever shape the launcher wants and only the middle 80% of the width
is guaranteed to survive, so reusing the normal 512 would clip the arch feet.

Generated by: node tools/build-icons.mjs --ink '#000000' --bg '#51ff00'
og.html composites the card rather than screenshotting it. The app fits the
planet to the viewport, so the card's framing -- a lot of sky above a distinctly
curved horizon -- is not a camera the app can be put into. Scaling a captured
disc into position is the only way to set the globe's radius and its crest
independently.

That is why plates/ holds two kinds of image. plates/globe/*.png is the planet
alone on the page ground; plates/stars.png is the star field alone. Baking them
together and scaling would shrink the stars along with the globe and leave a
denser, finer patch of sky wherever the disc landed.

brand/lockup.png is the Sentry lockup, supplied as artwork and drawn over the
top. The header comment has the recipe for retaking the plates, including why
cloud opacity and star count both have to be tuned away from their defaults.
1200x630, and the only image the metadata declares. Versioned in its filename
because scrapers cache the old image indefinitely and a query string does not
reliably bust them.
The page carried none at all: no description, no icons, no social tags. Adds the
description, canonical, theme-color, the icon and manifest links, and the full
og: and twitter: set.

og:image is the only image declared -- a second one makes the choice the
scraper's rather than ours -- and its URL is absolute, since a scraper has no
page to resolve a relative one against.
tools/ could not reach production already -- Vite copies only public/, main.go
serves only static/, and the runtime image is FROM scratch with just the binary
and static/ -- but COPY . . was still pulling it into the frontend build stage.
Excluding it trims the build context as well.

Adds tools/README.md covering what each script does and why the card is
composited, and a short section in README.md pointing at it.
@itsdangold
itsdangold merged commit f474d57 into master Sep 17, 2026
9 of 10 checks passed

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1c15715. Configure here.

Comment thread tools/og.html
try {
// Departure Mono is the face the app sets its readouts in; the LIVE marker
// has to wait for it or it lands in the fallback and measures wrong.
await document.fonts.load('400 26px "Departure Mono"');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OG card never loads custom font

Low Severity

document.fonts.load waits on Departure Mono, but og.html never registers that face against /fonts/DepartureMono-Regular.otf. The Font Loading API only loads already-declared faces, so the LIVE label falls back to generic monospace and measureText uses the wrong width.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1c15715. Configure here.

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