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

Commit fa6bb66

Browse files
authored
Merge pull request #114 from usef/usef-patch-1
Update customizing-gitea.en-us.md
2 parents 260d5a0 + 2814cc3 commit fa6bb66

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

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

Lines changed: 23 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,34 @@ 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 install Gitea from binary, after the installation process ends, you can find the `custom` folder next to the binary.
21+
Gitea will create the folder for you and prepopulate it with a `conf` folder inside, where Gitea stores all the configuration settings provided through the installation steps (have a look [here](https://docs.gitea.io/en-us/config-cheat-sheet/) for a complete list).
22+
23+
If you can't find the `custom` folder next to the binary, please check the `GITEA_CUSTOM` environment variable, that can be used to override the default path to something else. `GITEA_CUSTOM` might be set for example in your launch script file. Please have a look [here](https://docs.gitea.io/en-us/specific-variables/) for a complete list of environment variables.
24+
2025
## Customizing /robots.txt
2126

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

2431
## Serving custom public files
2532

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
33+
To make Gitea serve custom public files (like pages and images), use the folder `custom/public/` as the webroot. Symbolic links will be followed.
34+
35+
For example, a file `image.png` stored in `custom/public`, can be accessed with the url `http://your-gitea-url/image.png`.
2736

2837
## Changing the default avatar
2938

3039
Place the png image at the following path: `custom/public/img/avatar_default.png`
40+
41+
## Customizing Gitea pages
42+
43+
The `custom/templates` folder allows you to change every single page of Gitea.
44+
45+
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.
46+
47+
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.
48+
49+
You can now customize the template you copied in `custom/templates`, being carefully to not break the Gitea syntax.
50+
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)