summaryrefslogtreecommitdiffabout
path: root/cgitrc.5.txt
Unidiff
Diffstat (limited to 'cgitrc.5.txt') (more/less context) (ignore whitespace changes)
-rw-r--r--cgitrc.5.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index d420ad4..2efd6aa 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -1,411 +1,417 @@
1CGITRC(5) 1CGITRC(5)
2======== 2========
3 3
4 4
5NAME 5NAME
6---- 6----
7cgitrc - runtime configuration for cgit 7cgitrc - runtime configuration for cgit
8 8
9 9
10SYNOPSIS 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
17GLOBAL SETTINGS 17GLOBAL SETTINGS
18--------------- 18---------------
19agefile:: 19agefile::
20 Specifies a path, relative to each repository path, which can be used 20 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. 21 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" 22 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 23 function in libgit. Recommended timestamp-format is "yyyy-mm-dd
24 hh:mm:ss". Default value: "info/web/last-modified". 24 hh:mm:ss". Default value: "info/web/last-modified".
25 25
26cache-root:: 26cache-root::
27 Path used to store the cgit cache entries. Default value: 27 Path used to store the cgit cache entries. Default value:
28 "/var/cache/cgit". 28 "/var/cache/cgit".
29 29
30cache-dynamic-ttl:: 30cache-dynamic-ttl::
31 Number which specifies the time-to-live, in minutes, for the cached 31 Number which specifies the time-to-live, in minutes, for the cached
32 version of repository pages accessed without a fixed SHA1. Default 32 version of repository pages accessed without a fixed SHA1. Default
33 value: "5". 33 value: "5".
34 34
35cache-repo-ttl:: 35cache-repo-ttl::
36 Number which specifies the time-to-live, in minutes, for the cached 36 Number which specifies the time-to-live, in minutes, for the cached
37 version of the repository summary page. Default value: "5". 37 version of the repository summary page. Default value: "5".
38 38
39cache-root-ttl:: 39cache-root-ttl::
40 Number which specifies the time-to-live, in minutes, for the cached 40 Number which specifies the time-to-live, in minutes, for the cached
41 version of the repository index page. Default value: "5". 41 version of the repository index page. Default value: "5".
42 42
43cache-size:: 43cache-size::
44 The maximum number of entries in the cgit cache. Default value: "0" 44 The maximum number of entries in the cgit cache. Default value: "0"
45 (i.e. caching is disabled). 45 (i.e. caching is disabled).
46 46
47cache-static-ttl:: 47cache-static-ttl::
48 Number which specifies the time-to-live, in minutes, for the cached 48 Number which specifies the time-to-live, in minutes, for the cached
49 version of repository pages accessed with a fixed SHA1. Default value: 49 version of repository pages accessed with a fixed SHA1. Default value:
50 "5". 50 "5".
51 51
52clone-prefix:: 52clone-prefix::
53 Space-separated list of common prefixes which, when combined with a 53 Space-separated list of common prefixes which, when combined with a
54 repository url, generates valid clone urls for the repository. This 54 repository url, generates valid clone urls for the repository. This
55 setting is only used if `repo.clone-url` is unspecified. Default value: 55 setting is only used if `repo.clone-url` is unspecified. Default value:
56 none. 56 none.
57 57
58commit-filter::
59 Specifies a command which will be invoked to format commit messages.
60 The command will get the message on its STDIN, and the STDOUT from the
61 command will be included verbatim as the commit message, i.e. this can
62 be used to implement bugtracker integration. Default value: none.
63
58css:: 64css::
59 Url which specifies the css document to include in all cgit pages. 65 Url which specifies the css document to include in all cgit pages.
60 Default value: "/cgit.css". 66 Default value: "/cgit.css".
61 67
62embedded:: 68embedded::
63 Flag which, when set to "1", will make cgit generate a html fragment 69 Flag which, when set to "1", will make cgit generate a html fragment
64 suitable for embedding in other html pages. Default value: none. See 70 suitable for embedding in other html pages. Default value: none. See
65 also: "noheader". 71 also: "noheader".
66 72
67enable-index-links:: 73enable-index-links::
68 Flag which, when set to "1", will make cgit generate extra links for 74 Flag which, when set to "1", will make cgit generate extra links for
69 each repo in the repository index (specifically, to the "summary", 75 each repo in the repository index (specifically, to the "summary",
70 "commit" and "tree" pages). Default value: "0". 76 "commit" and "tree" pages). Default value: "0".
71 77
72enable-log-filecount:: 78enable-log-filecount::
73 Flag which, when set to "1", will make cgit print the number of 79 Flag which, when set to "1", will make cgit print the number of
74 modified files for each commit on the repository log page. Default 80 modified files for each commit on the repository log page. Default
75 value: "0". 81 value: "0".
76 82
77enable-log-linecount:: 83enable-log-linecount::
78 Flag which, when set to "1", will make cgit print the number of added 84 Flag which, when set to "1", will make cgit print the number of added
79 and removed lines for each commit on the repository log page. Default 85 and removed lines for each commit on the repository log page. Default
80 value: "0". 86 value: "0".
81 87
82favicon:: 88favicon::
83 Url used as link to a shortcut icon for cgit. If specified, it is 89 Url used as link to a shortcut icon for cgit. If specified, it is
84 suggested to use the value "/favicon.ico" since certain browsers will 90 suggested to use the value "/favicon.ico" since certain browsers will
85 ignore other values. Default value: none. 91 ignore other values. Default value: none.
86 92
87footer:: 93footer::
88 The content of the file specified with this option will be included 94 The content of the file specified with this option will be included
89 verbatim at the bottom of all pages (i.e. it replaces the standard 95 verbatim at the bottom of all pages (i.e. it replaces the standard
90 "generated by..." message. Default value: none. 96 "generated by..." message. Default value: none.
91 97
92head-include:: 98head-include::
93 The content of the file specified with this option will be included 99 The content of the file specified with this option will be included
94 verbatim in the html HEAD section on all pages. Default value: none. 100 verbatim in the html HEAD section on all pages. Default value: none.
95 101
96header:: 102header::
97 The content of the file specified with this option will be included 103 The content of the file specified with this option will be included
98 verbatim at the top of all pages. Default value: none. 104 verbatim at the top of all pages. Default value: none.
99 105
100include:: 106include::
101 Name of a configfile to include before the rest of the current config- 107 Name of a configfile to include before the rest of the current config-
102 file is parsed. Default value: none. 108 file is parsed. Default value: none.
103 109
104index-header:: 110index-header::
105 The content of the file specified with this option will be included 111 The content of the file specified with this option will be included
106 verbatim above the repository index. This setting is deprecated, and 112 verbatim above the repository index. This setting is deprecated, and
107 will not be supported by cgit-1.0 (use root-readme instead). Default 113 will not be supported by cgit-1.0 (use root-readme instead). Default
108 value: none. 114 value: none.
109 115
110index-info:: 116index-info::
111 The content of the file specified with this option will be included 117 The content of the file specified with this option will be included
112 verbatim below the heading on the repository index page. This setting 118 verbatim below the heading on the repository index page. This setting
113 is deprecated, and will not be supported by cgit-1.0 (use root-desc 119 is deprecated, and will not be supported by cgit-1.0 (use root-desc
114 instead). Default value: none. 120 instead). Default value: none.
115 121
116local-time:: 122local-time::
117 Flag which, if set to "1", makes cgit print commit and tag times in the 123 Flag which, if set to "1", makes cgit print commit and tag times in the
118 servers timezone. Default value: "0". 124 servers timezone. Default value: "0".
119 125
120logo:: 126logo::
121 Url which specifies the source of an image which will be used as a logo 127 Url which specifies the source of an image which will be used as a logo
122 on all cgit pages. 128 on all cgit pages.
123 129
124logo-link:: 130logo-link::
125 Url loaded when clicking on the cgit logo image. If unspecified the 131 Url loaded when clicking on the cgit logo image. If unspecified the
126 calculated url of the repository index page will be used. Default 132 calculated url of the repository index page will be used. Default
127 value: none. 133 value: none.
128 134
129max-commit-count:: 135max-commit-count::
130 Specifies the number of entries to list per page in "log" view. Default 136 Specifies the number of entries to list per page in "log" view. Default
131 value: "50". 137 value: "50".
132 138
133max-message-length:: 139max-message-length::
134 Specifies the maximum number of commit message characters to display in 140 Specifies the maximum number of commit message characters to display in
135 "log" view. Default value: "80". 141 "log" view. Default value: "80".
136 142
137max-repo-count:: 143max-repo-count::
138 Specifies the number of entries to list per page on therepository 144 Specifies the number of entries to list per page on therepository
139 index page. Default value: "50". 145 index page. Default value: "50".
140 146
141max-repodesc-length:: 147max-repodesc-length::
142 Specifies the maximum number of repo description characters to display 148 Specifies the maximum number of repo description characters to display
143 on the repository index page. Default value: "80". 149 on the repository index page. Default value: "80".
144 150
145max-stats:: 151max-stats::
146 Set the default maximum statistics period. Valid values are "week", 152 Set the default maximum statistics period. Valid values are "week",
147 "month", "quarter" and "year". If unspecified, statistics are 153 "month", "quarter" and "year". If unspecified, statistics are
148 disabled. Default value: none. See also: "repo.max-stats". 154 disabled. Default value: none. See also: "repo.max-stats".
149 155
150module-link:: 156module-link::
151 Text which will be used as the formatstring for a hyperlink when a 157 Text which will be used as the formatstring for a hyperlink when a
152 submodule is printed in a directory listing. The arguments for the 158 submodule is printed in a directory listing. The arguments for the
153 formatstring are the path and SHA1 of the submodule commit. Default 159 formatstring are the path and SHA1 of the submodule commit. Default
154 value: "./?repo=%s&page=commit&id=%s" 160 value: "./?repo=%s&page=commit&id=%s"
155 161
156nocache:: 162nocache::
157 If set to the value "1" caching will be disabled. This settings is 163 If set to the value "1" caching will be disabled. This settings is
158 deprecated, and will not be honored starting with cgit-1.0. Default 164 deprecated, and will not be honored starting with cgit-1.0. Default
159 value: "0". 165 value: "0".
160 166
161noheader:: 167noheader::
162 Flag which, when set to "1", will make cgit omit the standard header 168 Flag which, when set to "1", will make cgit omit the standard header
163 on all pages. Default value: none. See also: "embedded". 169 on all pages. Default value: none. See also: "embedded".
164 170
165renamelimit:: 171renamelimit::
166 Maximum number of files to consider when detecting renames. The value 172 Maximum number of files to consider when detecting renames. The value
167 "-1" uses the compiletime value in git (for further info, look at 173 "-1" uses the compiletime value in git (for further info, look at
168 `man git-diff`). Default value: "-1". 174 `man git-diff`). Default value: "-1".
169 175
170repo.group:: 176repo.group::
171 A value for the current repository group, which all repositories 177 A value for the current repository group, which all repositories
172 specified after this setting will inherit. Default value: none. 178 specified after this setting will inherit. Default value: none.
173 179
174robots:: 180robots::
175 Text used as content for the "robots" meta-tag. Default value: 181 Text used as content for the "robots" meta-tag. Default value:
176 "index, nofollow". 182 "index, nofollow".
177 183
178root-desc:: 184root-desc::
179 Text printed below the heading on the repository index page. Default 185 Text printed below the heading on the repository index page. Default
180 value: "a fast webinterface for the git dscm". 186 value: "a fast webinterface for the git dscm".
181 187
182root-readme:: 188root-readme::
183 The content of the file specified with this option will be included 189 The content of the file specified with this option will be included
184 verbatim below the "about" link on the repository index page. Default 190 verbatim below the "about" link on the repository index page. Default
185 value: none. 191 value: none.
186 192
187root-title:: 193root-title::
188 Text printed as heading on the repository index page. Default value: 194 Text printed as heading on the repository index page. Default value:
189 "Git Repository Browser". 195 "Git Repository Browser".
190 196
191snapshots:: 197snapshots::
192 Text which specifies the default (and allowed) set of snapshot formats 198 Text which specifies the default (and allowed) set of snapshot formats
193 supported by cgit. The value is a space-separated list of zero or more 199 supported by cgit. The value is a space-separated list of zero or more
194 of the following values: 200 of the following values:
195 "tar" uncompressed tar-file 201 "tar" uncompressed tar-file
196 "tar.gz"gzip-compressed tar-file 202 "tar.gz"gzip-compressed tar-file
197 "tar.bz2"bzip-compressed tar-file 203 "tar.bz2"bzip-compressed tar-file
198 "zip" zip-file 204 "zip" zip-file
199 Default value: none. 205 Default value: none.
200 206
201source-filter:: 207source-filter::
202 Specifies a command which will be invoked to format plaintext blobs 208 Specifies a command which will be invoked to format plaintext blobs
203 in the tree view. The command will get the blob content on its STDIN 209 in the tree view. The command will get the blob content on its STDIN
204 and the name of the blob as its only command line argument. The STDOUT 210 and the name of the blob as its only command line argument. The STDOUT
205 from the command will be included verbatim as the blob contents, i.e. 211 from the command will be included verbatim as the blob contents, i.e.
206 this can be used to implement e.g. syntax highlighting. Default value: 212 this can be used to implement e.g. syntax highlighting. Default value:
207 none. 213 none.
208 214
209summary-branches:: 215summary-branches::
210 Specifies the number of branches to display in the repository "summary" 216 Specifies the number of branches to display in the repository "summary"
211 view. Default value: "10". 217 view. Default value: "10".
212 218
213summary-log:: 219summary-log::
214 Specifies the number of log entries to display in the repository 220 Specifies the number of log entries to display in the repository
215 "summary" view. Default value: "10". 221 "summary" view. Default value: "10".
216 222
217summary-tags:: 223summary-tags::
218 Specifies the number of tags to display in the repository "summary" 224 Specifies the number of tags to display in the repository "summary"
219 view. Default value: "10". 225 view. Default value: "10".
220 226
221virtual-root:: 227virtual-root::
222 Url which, if specified, will be used as root for all cgit links. It 228 Url which, if specified, will be used as root for all cgit links. It
223 will also cause cgit to generate 'virtual urls', i.e. urls like 229 will also cause cgit to generate 'virtual urls', i.e. urls like
224 '/cgit/tree/README' as opposed to '?r=cgit&p=tree&path=README'. Default 230 '/cgit/tree/README' as opposed to '?r=cgit&p=tree&path=README'. Default
225 value: none. 231 value: none.
226 NOTE: cgit has recently learned how to use PATH_INFO to achieve the 232 NOTE: cgit has recently learned how to use PATH_INFO to achieve the
227 same kind of virtual urls, so this option will probably be deprecated. 233 same kind of virtual urls, so this option will probably be deprecated.
228 234
229REPOSITORY SETTINGS 235REPOSITORY SETTINGS
230------------------- 236-------------------
231repo.clone-url:: 237repo.clone-url::
232 A list of space-separated urls which can be used to clone this repo. 238 A list of space-separated urls which can be used to clone this repo.
233 Default value: none. 239 Default value: none.
234 240
235repo.defbranch:: 241repo.defbranch::
236 The name of the default branch for this repository. If no such branch 242 The name of the default branch for this repository. If no such branch
237 exists in the repository, the first branch name (when sorted) is used 243 exists in the repository, the first branch name (when sorted) is used
238 as default instead. Default value: "master". 244 as default instead. Default value: "master".
239 245
240repo.desc:: 246repo.desc::
241 The value to show as repository description. Default value: none. 247 The value to show as repository description. Default value: none.
242 248
243repo.enable-log-filecount:: 249repo.enable-log-filecount::
244 A flag which can be used to disable the global setting 250 A flag which can be used to disable the global setting
245 `enable-log-filecount'. Default value: none. 251 `enable-log-filecount'. Default value: none.
246 252
247repo.enable-log-linecount:: 253repo.enable-log-linecount::
248 A flag which can be used to disable the global setting 254 A flag which can be used to disable the global setting
249 `enable-log-linecount'. Default value: none. 255 `enable-log-linecount'. Default value: none.
250 256
251repo.max-stats:: 257repo.max-stats::
252 Override the default maximum statistics period. Valid values are equal 258 Override the default maximum statistics period. Valid values are equal
253 to the values specified for the global "max-stats" setting. Default 259 to the values specified for the global "max-stats" setting. Default
254 value: none. 260 value: none.
255 261
256repo.name:: 262repo.name::
257 The value to show as repository name. Default value: <repo.url>. 263 The value to show as repository name. Default value: <repo.url>.
258 264
259repo.owner:: 265repo.owner::
260 A value used to identify the owner of the repository. Default value: 266 A value used to identify the owner of the repository. Default value:
261 none. 267 none.
262 268
263repo.path:: 269repo.path::
264 An absolute path to the repository directory. For non-bare repositories 270 An absolute path to the repository directory. For non-bare repositories
265 this is the .git-directory. Default value: none. 271 this is the .git-directory. Default value: none.
266 272
267repo.readme:: 273repo.readme::
268 A path (relative to <repo.path>) which specifies a file to include 274 A path (relative to <repo.path>) which specifies a file to include
269 verbatim as the "About" page for this repo. Default value: none. 275 verbatim as the "About" page for this repo. Default value: none.
270 276
271repo.snapshots:: 277repo.snapshots::
272 A mask of allowed snapshot-formats for this repo, restricted by the 278 A mask of allowed snapshot-formats for this repo, restricted by the
273 "snapshots" global setting. Default value: <snapshots>. 279 "snapshots" global setting. Default value: <snapshots>.
274 280
275repo.url:: 281repo.url::
276 The relative url used to access the repository. This must be the first 282 The relative url used to access the repository. This must be the first
277 setting specified for each repo. Default value: none. 283 setting specified for each repo. Default value: none.
278 284
279 285
280EXAMPLE CGITRC FILE 286EXAMPLE CGITRC FILE
281------------------- 287-------------------
282 288
283.... 289....
284# Enable caching of up to 1000 output entriess 290# Enable caching of up to 1000 output entriess
285cache-size=1000 291cache-size=1000
286 292
287 293
288# Specify some default clone prefixes 294# Specify some default clone prefixes
289clone-prefix=git://foobar.com ssh://foobar.com/pub/git http://foobar.com/git 295clone-prefix=git://foobar.com ssh://foobar.com/pub/git http://foobar.com/git
290 296
291# Specify the css url 297# Specify the css url
292css=/css/cgit.css 298css=/css/cgit.css
293 299
294 300
295# Show extra links for each repository on the index page 301# Show extra links for each repository on the index page
296enable-index-links=1 302enable-index-links=1
297 303
298 304
299# Show number of affected files per commit on the log pages 305# Show number of affected files per commit on the log pages
300enable-log-filecount=1 306enable-log-filecount=1
301 307
302 308
303# Show number of added/removed lines per commit on the log pages 309# Show number of added/removed lines per commit on the log pages
304enable-log-linecount=1 310enable-log-linecount=1
305 311
306 312
307# Add a cgit favicon 313# Add a cgit favicon
308favicon=/favicon.ico 314favicon=/favicon.ico
309 315
310 316
311# Use a custom logo 317# Use a custom logo
312logo=/img/mylogo.png 318logo=/img/mylogo.png
313 319
314 320
315# Enable statistics per week, month and quarter 321# Enable statistics per week, month and quarter
316max-stats=quarter 322max-stats=quarter
317 323
318 324
319# Set the title and heading of the repository index page 325# Set the title and heading of the repository index page
320root-title=foobar.com git repositories 326root-title=foobar.com git repositories
321 327
322 328
323# Set a subheading for the repository index page 329# Set a subheading for the repository index page
324root-desc=tracking the foobar development 330root-desc=tracking the foobar development
325 331
326 332
327# Include some more info about foobar.com on the index page 333# Include some more info about foobar.com on the index page
328root-readme=/var/www/htdocs/about.html 334root-readme=/var/www/htdocs/about.html
329 335
330 336
331# Allow download of tar.gz, tar.bz2 and zip-files 337# Allow download of tar.gz, tar.bz2 and zip-files
332snapshots=tar.gz tar.bz2 zip 338snapshots=tar.gz tar.bz2 zip
333 339
334 340
335## 341##
336## List of repositories. 342## List of repositories.
337## PS: Any repositories listed when repo.group is unset will not be 343## PS: Any repositories listed when repo.group is unset will not be
338## displayed under a group heading 344## displayed under a group heading
339## PPS: This list could be kept in a different file (e.g. '/etc/cgitrepos') 345## PPS: This list could be kept in a different file (e.g. '/etc/cgitrepos')
340## and included like this: 346## and included like this:
341## include=/etc/cgitrepos 347## include=/etc/cgitrepos
342## 348##
343 349
344 350
345repo.url=foo 351repo.url=foo
346repo.path=/pub/git/foo.git 352repo.path=/pub/git/foo.git
347repo.desc=the master foo repository 353repo.desc=the master foo repository
348repo.owner=fooman@foobar.com 354repo.owner=fooman@foobar.com
349repo.readme=info/web/about.html 355repo.readme=info/web/about.html
350 356
351 357
352repo.url=bar 358repo.url=bar
353repo.path=/pub/git/bar.git 359repo.path=/pub/git/bar.git
354repo.desc=the bars for your foo 360repo.desc=the bars for your foo
355repo.owner=barman@foobar.com 361repo.owner=barman@foobar.com
356repo.readme=info/web/about.html 362repo.readme=info/web/about.html
357 363
358 364
359# The next repositories will be displayed under the 'extras' heading 365# The next repositories will be displayed under the 'extras' heading
360repo.group=extras 366repo.group=extras
361 367
362 368
363repo.url=baz 369repo.url=baz
364repo.path=/pub/git/baz.git 370repo.path=/pub/git/baz.git
365repo.desc=a set of extensions for bar users 371repo.desc=a set of extensions for bar users
366 372
367repo.url=wiz 373repo.url=wiz
368repo.path=/pub/git/wiz.git 374repo.path=/pub/git/wiz.git
369repo.desc=the wizard of foo 375repo.desc=the wizard of foo
370 376
371 377
372# Add some mirrored repositories 378# Add some mirrored repositories
373repo.group=mirrors 379repo.group=mirrors
374 380
375 381
376repo.url=git 382repo.url=git
377repo.path=/pub/git/git.git 383repo.path=/pub/git/git.git
378repo.desc=the dscm 384repo.desc=the dscm
379 385
380 386
381repo.url=linux 387repo.url=linux
382repo.path=/pub/git/linux.git 388repo.path=/pub/git/linux.git
383repo.desc=the kernel 389repo.desc=the kernel
384 390
385# Disable adhoc downloads of this repo 391# Disable adhoc downloads of this repo
386repo.snapshots=0 392repo.snapshots=0
387 393
388# Disable line-counts for this repo 394# Disable line-counts for this repo
389repo.enable-log-linecount=0 395repo.enable-log-linecount=0
390 396
391# Restrict the max statistics period for this repo 397# Restrict the max statistics period for this repo
392repo.max-stats=month 398repo.max-stats=month
393.... 399....
394 400
395 401
396BUGS 402BUGS
397---- 403----
398Comments currently cannot appear on the same line as a setting; the comment 404Comments currently cannot appear on the same line as a setting; the comment
399will be included as part of the value. E.g. this line: 405will be included as part of the value. E.g. this line:
400 406
401 robots=index # allow indexing 407 robots=index # allow indexing
402 408
403will generate the following html element: 409will generate the following html element:
404 410
405 <meta name='robots' content='index # allow indexing'/> 411 <meta name='robots' content='index # allow indexing'/>
406 412
407 413
408 414
409AUTHOR 415AUTHOR
410------ 416------
411Lars Hjemli <hjemli@gmail.com> 417Lars Hjemli <hjemli@gmail.com>