feat(docs-site): render card icons from lucide with legacy name aliases#96
Merged
Conversation
Docs author icons with lucide names plus a long tail of Font Awesome-style names; the shell only knew 9 hand-drawn paths, so most cards rendered the generic fallback tile. Resolve icons from the lucide package at build time, map legacy names through ICON_ALIASES, and keep the fallback for unknown names. All 165 icon names currently used in docs/ resolve.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
Author
|
Landing note on the red
|
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.
Related: openclaw/openclaw#102878
What Problem This Solves
Docs author card icons with lucide names plus a long tail of Font Awesome-style names (165 distinct
icon="..."values in the current corpus), but the shell renderer only knew 9 hand-drawn paths. Every other name — including most of the landing page's "Key capabilities", "Start here", and "Learn more" grids — rendered the same generic fallback tile.Why This Change Was Made
Resolve card/tile/CTA icons from the
lucidepackage (build-time devDependency, exact-pinned, ISC) instead of a hand-maintained path table, matchingdocs.json'sicons.library: "lucide"used by the Mintlify backup. Legacy Font Awesome-style names map through a smallICON_ALIASEStable (gear->settings,magnifying-glass->search, ...); unknown names keep the generic fallback so a typo never breaks a build. The 9 curated paths are deleted — one icon system now owns the look.User Impact
Card grids across the docs show real, distinct icons instead of repeated fallback tiles. This also unblocks the landing-page redesign (openclaw/openclaw#102880: new hero + fourth "Connect a Channel" card using
message-circle).Evidence
Landing page "Key capabilities" grid, production vs local shell preview build:
docs/**resolve via alias+lucide (temp script over the corpus; onlyslackneeded a judgment call ->hash, lucide ships no brand marks).make docs-check-shellpasses (shell build + smoke: shell, routing, skin, hidden fixture).node --test scripts/docs-site/frontmatter.test.mjspasses.lucide@1.24.0addition.