From e00fbbc85409ffd524b4ad0bf39d7ee2340da844 Mon Sep 17 00:00:00 2001 From: Yusef Maali Date: Sat, 15 Apr 2017 16:10:39 +0200 Subject: [PATCH 1/4] Update customizing-gitea.en-us.md --- .../doc/advanced/customizing-gitea.en-us.md | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/content/doc/advanced/customizing-gitea.en-us.md b/content/doc/advanced/customizing-gitea.en-us.md index 98b73f8..6bb4ecd 100644 --- a/content/doc/advanced/customizing-gitea.en-us.md +++ b/content/doc/advanced/customizing-gitea.en-us.md @@ -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 @@ -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. + ## 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. From fd78bd5fb82161830e9b1cd0a7cfde9513274c21 Mon Sep 17 00:00:00 2001 From: Yusef Maali Date: Fri, 21 Apr 2017 20:10:03 +0200 Subject: [PATCH 2/4] Update customizing-gitea.en-us.md --- content/doc/advanced/customizing-gitea.en-us.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/doc/advanced/customizing-gitea.en-us.md b/content/doc/advanced/customizing-gitea.en-us.md index 6bb4ecd..03ba9b4 100644 --- a/content/doc/advanced/customizing-gitea.en-us.md +++ b/content/doc/advanced/customizing-gitea.en-us.md @@ -17,8 +17,8 @@ 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. +If you install Gitea from binary, after the installation process ends, you can find the `custom` folder next to the binary. +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 ([give a look here](https://docs.gitea.io/en-us/config-cheat-sheet/) for a complete list. ## Customizing /robots.txt From 2abe9c2ada86860d27ce4b119beb326eb421d803 Mon Sep 17 00:00:00 2001 From: Yusef Maali Date: Fri, 21 Apr 2017 20:14:42 +0200 Subject: [PATCH 3/4] Update customizing-gitea.en-us.md --- content/doc/advanced/customizing-gitea.en-us.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/doc/advanced/customizing-gitea.en-us.md b/content/doc/advanced/customizing-gitea.en-us.md index 03ba9b4..aa2e60d 100644 --- a/content/doc/advanced/customizing-gitea.en-us.md +++ b/content/doc/advanced/customizing-gitea.en-us.md @@ -18,7 +18,7 @@ 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 install Gitea from binary, after the installation process ends, you can find the `custom` folder next to the binary. -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 ([give a look here](https://docs.gitea.io/en-us/config-cheat-sheet/) for a complete list. +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 ([give a look here](https://docs.gitea.io/en-us/config-cheat-sheet/) for a complete list). ## Customizing /robots.txt From 2814cc38855545d8cf52192380e3b12f81c2d0d7 Mon Sep 17 00:00:00 2001 From: Yusef Maali Date: Fri, 21 Apr 2017 23:47:33 +0200 Subject: [PATCH 4/4] Update customizing-gitea.en-us.md --- content/doc/advanced/customizing-gitea.en-us.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/doc/advanced/customizing-gitea.en-us.md b/content/doc/advanced/customizing-gitea.en-us.md index aa2e60d..d330ecb 100644 --- a/content/doc/advanced/customizing-gitea.en-us.md +++ b/content/doc/advanced/customizing-gitea.en-us.md @@ -18,7 +18,9 @@ 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 install Gitea from binary, after the installation process ends, you can find the `custom` folder next to the binary. -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 ([give a look here](https://docs.gitea.io/en-us/config-cheat-sheet/) for a complete list). +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). + +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. ## Customizing /robots.txt