A drop-in theme that replaces the public front page of a Gitea instance with a modern Bootstrap 5 + Font Awesome experience. Signed-in users see a refreshed quick-action dashboard row, while guests get a marketing-style hero layout with prominent calls to action.
custom/templates/home.tmplβ overrides the default landing page with a Bootstrap 5 designcustom/templates/custom/header.tmplβ injects Bootstrap, Font Awesome, typography, and inlined theme stylescustom/templates/custom/body_inner_pre.tmplβ adds a compact promotional banner above the navigation barcustom/templates/custom/footer.tmplβ delivers a multi-column footer with curated resource links
- Gitea 1.18+ (tested against the current
maintemplate structure) - Access to the
custom/directory on your Alpine Linux host (default/var/lib/gitea/customwhen using the official packages)
- Stop Gitea (optional but safest):
sudo rc-service gitea stop
- Copy the theme files:
Adjust the destination path if your
sudo rsync -av custom/ /var/lib/gitea/custom/
APP_DATA_PATHdiffers. - Fix permissions:
Replace
sudo chown -R git:git /var/lib/gitea/custom
git:gitwith the user/group running your Gitea service. - Start or restart Gitea:
sudo rc-service gitea start
- Bust caches (optional but recommended): add or increment
ui.asset_versioninapp.ini, or clear$GITEA_CUSTOM/publiccache if you use a CDN.
- No configuration changes are required, but you can force the refreshed styles to load by setting
ui.use_service_worker = falseif you rely on aggressive caching. - To adjust colors or typography, edit the
<style>block incustom/templates/custom/header.tmpl; Bootstrap utility classes let you rapidly tweak the layout. - The template references Bootstrap and Font Awesome via CDNs. If your installation is air-gapped, replace the CDN URLs with self-hosted copies and drop them in
custom/public.
After copying the files, visit your instance root URL:
- Logged-out visitors should see the hero landing page with CTA buttons, feature highlights and the install checklist.
- Logged-in users should see the "Welcome back" dashboard card with quick action buttons.
- The top navigation bar should render with the glassmorphism background and rounded menu pills, with the announcement banner above it.
- The footer should show the new three-column resource section followed by the standard Gitea footer.
- Styles didn't update β Make sure
custom/templates/custom/header.tmplcopied correctly and bumpui.asset_versioninapp.inito invalidate the service worker cache. - CDN blocked or SRI mismatch β If the environment strips query params or modifies assets, host Bootstrap and Font Awesome locally inside
custom/public/vendor/and update the links incustom/templates/custom/header.tmpl(remove theintegrityattribute when serving self-hosted copies). - Navbar dropdown hidden behind content β Ensure you're using the latest
custom/templates/custom/header.tmpl; it sets a higherz-indexfor Gitea's dropdown menus so they stack above repository cards.
To revert to the stock appearance, delete the overrides:
sudo rm -rf /var/lib/gitea/custom/templates/home.tmpl \
/var/lib/gitea/custom/templates/custom/header.tmpl \
/var/lib/gitea/custom/templates/custom/body_inner_pre.tmpl \
/var/lib/gitea/custom/templates/custom/footer.tmplThen restart Gitea.
Happy theming! π¨
