aboutsummaryrefslogtreecommitdiffstats
path: root/cgitrc.5.txt
diff options
context:
space:
mode:
Diffstat (limited to 'cgitrc.5.txt')
-rw-r--r--cgitrc.5.txt60
1 files changed, 52 insertions, 8 deletions
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index c3698a6..5903a93 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -31,7 +31,7 @@ about-filter::
31 about pages (both top-level and for each repository). The command will 31 about pages (both top-level and for each repository). The command will
32 get the content of the about-file on its STDIN, and the STDOUT from the 32 get the content of the about-file on its STDIN, and the STDOUT from the
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. See also: "FILTER API".
35 35
36agefile:: 36agefile::
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
@@ -81,6 +81,7 @@ commit-filter::
81 The command will get the message on its STDIN, and the STDOUT from the 81 The command will get the message on its STDIN, and the STDOUT from the
82 command will be included verbatim as the commit message, i.e. this can 82 command will be included verbatim as the commit message, i.e. this can
83 be used to implement bugtracker integration. Default value: none. 83 be used to implement bugtracker integration. Default value: none.
84 See also: "FILTER API".
84 85
85css:: 86css::
86 Url which specifies the css document to include in all cgit pages. 87 Url which specifies the css document to include in all cgit pages.
@@ -105,6 +106,11 @@ enable-gitweb-owner::
105 for the git config value "gitweb.owner" to determine the owner. 106 for the git config value "gitweb.owner" to determine the owner.
106 Default value: "1". See also: scan-path. 107 Default value: "1". See also: scan-path.
107 108
109enable-http-clone::
110 If set to "1", cgit will act as an dumb HTTP endpoint for git clones.
111 If you use an alternate way of serving git repositories, you may wish
112 to disable this. Default value: "1".
113
108enable-index-links:: 114enable-index-links::
109 Flag which, when set to "1", will make cgit generate extra links for 115 Flag which, when set to "1", will make cgit generate extra links for
110 each repo in the repository index (specifically, to the "summary", 116 each repo in the repository index (specifically, to the "summary",
@@ -287,8 +293,9 @@ scan-path::
287 the result will be cached as a cgitrc include-file in the cache 293 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, 294 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 295 scan-path loads only the directories listed in the file pointed to by
290 project-list. Default value: none. See also: cache-scanrc-ttl, 296 project-list. Be advised that only the global settings taken
291 project-list. 297 before the scan-path directive will be applied to each repository.
298 Default value: none. See also: cache-scanrc-ttl, project-list.
292 299
293section:: 300section::
294 The name of the current repository section - all repositories defined 301 The name of the current repository section - all repositories defined
@@ -308,7 +315,8 @@ side-by-side-diffs::
308snapshots:: 315snapshots::
309 Text which specifies the default set of snapshot formats generated by 316 Text which specifies the default set of snapshot formats generated by
310 cgit. The value is a space-separated list of zero or more of the 317 cgit. The value is a space-separated list of zero or more of the
311 values "tar", "tar.gz", "tar.bz2" and "zip". Default value: none. 318 values "tar", "tar.gz", "tar.bz2", "tar.xz" and "zip". Default value:
319 none.
312 320
313source-filter:: 321source-filter::
314 Specifies a command which will be invoked to format plaintext blobs 322 Specifies a command which will be invoked to format plaintext blobs
@@ -316,7 +324,7 @@ source-filter::
316 and the name of the blob as its only command line argument. The STDOUT 324 and the name of the blob as its only command line argument. The STDOUT
317 from the command will be included verbatim as the blob contents, i.e. 325 from the command will be included verbatim as the blob contents, i.e.
318 this can be used to implement e.g. syntax highlighting. Default value: 326 this can be used to implement e.g. syntax highlighting. Default value:
319 none. 327 none. See also: "FILTER API".
320 328
321summary-branches:: 329summary-branches::
322 Specifies the number of branches to display in the repository "summary" 330 Specifies the number of branches to display in the repository "summary"
@@ -349,7 +357,7 @@ REPOSITORY SETTINGS
349------------------- 357-------------------
350repo.about-filter:: 358repo.about-filter::
351 Override the default about-filter. Default value: none. See also: 359 Override the default about-filter. Default value: none. See also:
352 "enable-filter-overrides". 360 "enable-filter-overrides". See also: "FILTER API".
353 361
354repo.clone-url:: 362repo.clone-url::
355 A list of space-separated urls which can be used to clone this repo. 363 A list of space-separated urls which can be used to clone this repo.
@@ -357,7 +365,7 @@ repo.clone-url::
357 365
358repo.commit-filter:: 366repo.commit-filter::
359 Override the default commit-filter. Default value: none. See also: 367 Override the default commit-filter. Default value: none. See also:
360 "enable-filter-overrides". 368 "enable-filter-overrides". See also: "FILTER API".
361 369
362repo.defbranch:: 370repo.defbranch::
363 The name of the default branch for this repository. If no such branch 371 The name of the default branch for this repository. If no such branch
@@ -428,7 +436,7 @@ repo.section::
428 436
429repo.source-filter:: 437repo.source-filter::
430 Override the default source-filter. Default value: none. See also: 438 Override the default source-filter. Default value: none. See also:
431 "enable-filter-overrides". 439 "enable-filter-overrides". See also: "FILTER API".
432 440
433repo.url:: 441repo.url::
434 The relative url used to access the repository. This must be the first 442 The relative url used to access the repository. This must be the first
@@ -448,6 +456,42 @@ Note: the "repo." prefix is dropped from the option names in repo-specific
448config files, e.g. "repo.desc" becomes "desc". 456config files, e.g. "repo.desc" becomes "desc".
449 457
450 458
459FILTER API
460----------
461- about filter::
462 This filter is given no arguments.
463 The about text that is to be filtered is available on standard input and the
464 filtered text is expected on standard output.
465- commit filter::
466 This filter is given no arguments.
467 The commit message text that is to be filtered is available on standard input
468 and the filtered text is expected on standard output.
469- source filter::
470 This filter is given a single parameter: the filename of the source file to
471 filter. The filter can use the filename to determine (for example) the syntax
472 highlighting mode.
473 The contents of the source file that is to be filtered is available on
474 standard input and the filtered contents is expected on standard output.
475
476Also, all filters are handed the following environment variables:
477- CGIT_REPO_URL ( = repo.url setting )
478- CGIT_REPO_NAME ( = repo.name setting )
479- CGIT_REPO_PATH ( = repo.path setting )
480- CGIT_REPO_OWNER ( = repo.owner setting )
481- CGIT_REPO_DEFBRANCH ( = repo.defbranch setting )
482- CGIT_REPO_SECTION ( = section setting )
483- CGIT_REPO_CLONE_URL ( = repo.clone-url setting )
484
485If a setting is not defined for a repository and the corresponding global
486setting is also not defined (if applicable), then the corresponding
487environment variable will be an empty string.
488
489Note that under normal circumstance all these environment variables are
490defined. If however the total size of the defined settings exceed the
491allocated buffer within cgit then only the environment variables that fit
492in the allocated buffer are handed to the filter.
493
494
451EXAMPLE CGITRC FILE 495EXAMPLE CGITRC FILE
452------------------- 496-------------------
453 497