feat: embed Font Awesome icons at build time, drop kit stylesheet#414
Open
byte-the-bot wants to merge 4 commits into
Open
feat: embed Font Awesome icons at build time, drop kit stylesheet#414byte-the-bot wants to merge 4 commits into
byte-the-bot wants to merge 4 commits into
Conversation
Replaces the webfont <i class> icons and the render-blocking kit.fontawesome.com stylesheet with compile-time embedded SVGs via font-awesome-embed. Icons inherit text color and size, and the committed .fa-cache/ means CI and Fly builds need no Font Awesome token or network — the token (via .mise.toml + 1Password) is only needed locally when adding a new icon. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Not redistributing Font Awesome SVGs is a design goal of font-awesome-embed, so the committed .fa-cache/ is gone. Instead FONT_AWESOME_TOKEN (Actions secret) feeds the Rust Tests workflow, and Fly deploys pass it as a Docker build secret. The review-app workflow drives flyctl directly since fly-pr-review-apps can't pass build secrets. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collaborator
Author
|
Reworked per Corey's direction: no committed icon cache (avoiding redistribution of FA SVGs is a design goal of the crate). Instead:
|
The Lint job hit FA's rate limit (HTTP 429) because each fa!() expansion did its own token exchange across three parallel jobs. The crate now caches the access token per process and retries transient failures, and FA_CACHE_DIR under target/ lets Swatinem/rust-cache persist fetched icons across CI runs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pre-existing lint newly enforced by stable clippy; unrelated to icons but fails this PR's Lint job. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
byte-the-bot
force-pushed
the
byte/font-awesome-embed
branch
from
July 12, 2026 22:50
80feeaa to
5f49fd9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First consumer of font-awesome-embed 🎉
<i class>tags to compile-time embedded SVGs viafa!()kit.fontawesome.comstylesheet is gone — one less third-party request on every page, and icons render immediately with no font-loading flash.fa-cache/is committed (wired via.cargo/config.tomlFA_CACHE_DIR), so CI, Docker, and Fly review apps build with no token and no network — no workflow changes needed. All cached icons are Free-tier (CC BY 4.0; attribution lives on /legal)FONT_AWESOME_TOKENset locally (the new.mise.tomlpulls it from 1Password viamull secrets), build once, commit the new cache file/legalcolophon updated — icons are no longer loaded via CSS link.fa-svgCSS rule keeps the SVGs inline (Tailwind preflight makes svg block-level)Verified locally: build with token populates the cache, tokenless build + clippy pass from cache alone, cargo-deny bans clean. A Fly review app should spin up on this PR for visual checking — footer socials, /podcast buttons, and any project page are the spots to eyeball.
🤖 Generated with Claude Code