Skip to content

fix(book): use fa-github so the header icon actually renders#28

Merged
odysa merged 2 commits into
mainfrom
fix/book-github-icon
Apr 22, 2026
Merged

fix(book): use fa-github so the header icon actually renders#28
odysa merged 2 commits into
mainfrom
fix/book-github-icon

Conversation

@odysa

@odysa odysa commented Apr 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Change git-repository-icon from fab-github to fa-github in both the EN and 中文 book configs so the top-right menu-bar icon actually renders.

Why

mdbook 0.4.52 ships FontAwesome 4.7.0, whose CSS defines .fa-github (glyph \f09b) but has no .fab-* brand classes. With fab-github, the <i id="git-repository-button" class="fa fab-github"> element was emitted into the header but produced no visible glyph — so the repo link was effectively invisible on https://odysa.github.io/mini-claw-code/.

Test plan

  • mdbook build mini-claw-code-book and open book/index.html — GitHub icon visible top-right, links to the repo.
  • mdbook build mini-claw-code-book-zh and open book/index.html — same, on the 中文 build.
  • After deploy, confirm on https://odysa.github.io/mini-claw-code/ and /zh/.

odysa added 2 commits April 21, 2026 23:55
The bundled FontAwesome 4.7.0 CSS defines .fa-github (codepoint f09b)
but has no .fab-* brand classes, so `fab-github` produced an empty
<i> in the top-right menu bar. Switching to `fa-github` renders the
icon as intended on both the EN and 中文 builds.
Adds a small custom.css to both book builds:
- `.right-buttons` becomes a flexbox so the GitHub anchor can be
  ordered before the print anchor via `:has(#git-repository-button)`,
  placing the repo icon as the leftmost item in the right cluster.
- Menu-bar icons (left-buttons + right-buttons) bump to 1.4em for
  better visibility on the deployed site.
@odysa odysa merged commit 02539c5 into main Apr 22, 2026
2 checks passed
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