Give the site a favicon
Check / guardrails (push) Successful in 1m25s
Check / bundle (push) Successful in 1m19s
Image / image (push) Successful in 2m45s
Check / check (push) Successful in 4m49s

The tab has said "Runway" next to a blank page-shaped placeholder since M1.
Two files, both generated from the 1254px source: a multi-resolution `.ico`
at 48, 32 and 16, and a 180px apple-touch-icon.

The source has about 114px of transparent margin on each side, which at 16px
is a pixel and a half of nothing on every edge -- so it is trimmed before
being resized, and re-centred on a square canvas first, because the trimmed
artwork is 1026x1036 and every downsample from it otherwise comes out a pixel
narrower than it is tall. At 32px the plane, the swoosh and the calendar grid
all still read. At 16px the grid flattens to a pale block; that is the
artwork's level of detail rather than the resampling, and 32 is the one most
displays ask for.

They are copied rather than hashed. Trunk renames an icon asset the way it
renames the stylesheet, and these two are the only files in the bundle whose
URL is not ours to choose: Caddy serves the frontend with an `index.html`
fallback, so anything that guesses at `/favicon.ico` rather than reading the
tag -- a bookmark, a feed reader, a browser with no page loaded -- would get
the page's HTML with a 200. That renders nothing while looking like it
worked, which is the failure mode this repository keeps finding in other
places and is no more welcome here.

The apple-touch-icon is the one that is flattened onto the icon's own blue.
iOS composites a home-screen icon onto black and then applies its own corner
mask, so a rounded square that still has an alpha channel arrives with black
sitting in the corners it had already rounded off.

`assets` joins the `[watch]` list for the reason written above `[watch]`
already: Trunk rebuilds on what it is told to watch, and without it changing
an icon in development changes nothing and the browser keeps serving the
previous one.
This commit is contained in:
2026-09-09 11:40:21 -04:00
parent 50cb77556d
commit 35632a3547
4 changed files with 24 additions and 1 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ command_arguments = [
# silently changes nothing and the browser keeps serving the previous build --
# a very quiet way to lose an hour.
[watch]
watch = ["src", "styles", "index.html", "Cargo.toml"]
watch = ["src", "styles", "assets", "index.html", "Cargo.toml"]
[serve]
port = 8080
Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+23
View File
@@ -4,6 +4,29 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Runway</title>
<!--
`copy-file`, not `rel="icon"`, because Trunk hashes the filename of an
icon asset and these two need to keep the names they are asked for.
Caddy serves this bundle with an `index.html` fallback, so a browser --
or a bookmark, or a feed reader -- that guesses at `/favicon.ico`
instead of reading the tag below gets the page's HTML with a 200 rather
than a 404, and renders nothing while looking like it worked. An
unhashed copy at the root is the only thing that answers that request.
Nothing else in the bundle is stable-named; these are the exception
because the URL is not ours to choose.
-->
<link data-trunk rel="copy-file" href="assets/favicon.ico" />
<link data-trunk rel="copy-file" href="assets/apple-touch-icon.png" />
<link rel="icon" sizes="48x48 32x32 16x16" href="/favicon.ico" />
<!--
Flattened onto the icon's own blue, unlike the `.ico`, which keeps its
transparent corners: iOS composites a home-screen icon onto black and
then applies its own corner mask, so a rounded square with an alpha
channel arrives with black in the corners it already rounded off.
-->
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link data-trunk rel="css" href="styles/generated.css" />
<!--
wasm-opt needs telling that bulk-memory instructions are allowed. The