How to Theme Gitea

  1. First check your gitea version

    gitea --version

  2. Open up Github

Go to the branch related to your installed version.

  1. Startup Gitea and you will discover.
    Custom path: /path-to-customization/gitea/custom

  2. This path /path-to-customization/gitea/custom is where you will make all the changes.

Create templates/base directory inside the custom path.

Go to the same directory inside gitea’s github page e.g. https://github.com/go-gitea/gitea/tree/release/v1.9/templates/base

  1. Customizing the header navigation.

Copy from github repo → release/v1.9/templates/base/head_navbar.tmpl

Put it into gitea-custom-path/templates/base/head_navbar.tmpl

Customize as necessary and then just restart you gitea app.

  1. Serving Custom Assets

Create public directory inside gitea-custom-path

If you want to access for example an image inside gitea template. You can create public/img/logo.jpg
Then just refer to the logo inside the template (.tmpl) file with path: /img/logo.jpg.

I hope people find this helpful as I have kept it concise enough.

1 Like