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

Commit e00fbbc

Browse files
authored
Update customizing-gitea.en-us.md
1 parent 7ee0103 commit e00fbbc

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

content/doc/advanced/customizing-gitea.en-us.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
date: "2017-01-20T16:00:00+02:00"
2+
date: "2017-04-15T14:56:00+02:00"
33
title: "Customizing Gitea"
44
slug: "customizing-gitea"
55
weight: 9
@@ -17,14 +17,32 @@ menu:
1717

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

20+
If you installed Gitea from binary, you can find the `custom` folder next to the binary.
21+
You should already find it, with a `conf` folder inside, where Gitea stores all the configuration settings provided through the installation steps.
22+
2023
## Customizing /robots.txt
2124

22-
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`.
25+
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/).
26+
27+
**Note** that you have to restart Gitea for it to notice the new `robots.txt`.
2328

2429
## Serving custom public files
2530

26-
To make Gitea serve custom public files (like pages and images), use the folder `custom/public/` as the webroot. Symbolic links will be followed
31+
To make Gitea serve custom public files (like pages and images), use the folder `custom/public/` as the webroot. Symbolic links will be followed.
32+
33+
For example, a file `image.png` stored in `custom/public`, can be accessed with the url `http://your-gitea-url/image.png`.
2734

2835
## Changing the default avatar
2936

3037
Place the png image at the following path: `custom/public/img/avatar_default.png`
38+
39+
## Customizing Gitea pages
40+
41+
The `custom/templates` folder allows you to change every single page of Gitea.
42+
43+
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.
44+
45+
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.
46+
47+
You can now customize the template you copied in `custom/templates`, being carefully to not break the Gitea syntax.
48+
Any statement contained inside `{{` and `}}` are Gitea templete's syntax and shouldn't be touch, unless you know what are you doing.

0 commit comments

Comments
 (0)