Skip to content
This repository was archived by the owner on Dec 2, 2017. It is now read-only.

Update customizing-gitea.en-us.md #114

Merged
merged 4 commits into from
Jun 1, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions content/doc/advanced/customizing-gitea.en-us.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
date: "2017-01-20T16:00:00+02:00"
date: "2017-04-15T14:56:00+02:00"
title: "Customizing Gitea"
slug: "customizing-gitea"
weight: 9
Expand All @@ -17,14 +17,32 @@ menu:

The main way to customize Gitea is by using the `custom` folder. This is the central place to override and configure features.

If you installed Gitea from binary, you can find the `custom` folder next to the binary.
You should already find it, with a `conf` folder inside, where Gitea stores all the configuration settings provided through the installation steps.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which binary contains the custom folder ? Last time I checked he official binary downloads were a single executable file...

## Customizing /robots.txt

To make Gitea serve your own `/robots.txt` (by default, an empty 404 status is served), simply create a file called `robots.txt` in the `custom` folder with the [expected contents](http://www.robotstxt.org/). **Note** that you have to restart Gitea for it to notice the new `robots.txt`.
To make Gitea serve your own `/robots.txt` (by default, an empty 404 status is served), simply create a file called `robots.txt` in the `custom` folder with the [expected contents](http://www.robotstxt.org/).

**Note** that you have to restart Gitea for it to notice the new `robots.txt`.

## Serving custom public files

To make Gitea serve custom public files (like pages and images), use the folder `custom/public/` as the webroot. Symbolic links will be followed
To make Gitea serve custom public files (like pages and images), use the folder `custom/public/` as the webroot. Symbolic links will be followed.

For example, a file `image.png` stored in `custom/public`, can be accessed with the url `http://your-gitea-url/image.png`.

## Changing the default avatar

Place the png image at the following path: `custom/public/img/avatar_default.png`

## Customizing Gitea pages

The `custom/templates` folder allows you to change every single page of Gitea.

You need to be aware of the template you want to change. All templates can be found in the `templates` folder of the Gitea sources.

When you find the correct .tmpl file, you need to copy it in the `custom/templates` folder of your installation, __respecting__ any subfolder you found in the source template.

You can now customize the template you copied in `custom/templates`, being carefully to not break the Gitea syntax.
Any statement contained inside `{{` and `}}` are Gitea templete's syntax and shouldn't be touch, unless you know what are you doing.