Renders the site's favicons and web manifest from its emoji. The icons task (api/scripts/generate-icons.ts) runs it before the server starts, so the emoji can change without a rebuild.

The glyph comes from Twemoji as plain vector paths, so rendering it needs no emoji font, which the Alpine runtime image lacks.

Functions

f
emojiToCodepoint(emoji: string): string

Returns the name Twemoji files emoji under: its codepoints in hex, joined with "-", without variation selectors (FE0F) unless the emoji is a ZWJ sequence. lib/index-html.ts also uses it as the icon URLs' cache-busting version.

f
generateSiteIcons(opts: GenerateSiteIconsOptions): Promise<void>

Writes favicon.svg, favicon.ico, favicon-<size>x<size>.png (16 to 512), apple-touch-icon.png and manifest.webmanifest into opts.outDir, the directory the site's static files are served from.

Interfaces

I
GenerateSiteIconsOptions

Passed to generateSiteIcons by api/scripts/generate-icons.ts, from the site's config.