You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 2, 2017. It is now read-only.
Copy file name to clipboardExpand all lines: content/doc/advanced/customizing-gitea.en-us.md
+21-3Lines changed: 21 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
date: "2017-01-20T16:00:00+02:00"
2
+
date: "2017-04-15T14:56:00+02:00"
3
3
title: "Customizing Gitea"
4
4
slug: "customizing-gitea"
5
5
weight: 9
@@ -17,14 +17,32 @@ menu:
17
17
18
18
The main way to customize Gitea is by using the `custom` folder. This is the central place to override and configure features.
19
19
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
+
20
23
## Customizing /robots.txt
21
24
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`.
23
28
24
29
## Serving custom public files
25
30
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`.
27
34
28
35
## Changing the default avatar
29
36
30
37
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