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
Copy file name to clipboardExpand all lines: docs/content/doc/advanced/customizing-gitea.en-us.md
+38-2Lines changed: 38 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ Place the png image at the following path: `custom/public/img/avatar\_default.pn
55
55
## Customizing Gitea pages
56
56
57
57
The `custom/templates` folder allows changing every single page of Gitea. Templates
58
-
to override can be found in the `templates` directory of Gitea source. Override by
58
+
to override can be found in the [`templates`](https://github.com/go-gitea/gitea/tree/master/templates) directory of Gitea source. Override by
59
59
making a copy of the file under `custom/templates` using a full path structure
60
60
matching source.
61
61
@@ -96,6 +96,42 @@ Google Analytics, Matomo (previously Piwik), and other analytics services can be
96
96
97
97
Place custom files in corresponding sub-folder under `custom/options`.
98
98
99
+
**NOTE:** The files should not have a file extension, e.g. `Labels` rather than `Labels.txt`
100
+
101
+
### gitignores
102
+
103
+
To add custom .gitignore, add a file with existing [.gitignore rules](https://git-scm.com/docs/gitignore) in it to `custom/options/gitignore`
104
+
105
+
### Labels
106
+
107
+
To add a custom label set, add a file that follows the [label format](https://github.com/go-gitea/gitea/blob/master/options/label/Default) to `custom/options/label`
108
+
`#hex-color label name ; label description`
109
+
110
+
### Licenses
111
+
112
+
To add a custom license, add a file with the license text to `custom/options/license`
113
+
114
+
### Locales
115
+
116
+
Locales are managed via our [crowdin](https://crowdin.com/project/gitea).
117
+
You can override a locale by placing an altered locale file in `custom/options/locale`.
118
+
Gitea's default locale files can be found in the [`options/locale`](https://github.com/go-gitea/gitea/tree/master/options/locale) source folder and these should be used as examples for your changes.
119
+
120
+
To add a completely new locale, as well as placing the file in the above location, you will need to add the new lang and name to the `[i18n]` section in your `app.ini`. Keep in mind that Gitea will use those settings as **overrides**, so if you want to keep the other languages as well you will need to copy/paste the default values and add your own to them.
121
+
122
+
```
123
+
[i18n]
124
+
LANGS = en-US,foo-BAR
125
+
NAMES = English,FooBar
126
+
```
127
+
128
+
Locales may change between versions, so keeping track of your customized locales is highly encouraged.
129
+
130
+
### Readmes
131
+
132
+
To add a custom Readme, add a markdown formatted file (without an `.md` extension) to `custom/options/readme`
133
+
99
134
## Customizing the look of Gitea
100
135
101
-
As of version 1.6.0 Gitea has built-in themes. The two built-in themes are, the default theme `gitea`, and a dark theme `arc-green`. To change the look of your Gitea install change the value of `DEFAULT_THEME` in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini` to another one of the available options.
136
+
As of version 1.6.0 Gitea has built-in themes. The two built-in themes are, the default theme `gitea`, and a dark theme `arc-green`. To change the look of your Gitea install change the value of `DEFAULT_THEME` in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini` to another one of the available options.
137
+
As of version 1.8.0 Gitea also has per-user themes. The list of themes a user can choose from can be configured with the `THEMES` value in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini` (defaults to `gitea` and `arc-green`, light and dark respectively)
Copy file name to clipboardExpand all lines: docs/content/doc/installation/from-binary.en-us.md
+24-4Lines changed: 24 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,9 @@ location. When launched manually, Gitea can be killed using `Ctrl+C`.
44
44
45
45
## Recommended server configuration
46
46
47
+
**NOTE:** Many of the following directories can be configured using [Environment Variables]({{< relref "doc/advanced/specific-variables.en-us.md" >}}) as well!
48
+
Of note, configuring `GITEA_WORK_DIR` will tell Gitea where to base its working directory, as well as ease installation.
49
+
47
50
### Prepare environment
48
51
49
52
Check that git is installed on the server, if it is not install it first.
**NOTE:** If you plan on running Gitea as a Linux service, you can skip this step as the service file allows you to set `WorkingDirectory`. Otherwise, consider setting this environment variable (semi-)permanently so that Gitea consistently uses the correct working directory.
89
+
```
90
+
export GITEA_WORK_DIR=/var/lib/gitea/
91
+
```
92
+
83
93
### Copy gitea binary to global location
84
94
85
95
```
86
96
cp gitea /usr/local/bin/gitea
87
97
```
88
98
89
-
### Create service file to start gitea automatically
99
+
## Running Gitea
100
+
101
+
After the above steps, two options to run Gitea are:
102
+
103
+
### 1. Creating a service file to start Gitea automatically (recommended)
90
104
91
105
See how to create [Linux service]({{< relref "run-as-service-in-ubuntu.en-us.md" >}})
92
106
107
+
### 2. Running from command-line/terminal
108
+
109
+
```
110
+
GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini
111
+
```
112
+
93
113
## Updating to a new version
94
114
95
115
You can update to a new version of gitea by stopping gitea, replacing the binary at `/usr/local/bin/gitea` and restarting the instance.
0 commit comments