Files
chuan 70d6712d00 feat: add CSS styles for theme preview and implement template overrides
- Introduced a new CSS file for styling the theme preview.
- Updated build script to copy template files to the output directory.
- Created a new script for serving the preview of the theme.
- Enhanced theme verification to check for required template overrides.
- Added README documentation for template overrides.
- Implemented footer and navbar template overrides to customize Gitea's UI.
2026-05-15 21:29:04 +08:00
..

Gitea Template Overrides

This directory contains optional Gitea template overrides shipped with the theme.

What It Does

base/footer_content.tmpl overrides Gitea's built-in base/footer_content template with an empty template. This removes the default bottom footer block, including:

  • Powered by / version text
  • Theme selector in the footer
  • Language selector in the footer
  • Licenses / API / extra footer links

The override does not replace base/footer.tmpl, so Gitea still renders the closing page structure and imports its JavaScript normally.

base/head_navbar.tmpl overrides Gitea's built-in top navigation template to remove the public help link for signed-out users. The signed-in user menu keeps its help item.

Local Development

The Bun build copies this directory into Gitea's local data directory:

bun run build

The generated local target is:

.gitea-data/gitea/templates/

After changing template files, rebuild and restart Gitea:

bun run build
docker compose -f dev.compose.yaml restart server

Production Usage

Copy this directory's contents into your Gitea custom templates directory.

For the official Docker image, the target path is usually:

/data/gitea/templates/

For this footer override, the final file path should be:

/data/gitea/templates/base/footer_content.tmpl

Then restart Gitea so the template override is loaded.