-rw-r--r-- | cgitrc.5.txt | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 65b210f..10b86f3 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt | |||
@@ -33,25 +33,25 @@ about-filter:: | |||
33 | command will be included verbatim on the about page. Default value: | 33 | command will be included verbatim on the about page. Default value: |
34 | none. | 34 | none. |
35 | 35 | ||
36 | agefile:: | 36 | agefile:: |
37 | Specifies a path, relative to each repository path, which can be used | 37 | Specifies a path, relative to each repository path, which can be used |
38 | to specify the date and time of the youngest commit in the repository. | 38 | to specify the date and time of the youngest commit in the repository. |
39 | The first line in the file is used as input to the "parse_date" | 39 | The first line in the file is used as input to the "parse_date" |
40 | function in libgit. Recommended timestamp-format is "yyyy-mm-dd | 40 | function in libgit. Recommended timestamp-format is "yyyy-mm-dd |
41 | hh:mm:ss". Default value: "info/web/last-modified". | 41 | hh:mm:ss". Default value: "info/web/last-modified". |
42 | 42 | ||
43 | cache-root:: | 43 | cache-root:: |
44 | Path used to store the cgit cache entries. Default value: | 44 | Path used to store the cgit cache entries. Default value: |
45 | "/var/cache/cgit". | 45 | "/var/cache/cgit". See also: "MACRO EXPANSION". |
46 | 46 | ||
47 | cache-dynamic-ttl:: | 47 | cache-dynamic-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 without a fixed SHA1. Default | 49 | version of repository pages accessed without a fixed SHA1. Default |
50 | value: "5". | 50 | value: "5". |
51 | 51 | ||
52 | cache-repo-ttl:: | 52 | cache-repo-ttl:: |
53 | Number which specifies the time-to-live, in minutes, for the cached | 53 | Number which specifies the time-to-live, in minutes, for the cached |
54 | version of the repository summary page. Default value: "5". | 54 | version of the repository summary page. Default value: "5". |
55 | 55 | ||
56 | cache-root-ttl:: | 56 | cache-root-ttl:: |
57 | Number which specifies the time-to-live, in minutes, for the cached | 57 | Number which specifies the time-to-live, in minutes, for the cached |
@@ -146,25 +146,25 @@ footer:: | |||
146 | "generated by..." message. Default value: none. | 146 | "generated by..." message. Default value: none. |
147 | 147 | ||
148 | head-include:: | 148 | head-include:: |
149 | The content of the file specified with this option will be included | 149 | The content of the file specified with this option will be included |
150 | verbatim in the html HEAD section on all pages. Default value: none. | 150 | verbatim in the html HEAD section on all pages. Default value: none. |
151 | 151 | ||
152 | header:: | 152 | header:: |
153 | The content of the file specified with this option will be included | 153 | The content of the file specified with this option will be included |
154 | verbatim at the top of all pages. Default value: none. | 154 | verbatim at the top of all pages. Default value: none. |
155 | 155 | ||
156 | include:: | 156 | include:: |
157 | Name of a configfile to include before the rest of the current config- | 157 | Name of a configfile to include before the rest of the current config- |
158 | file is parsed. Default value: none. | 158 | file is parsed. Default value: none. See also: "MACRO EXPANSION". |
159 | 159 | ||
160 | index-header:: | 160 | index-header:: |
161 | The content of the file specified with this option will be included | 161 | The content of the file specified with this option will be included |
162 | verbatim above the repository index. This setting is deprecated, and | 162 | verbatim above the repository index. This setting is deprecated, and |
163 | will not be supported by cgit-1.0 (use root-readme instead). Default | 163 | will not be supported by cgit-1.0 (use root-readme instead). Default |
164 | value: none. | 164 | value: none. |
165 | 165 | ||
166 | index-info:: | 166 | index-info:: |
167 | The content of the file specified with this option will be included | 167 | The content of the file specified with this option will be included |
168 | verbatim below the heading on the repository index page. This setting | 168 | verbatim below the heading on the repository index page. This setting |
169 | is deprecated, and will not be supported by cgit-1.0 (use root-desc | 169 | is deprecated, and will not be supported by cgit-1.0 (use root-desc |
170 | instead). Default value: none. | 170 | instead). Default value: none. |
@@ -228,25 +228,26 @@ nocache:: | |||
228 | 228 | ||
229 | noplainemail:: | 229 | noplainemail:: |
230 | If set to "1" showing full author email adresses will be disabled. | 230 | If set to "1" showing full author email adresses will be disabled. |
231 | Default value: "0". | 231 | Default value: "0". |
232 | 232 | ||
233 | noheader:: | 233 | noheader:: |
234 | Flag which, when set to "1", will make cgit omit the standard header | 234 | Flag which, when set to "1", will make cgit omit the standard header |
235 | on all pages. Default value: none. See also: "embedded". | 235 | on all pages. Default value: none. See also: "embedded". |
236 | 236 | ||
237 | project-list:: | 237 | project-list:: |
238 | A list of subdirectories inside of scan-path, relative to it, that | 238 | A list of subdirectories inside of scan-path, relative to it, that |
239 | should loaded as git repositories. This must be defined prior to | 239 | should loaded as git repositories. This must be defined prior to |
240 | scan-path. Default value: none. See also: scan-path. | 240 | scan-path. Default value: none. See also: scan-path, "MACRO |
241 | EXPANSION". | ||
241 | 242 | ||
242 | readme:: | 243 | readme:: |
243 | Text which will be used as default value for "repo.readme". Default | 244 | Text which will be used as default value for "repo.readme". Default |
244 | value: none. | 245 | value: none. |
245 | 246 | ||
246 | remove-suffix:: | 247 | remove-suffix:: |
247 | If set to "1" and scan-path is enabled, if any repositories are found | 248 | If set to "1" and scan-path is enabled, if any repositories are found |
248 | with a suffix of ".git", this suffix will be removed for the url and | 249 | with a suffix of ".git", this suffix will be removed for the url and |
249 | name. Default value: "0". See also: scan-path. | 250 | name. Default value: "0". See also: scan-path. |
250 | 251 | ||
251 | renamelimit:: | 252 | renamelimit:: |
252 | Maximum number of files to consider when detecting renames. The value | 253 | Maximum number of files to consider when detecting renames. The value |
@@ -280,25 +281,26 @@ scan-hidden-path:: | |||
280 | scan-path will stay away from such directories (considered as | 281 | scan-path will stay away from such directories (considered as |
281 | "hidden"). Note that this does not apply to the ".git" directory in | 282 | "hidden"). Note that this does not apply to the ".git" directory in |
282 | non-bare repos. This must be defined prior to scan-path. | 283 | non-bare repos. This must be defined prior to scan-path. |
283 | Default value: 0. See also: scan-path. | 284 | Default value: 0. See also: scan-path. |
284 | 285 | ||
285 | scan-path:: | 286 | scan-path:: |
286 | A path which will be scanned for repositories. If caching is enabled, | 287 | A path which will be scanned for repositories. If caching is enabled, |
287 | the result will be cached as a cgitrc include-file in the cache | 288 | the result will be cached as a cgitrc include-file in the cache |
288 | directory. If project-list has been defined prior to scan-path, | 289 | directory. If project-list has been defined prior to scan-path, |
289 | scan-path loads only the directories listed in the file pointed to by | 290 | scan-path loads only the directories listed in the file pointed to by |
290 | project-list. Be advised that only the global settings taken | 291 | project-list. Be advised that only the global settings taken |
291 | before the scan-path directive will be applied to each repository. | 292 | before the scan-path directive will be applied to each repository. |
292 | Default value: none. See also: cache-scanrc-ttl, project-list. | 293 | Default value: none. See also: cache-scanrc-ttl, project-list, |
294 | "MACRO EXPANSION". | ||
293 | 295 | ||
294 | section:: | 296 | section:: |
295 | The name of the current repository section - all repositories defined | 297 | The name of the current repository section - all repositories defined |
296 | after this option will inherit the current section name. Default value: | 298 | after this option will inherit the current section name. Default value: |
297 | none. | 299 | none. |
298 | 300 | ||
299 | section-from-path:: | 301 | section-from-path:: |
300 | A number which, if specified before scan-path, specifies how many | 302 | A number which, if specified before scan-path, specifies how many |
301 | path elements from each repo path to use as a default section name. | 303 | path elements from each repo path to use as a default section name. |
302 | If negative, cgit will discard the specified number of path elements | 304 | If negative, cgit will discard the specified number of path elements |
303 | above the repo directory. Default value: 0. | 305 | above the repo directory. Default value: 0. |
304 | 306 | ||
@@ -441,24 +443,44 @@ REPOSITORY-SPECIFIC CGITRC FILE | |||
441 | ------------------------------- | 443 | ------------------------------- |
442 | When the option "scan-path" is used to auto-discover git repositories, cgit | 444 | When the option "scan-path" is used to auto-discover git repositories, cgit |
443 | will try to parse the file "cgitrc" within any found repository. Such a | 445 | will try to parse the file "cgitrc" within any found repository. Such a |
444 | repo-specific config file may contain any of the repo-specific options | 446 | repo-specific config file may contain any of the repo-specific options |
445 | described above, except "repo.url" and "repo.path". Additionally, the "filter" | 447 | described above, except "repo.url" and "repo.path". Additionally, the "filter" |
446 | options are only acknowledged in repo-specific config files when | 448 | options are only acknowledged in repo-specific config files when |
447 | "enable-filter-overrides" is set to "1". | 449 | "enable-filter-overrides" is set to "1". |
448 | 450 | ||
449 | Note: the "repo." prefix is dropped from the option names in repo-specific | 451 | Note: the "repo." prefix is dropped from the option names in repo-specific |
450 | config files, e.g. "repo.desc" becomes "desc". | 452 | config files, e.g. "repo.desc" becomes "desc". |
451 | 453 | ||
452 | 454 | ||
455 | MACRO EXPANSION | ||
456 | --------------- | ||
457 | The following cgitrc options supports a simple macro expansion feature, | ||
458 | where tokens prefixed with "$" are replaced with the value of a similary | ||
459 | named environment variable: | ||
460 | |||
461 | - cache-root | ||
462 | - include | ||
463 | - project-list | ||
464 | - scan-path | ||
465 | |||
466 | Macro expansion will also happen on the content of $CGIT_CONFIG, if | ||
467 | defined. | ||
468 | |||
469 | One usage of this feature is virtual hosting, which in its simplest form | ||
470 | can be accomplished by adding the following line to /etc/cgitrc: | ||
471 | |||
472 | include=/etc/cgitrc.d/$HTTP_HOST | ||
473 | |||
474 | |||
453 | EXAMPLE CGITRC FILE | 475 | EXAMPLE CGITRC FILE |
454 | ------------------- | 476 | ------------------- |
455 | 477 | ||
456 | .... | 478 | .... |
457 | # Enable caching of up to 1000 output entriess | 479 | # Enable caching of up to 1000 output entriess |
458 | cache-size=1000 | 480 | cache-size=1000 |
459 | 481 | ||
460 | 482 | ||
461 | # Specify some default clone prefixes | 483 | # Specify some default clone prefixes |
462 | clone-prefix=git://example.com ssh://example.com/pub/git http://example.com/git | 484 | clone-prefix=git://example.com ssh://example.com/pub/git http://example.com/git |
463 | 485 | ||
464 | # Specify the css url | 486 | # Specify the css url |