Why it was done this way
MokoGIT is a rebrand of Gitea, and Gitea's entire UI is drawn with GitHub's Primer Octicons. Renaming every icon reference across hundreds of templates, Go helpers, and frontend modules would have been enormous and error-prone - and some icon names are only ever produced at runtime by string-formatting octicon-%s, so they cannot be found by a static search at all. Rather than rename anything, the migration uses Strategy A: a build-layer alias. The stable octicon-* names and the svg octicon-<name> CSS classes stay in place, and only the contents of each icon sprite are swapped to the Font Awesome equivalent. Every call site, every CSS geometry rule, and every runtime-formatted name keeps working untouched.
The result is a forge that reads as MokoGIT rather than GitHub, without a sweeping and risky code change. It is part of the same debrand effort that sets the MokoGIT navy theme color (#112855), the MokoGIT default logo and favicon assets, and the MokoGIT web app manifest.
How the icon bake works
Icons are generated at build time by a single tool (tools/generate-svg.ts, run by make svg) that writes one optimized SVG per icon into the asset directory. It runs in two passes, and the order matters:
- Baseline pass. Every Primer Octicon is baked first, producing
octicon-<name>.svgfor the full icon set. Alongside them, the tool bakes the customgitea-*glyphs and vendor logos, the MokoGIT brand mark (from a single master SVG), and the Material file-type icons. - Font Awesome overlay pass. After the baseline, the tool reads a curated map (
tools/octicon-fa-map.json) of UI octicons to their verified Font Awesome Free equivalents and re-generates each mappedocticon-<name>.svgfrom the Font Awesome glyph - keeping the octicon name and thesvg octicon-<name>classes. Because this pass runs after the baseline, the Font Awesome glyph wins for every mapped name.
Each generated SVG is optimized the same way (dimensions stripped, titles removed, ids prefixed, the svg and name classes added, and a 16x16 default size and aria-hidden attribute set), so a Font Awesome glyph and a Primer glyph are interchangeable at the markup and CSS level. The front end simply looks an icon up by name and renders the baked SVG string.
What maps, and what deliberately does not
The map covers the common UI icon vocabulary - navigation, Git actions, editor controls, status markers, and so on. A few representative entries: octicon-gear resolves to Font Awesome gear, octicon-repo to book, octicon-git-branch to code-branch, octicon-git-pull-request to code-pull-request, octicon-search to magnifying-glass, octicon-x to xmark, and octicon-mark-github to the Font Awesome brands github glyph. Most entries come from the Font Awesome solid family; a small number (brand marks) come from brands.
Some icons are intentionally left as Primer Octicons:
- Unmapped octicons - any name not in the map (for example a webhook glyph) keeps the Primer baseline. The overlay only ever replaces mapped names.
- Runtime-formatted names - icons reached only through a formatted
octicon-%sstring at run time are not statically known, so unless they happen to be mapped they fall back to the Primer baseline. This is exactly why the baseline pass bakes the full Primer set: it guarantees a glyph exists for every possible name. - Vendor and brand sprites - the
gitea-*custom glyphs, login-provider logos, package-registry marks, and Material file-type icons are not remapped, because Font Awesome has no equivalent for that vendor set. The MokoGIT brand mark remains its own single master SVG.
The wider debrand context
The icon migration ships alongside the rest of the MokoGIT visual identity:
- Navy theme color. The MokoGIT brand primary is navy
#112855, applied through the theme tokens so UI accents and the installed-app theme color match the brand. - Default assets and manifest. MokoGIT ships its own default logo, favicon, and PWA app icons, and its own web app manifest, so a fresh instance already presents as MokoGIT rather than Gitea.
- One-SVG brand generator. An instance administrator can replace the brand mark from a single master SVG and have MokoGIT regenerate the favicon, navbar icon, webhook icon, and PWA raster sizes from it.
For administrators and developers
For most people running or using a MokoGIT instance, there is nothing to do - the icons simply look like Font Awesome and match the MokoGIT brand. If you build MokoGIT from source or write custom templates:
- Keep calling icons by their
octicon-*names. That is the stable contract; do not rename them tofa-*. - To change which Font Awesome glyph an icon resolves to, edit the entry in
tools/octicon-fa-map.jsonand rebuild the SVGs (make svg). Removing an entry reverts that icon to its Primer baseline. - The build fails its icon check if the committed SVGs drift from what the generator produces, so a map change must be accompanied by a rebuild and commit of the regenerated assets.
Caveats
- Names are the contract, not the glyph. An
octicon-*name may now draw a Font Awesome shape; do not assume the rendered glyph matches GitHub's Octicon of the same name. - Only mapped names change. Unmapped and runtime-only icon names still render the Primer baseline, so the UI is a deliberate mix with Font Awesome winning wherever a verified equivalent exists.
- Vendor logos are untouched. Package-registry, login-provider, and file-type icons stay as their original glyphs because Font Awesome has no replacement for them.
- Rebuild after any map edit. The icon assets are generated artifacts; editing the map without rebuilding and committing the SVGs will fail the frontend check.
Get help
Open a support ticket or call (931) 820-0265.