aboutsummaryrefslogtreecommitdiffstats
path: root/cgitrc.5.txt
diff options
context:
space:
mode:
Diffstat (limited to 'cgitrc.5.txt')
-rw-r--r--cgitrc.5.txt244
1 files changed, 177 insertions, 67 deletions
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index fd299ae..4dc383d 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -1,203 +1,269 @@
1CGITRC 1CGITRC(5)
2====== 2========
3 3
4 4
5NAME 5NAME
6---- 6----
7 cgitrc - runtime configuration for cgit 7cgitrc - runtime configuration for cgit
8 8
9 9
10DESCRIPTION 10SYNOPSIS
11----------- 11--------
12Cgitrc contains all runtime settings for cgit, including the list of git 12Cgitrc contains all runtime settings for cgit, including the list of git
13repositories, formatted as a line-separated list of NAME=VALUE pairs. Blank 13repositories, formatted as a line-separated list of NAME=VALUE pairs. Blank
14lines, and lines starting with '#', are ignored. 14lines, and lines starting with '#', are ignored.
15 15
16 16
17LOCATION
18--------
19The default location of cgitrc, defined at compile time, is /etc/cgitrc. At
20runtime, cgit will consult the environment variable CGIT_CONFIG and, if
21defined, use its value instead.
22
23
17GLOBAL SETTINGS 24GLOBAL SETTINGS
18--------------- 25---------------
19agefile 26about-filter::
27 Specifies a command which will be invoked to format the content of
28 about pages (both top-level and for each repository). The command will
29 get the content of the about-file on its STDIN, and the STDOUT from the
30 command will be included verbatim on the about page. Default value:
31 none.
32
33agefile::
20 Specifies a path, relative to each repository path, which can be used 34 Specifies a path, relative to each repository path, which can be used
21 to specify the date and time of the youngest commit in the repository. 35 to specify the date and time of the youngest commit in the repository.
22 The first line in the file is used as input to the "parse_date" 36 The first line in the file is used as input to the "parse_date"
23 function in libgit. Recommended timestamp-format is "yyyy-mm-dd 37 function in libgit. Recommended timestamp-format is "yyyy-mm-dd
24 hh:mm:ss". Default value: "info/web/last-modified". 38 hh:mm:ss". Default value: "info/web/last-modified".
25 39
26cache-root 40cache-root::
27 Path used to store the cgit cache entries. Default value: 41 Path used to store the cgit cache entries. Default value:
28 "/var/cache/cgit". 42 "/var/cache/cgit".
29 43
30cache-dynamic-ttl 44cache-dynamic-ttl::
31 Number which specifies the time-to-live, in minutes, for the cached 45 Number which specifies the time-to-live, in minutes, for the cached
32 version of repository pages accessed without a fixed SHA1. Default 46 version of repository pages accessed without a fixed SHA1. Default
33 value: "5". 47 value: "5".
34 48
35cache-repo-ttl 49cache-repo-ttl::
36 Number which specifies the time-to-live, in minutes, for the cached 50 Number which specifies the time-to-live, in minutes, for the cached
37 version of the repository summary page. Default value: "5". 51 version of the repository summary page. Default value: "5".
38 52
39cache-root-ttl 53cache-root-ttl::
40 Number which specifies the time-to-live, in minutes, for the cached 54 Number which specifies the time-to-live, in minutes, for the cached
41 version of the repository index page. Default value: "5". 55 version of the repository index page. Default value: "5".
42 56
43cache-size 57cache-scanrc-ttl::
58 Number which specifies the time-to-live, in minutes, for the result
59 of scanning a path for git repositories. Default value: "15".
60
61cache-size::
44 The maximum number of entries in the cgit cache. Default value: "0" 62 The maximum number of entries in the cgit cache. Default value: "0"
45 (i.e. caching is disabled). 63 (i.e. caching is disabled).
46 64
47cache-static-ttl 65cache-static-ttl::
48 Number which specifies the time-to-live, in minutes, for the cached 66 Number which specifies the time-to-live, in minutes, for the cached
49 version of repository pages accessed with a fixed SHA1. Default value: 67 version of repository pages accessed with a fixed SHA1. Default value:
50 "5". 68 "5".
51 69
52clone-prefix 70clone-prefix::
53 Space-separated list of common prefixes which, when combined with a 71 Space-separated list of common prefixes which, when combined with a
54 repository url, generates valid clone urls for the repository. This 72 repository url, generates valid clone urls for the repository. This
55 setting is only used if `repo.clone-url` is unspecified. Default value: 73 setting is only used if `repo.clone-url` is unspecified. Default value:
56 none. 74 none.
57 75
58css 76commit-filter::
77 Specifies a command which will be invoked to format commit messages.
78 The command will get the message on its STDIN, and the STDOUT from the
79 command will be included verbatim as the commit message, i.e. this can
80 be used to implement bugtracker integration. Default value: none.
81
82css::
59 Url which specifies the css document to include in all cgit pages. 83 Url which specifies the css document to include in all cgit pages.
60 Default value: "/cgit.css". 84 Default value: "/cgit.css".
61 85
62enable-index-links 86embedded::
87 Flag which, when set to "1", will make cgit generate a html fragment
88 suitable for embedding in other html pages. Default value: none. See
89 also: "noheader".
90
91enable-filter-overrides::
92 Flag which, when set to "1", allows all filter settings to be
93 overridden in repository-specific cgitrc files. Default value: none.
94
95enable-index-links::
63 Flag which, when set to "1", will make cgit generate extra links for 96 Flag which, when set to "1", will make cgit generate extra links for
64 each repo in the repository index (specifically, to the "summary", 97 each repo in the repository index (specifically, to the "summary",
65 "commit" and "tree" pages). Default value: "0". 98 "commit" and "tree" pages). Default value: "0".
66 99
67enable-log-filecount 100enable-log-filecount::
68 Flag which, when set to "1", will make cgit print the number of 101 Flag which, when set to "1", will make cgit print the number of
69 modified files for each commit on the repository log page. Default 102 modified files for each commit on the repository log page. Default
70 value: "0". 103 value: "0".
71 104
72enable-log-linecount 105enable-log-linecount::
73 Flag which, when set to "1", will make cgit print the number of added 106 Flag which, when set to "1", will make cgit print the number of added
74 and removed lines for each commit on the repository log page. Default 107 and removed lines for each commit on the repository log page. Default
75 value: "0". 108 value: "0".
76 109
77favicon 110enable-tree-linenumbers::
111 Flag which, when set to "1", will make cgit generate linenumber links
112 for plaintext blobs printed in the tree view. Default value: "1".
113
114favicon::
78 Url used as link to a shortcut icon for cgit. If specified, it is 115 Url used as link to a shortcut icon for cgit. If specified, it is
79 suggested to use the value "/favicon.ico" since certain browsers will 116 suggested to use the value "/favicon.ico" since certain browsers will
80 ignore other values. Default value: none. 117 ignore other values. Default value: none.
81 118
82footer 119footer::
83 The content of the file specified with this option will be included 120 The content of the file specified with this option will be included
84 verbatim at the bottom of all pages (i.e. it replaces the standard 121 verbatim at the bottom of all pages (i.e. it replaces the standard
85 "generated by..." message. Default value: none. 122 "generated by..." message. Default value: none.
86 123
87header 124head-include::
125 The content of the file specified with this option will be included
126 verbatim in the html HEAD section on all pages. Default value: none.
127
128header::
88 The content of the file specified with this option will be included 129 The content of the file specified with this option will be included
89 verbatim at the top of all pages. Default value: none. 130 verbatim at the top of all pages. Default value: none.
90 131
91include 132include::
92 Name of a configfile to include before the rest of the current config- 133 Name of a configfile to include before the rest of the current config-
93 file is parsed. Default value: none. 134 file is parsed. Default value: none.
94 135
95index-header 136index-header::
96 The content of the file specified with this option will be included 137 The content of the file specified with this option will be included
97 verbatim above the repository index. This setting is deprecated, and 138 verbatim above the repository index. This setting is deprecated, and
98 will not be supported by cgit-1.0 (use root-readme instead). Default 139 will not be supported by cgit-1.0 (use root-readme instead). Default
99 value: none. 140 value: none.
100 141
101index-info 142index-info::
102 The content of the file specified with this option will be included 143 The content of the file specified with this option will be included
103 verbatim below the heading on the repository index page. This setting 144 verbatim below the heading on the repository index page. This setting
104 is deprecated, and will not be supported by cgit-1.0 (use root-desc 145 is deprecated, and will not be supported by cgit-1.0 (use root-desc
105 instead). Default value: none. 146 instead). Default value: none.
106 147
107local-time 148local-time::
108 Flag which, if set to "1", makes cgit print commit and tag times in the 149 Flag which, if set to "1", makes cgit print commit and tag times in the
109 servers timezone. Default value: "0". 150 servers timezone. Default value: "0".
110 151
111logo 152logo::
112 Url which specifies the source of an image which will be used as a logo 153 Url which specifies the source of an image which will be used as a logo
113 on all cgit pages. 154 on all cgit pages. Default value: "/cgit.png".
114 155
115logo-link 156logo-link::
116 Url loaded when clicking on the cgit logo image. If unspecified the 157 Url loaded when clicking on the cgit logo image. If unspecified the
117 calculated url of the repository index page will be used. Default 158 calculated url of the repository index page will be used. Default
118 value: none. 159 value: none.
119 160
120max-commit-count 161max-commit-count::
121 Specifies the number of entries to list per page in "log" view. Default 162 Specifies the number of entries to list per page in "log" view. Default
122 value: "50". 163 value: "50".
123 164
124max-message-length 165max-message-length::
125 Specifies the maximum number of commit message characters to display in 166 Specifies the maximum number of commit message characters to display in
126 "log" view. Default value: "80". 167 "log" view. Default value: "80".
127 168
128max-repo-count 169max-repo-count::
129 Specifies the number of entries to list per page on the repository 170 Specifies the number of entries to list per page on the repository
130 index page. Default value: "50". 171 index page. Default value: "50".
131 172
132max-repodesc-length 173max-repodesc-length::
133 Specifies the maximum number of repo description characters to display 174 Specifies the maximum number of repo description characters to display
134 on the repository index page. Default value: "80". 175 on the repository index page. Default value: "80".
135 176
136max-stats 177max-stats::
137 Set the default maximum statistics period. Valid values are "week", 178 Set the default maximum statistics period. Valid values are "week",
138 "month", "quarter" and "year". If unspecified, statistics are 179 "month", "quarter" and "year". If unspecified, statistics are
139 disabled. Default value: none. See also: "repo.max-stats". 180 disabled. Default value: none. See also: "repo.max-stats".
140 181
141module-link 182mimetype.<ext>::
183 Set the mimetype for the specified filename extension. This is used
184 by the `plain` command when returning blob content.
185
186module-link::
142 Text which will be used as the formatstring for a hyperlink when a 187 Text which will be used as the formatstring for a hyperlink when a
143 submodule is printed in a directory listing. The arguments for the 188 submodule is printed in a directory listing. The arguments for the
144 formatstring are the path and SHA1 of the submodule commit. Default 189 formatstring are the path and SHA1 of the submodule commit. Default
145 value: "./?repo=%s&page=commit&id=%s" 190 value: "./?repo=%s&page=commit&id=%s"
146 191
147nocache 192nocache::
148 If set to the value "1" caching will be disabled. This settings is 193 If set to the value "1" caching will be disabled. This settings is
149 deprecated, and will not be honored starting with cgit-1.0. Default 194 deprecated, and will not be honored starting with cgit-1.0. Default
150 value: "0". 195 value: "0".
151 196
152renamelimit 197noplainemail::
198 If set to "1" showing full author email adresses will be disabled.
199 Default value: "0".
200
201noheader::
202 Flag which, when set to "1", will make cgit omit the standard header
203 on all pages. Default value: none. See also: "embedded".
204
205renamelimit::
153 Maximum number of files to consider when detecting renames. The value 206 Maximum number of files to consider when detecting renames. The value
154 "-1" uses the compiletime value in git (for further info, look at 207 "-1" uses the compiletime value in git (for further info, look at
155 `man git-diff`). Default value: "-1". 208 `man git-diff`). Default value: "-1".
156 209
157repo.group 210repo.group::
158 A value for the current repository group, which all repositories 211 Legacy alias for "section". This option is deprecated and will not be
159 specified after this setting will inherit. Default value: none. 212 supported in cgit-1.0.
160 213
161robots 214robots::
162 Text used as content for the "robots" meta-tag. Default value: 215 Text used as content for the "robots" meta-tag. Default value:
163 "index, nofollow". 216 "index, nofollow".
164 217
165root-desc 218root-desc::
166 Text printed below the heading on the repository index page. Default 219 Text printed below the heading on the repository index page. Default
167 value: "a fast webinterface for the git dscm". 220 value: "a fast webinterface for the git dscm".
168 221
169root-readme: 222root-readme::
170 The content of the file specified with this option will be included 223 The content of the file specified with this option will be included
171 verbatim below the "about" link on the repository index page. Default 224 verbatim below the "about" link on the repository index page. Default
172 value: none. 225 value: none.
173 226
174root-title 227root-title::
175 Text printed as heading on the repository index page. Default value: 228 Text printed as heading on the repository index page. Default value:
176 "Git Repository Browser". 229 "Git Repository Browser".
177 230
178snapshots 231scan-path::
179 Text which specifies the default (and allowed) set of snapshot formats 232 A path which will be scanned for repositories. If caching is enabled,
180 supported by cgit. The value is a space-separated list of zero or more 233 the result will be cached as a cgitrc include-file in the cache
181 of the following values: 234 directory. Default value: none. See also: cache-scanrc-ttl.
182 "tar" uncompressed tar-file 235
183 "tar.gz" gzip-compressed tar-file 236section::
184 "tar.bz2" bzip-compressed tar-file 237 The name of the current repository section - all repositories defined
185 "zip" zip-file 238 after this option will inherit the current section name. Default value:
186 Default value: none. 239 none.
187 240
188summary-branches 241snapshots::
242 Text which specifies the default set of snapshot formats generated by
243 cgit. The value is a space-separated list of zero or more of the
244 values "tar", "tar.gz", "tar.bz2" and "zip". Default value: none.
245
246source-filter::
247 Specifies a command which will be invoked to format plaintext blobs
248 in the tree view. The command will get the blob content on its STDIN
249 and the name of the blob as its only command line argument. The STDOUT
250 from the command will be included verbatim as the blob contents, i.e.
251 this can be used to implement e.g. syntax highlighting. Default value:
252 none.
253
254summary-branches::
189 Specifies the number of branches to display in the repository "summary" 255 Specifies the number of branches to display in the repository "summary"
190 view. Default value: "10". 256 view. Default value: "10".
191 257
192summary-log 258summary-log::
193 Specifies the number of log entries to display in the repository 259 Specifies the number of log entries to display in the repository
194 "summary" view. Default value: "10". 260 "summary" view. Default value: "10".
195 261
196summary-tags 262summary-tags::
197 Specifies the number of tags to display in the repository "summary" 263 Specifies the number of tags to display in the repository "summary"
198 view. Default value: "10". 264 view. Default value: "10".
199 265
200virtual-root 266virtual-root::
201 Url which, if specified, will be used as root for all cgit links. It 267 Url which, if specified, will be used as root for all cgit links. It
202 will also cause cgit to generate 'virtual urls', i.e. urls like 268 will also cause cgit to generate 'virtual urls', i.e. urls like
203 '/cgit/tree/README' as opposed to '?r=cgit&p=tree&path=README'. Default 269 '/cgit/tree/README' as opposed to '?r=cgit&p=tree&path=README'. Default
@@ -207,58 +273,88 @@ virtual-root
207 273
208REPOSITORY SETTINGS 274REPOSITORY SETTINGS
209------------------- 275-------------------
210repo.clone-url 276repo.about-filter::
277 Override the default about-filter. Default value: none. See also:
278 "enable-filter-overrides".
279
280repo.clone-url::
211 A list of space-separated urls which can be used to clone this repo. 281 A list of space-separated urls which can be used to clone this repo.
212 Default value: none. 282 Default value: none.
213 283
214repo.defbranch 284repo.commit-filter::
285 Override the default commit-filter. Default value: none. See also:
286 "enable-filter-overrides".
287
288repo.defbranch::
215 The name of the default branch for this repository. If no such branch 289 The name of the default branch for this repository. If no such branch
216 exists in the repository, the first branch name (when sorted) is used 290 exists in the repository, the first branch name (when sorted) is used
217 as default instead. Default value: "master". 291 as default instead. Default value: "master".
218 292
219repo.desc 293repo.desc::
220 The value to show as repository description. Default value: none. 294 The value to show as repository description. Default value: none.
221 295
222repo.enable-log-filecount 296repo.enable-log-filecount::
223 A flag which can be used to disable the global setting 297 A flag which can be used to disable the global setting
224 `enable-log-filecount'. Default value: none. 298 `enable-log-filecount'. Default value: none.
225 299
226repo.enable-log-linecount 300repo.enable-log-linecount::
227 A flag which can be used to disable the global setting 301 A flag which can be used to disable the global setting
228 `enable-log-linecount'. Default value: none. 302 `enable-log-linecount'. Default value: none.
229 303
230repo.max-stats 304repo.max-stats::
231 Override the default maximum statistics period. Valid values are equal 305 Override the default maximum statistics period. Valid values are equal
232 to the values specified for the global "max-stats" setting. Default 306 to the values specified for the global "max-stats" setting. Default
233 value: none. 307 value: none.
234 308
235repo.name 309repo.name::
236 The value to show as repository name. Default value: <repo.url>. 310 The value to show as repository name. Default value: <repo.url>.
237 311
238repo.owner 312repo.owner::
239 A value used to identify the owner of the repository. Default value: 313 A value used to identify the owner of the repository. Default value:
240 none. 314 none.
241 315
242repo.path 316repo.path::
243 An absolute path to the repository directory. For non-bare repositories 317 An absolute path to the repository directory. For non-bare repositories
244 this is the .git-directory. Default value: none. 318 this is the .git-directory. Default value: none.
245 319
246repo.readme 320repo.readme::
247 A path (relative to <repo.path>) which specifies a file to include 321 A path (relative to <repo.path>) which specifies a file to include
248 verbatim as the "About" page for this repo. Default value: none. 322 verbatim as the "About" page for this repo. Default value: none.
249 323
250repo.snapshots 324repo.snapshots::
251 A mask of allowed snapshot-formats for this repo, restricted by the 325 A mask of allowed snapshot-formats for this repo, restricted by the
252 "snapshots" global setting. Default value: <snapshots>. 326 "snapshots" global setting. Default value: <snapshots>.
253 327
254repo.url 328repo.section::
329 Override the current section name for this repository. Default value:
330 none.
331
332repo.source-filter::
333 Override the default source-filter. Default value: none. See also:
334 "enable-filter-overrides".
335
336repo.url::
255 The relative url used to access the repository. This must be the first 337 The relative url used to access the repository. This must be the first
256 setting specified for each repo. Default value: none. 338 setting specified for each repo. Default value: none.
257 339
258 340
341REPOSITORY-SPECIFIC CGITRC FILE
342-------------------------------
343When the option "scan-path" is used to auto-discover git repositories, cgit
344will try to parse the file "cgitrc" within any found repository. Such a
345repo-specific config file may contain any of the repo-specific options
346described above, except "repo.url" and "repo.path". Additionally, the "filter"
347options are only acknowledged in repo-specific config files when
348"enable-filter-overrides" is set to "1".
349
350Note: the "repo." prefix is dropped from the option names in repo-specific
351config files, e.g. "repo.desc" becomes "desc".
352
353
259EXAMPLE CGITRC FILE 354EXAMPLE CGITRC FILE
260------------------- 355-------------------
261 356
357....
262# Enable caching of up to 1000 output entriess 358# Enable caching of up to 1000 output entriess
263cache-size=1000 359cache-size=1000
264 360
@@ -311,6 +407,19 @@ snapshots=tar.gz tar.bz2 zip
311 407
312 408
313## 409##
410## List of common mimetypes
411##
412
413mimetype.git=image/git
414mimetype.html=text/html
415mimetype.jpg=image/jpeg
416mimetype.jpeg=image/jpeg
417mimetype.pdf=application/pdf
418mimetype.png=image/png
419mimetype.svg=image/svg+xml
420
421
422##
314## List of repositories. 423## List of repositories.
315## PS: Any repositories listed when repo.group is unset will not be 424## PS: Any repositories listed when repo.group is unset will not be
316## displayed under a group heading 425## displayed under a group heading
@@ -368,6 +477,7 @@ repo.enable-log-linecount=0
368 477
369# Restrict the max statistics period for this repo 478# Restrict the max statistics period for this repo
370repo.max-stats=month 479repo.max-stats=month
480....
371 481
372 482
373BUGS 483BUGS