about summary refs log tree commit diff stats
path: root/cgitrc.5.txt
diff options
context:
space:
mode:
Diffstat (limited to 'cgitrc.5.txt')
-rw-r--r--cgitrc.5.txt52
1 files changed, 47 insertions, 5 deletions
diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 10b86f3..8e31578 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",
@@ -320,7 +326,7 @@ source-filter::
320 and the name of the blob as its only command line argument. The STDOUT 326 and the name of the blob as its only command line argument. The STDOUT
321 from the command will be included verbatim as the blob contents, i.e. 327 from the command will be included verbatim as the blob contents, i.e.
322 this can be used to implement e.g. syntax highlighting. Default value: 328 this can be used to implement e.g. syntax highlighting. Default value:
323 none. 329 none. See also: "FILTER API".
324 330
325summary-branches:: 331summary-branches::
326 Specifies the number of branches to display in the repository "summary" 332 Specifies the number of branches to display in the repository "summary"
@@ -353,7 +359,7 @@ REPOSITORY SETTINGS
353------------------- 359-------------------
354repo.about-filter:: 360repo.about-filter::
355 Override the default about-filter. Default value: none. See also: 361 Override the default about-filter. Default value: none. See also:
356 "enable-filter-overrides". 362 "enable-filter-overrides". See also: "FILTER API".
357 363
358repo.clone-url:: 364repo.clone-url::
359 A list of space-separated urls which can be used to clone this repo. 365 A list of space-separated urls which can be used to clone this repo.
@@ -361,7 +367,7 @@ repo.clone-url::
361 367
362repo.commit-filter:: 368repo.commit-filter::
363 Override the default commit-filter. Default value: none. See also: 369 Override the default commit-filter. Default value: none. See also:
364 "enable-filter-overrides". 370 "enable-filter-overrides". See also: "FILTER API".
365 371
366repo.defbranch:: 372repo.defbranch::
367 The name of the default branch for this repository. If no such branch 373 The name of the default branch for this repository. If no such branch
@@ -432,7 +438,7 @@ repo.section::
432 438
433repo.source-filter:: 439repo.source-filter::
434 Override the default source-filter. Default value: none. See also: 440 Override the default source-filter. Default value: none. See also:
435 "enable-filter-overrides". 441 "enable-filter-overrides". See also: "FILTER API".
436 442
437repo.url:: 443repo.url::
438 The relative url used to access the repository. This must be the first 444 The relative url used to access the repository. This must be the first
@@ -452,6 +458,42 @@ Note: the "repo." prefix is dropped from the option names in repo-specific
452config files, e.g. "repo.desc" becomes "desc". 458config files, e.g. "repo.desc" becomes "desc".
453 459
454 460
461FILTER API
462----------
463- about filter::
464 This filter is given no arguments.
465 The about text that is to be filtered is available on standard input and the
466 filtered text is expected on standard output.
467- commit filter::
468 This filter is given no arguments.
469 The commit message text that is to be filtered is available on standard input
470 and the filtered text is expected on standard output.
471- source filter::
472 This filter is given a single parameter: the filename of the source file to
473 filter. The filter can use the filename to determine (for example) the syntax
474 highlighting mode.
475 The contents of the source file that is to be filtered is available on
476 standard input and the filtered contents is expected on standard output.
477
478Also, all filters are handed the following environment variables:
479- CGIT_REPO_URL ( = repo.url setting )
480- CGIT_REPO_NAME ( = repo.name setting )
481- CGIT_REPO_PATH ( = repo.path setting )
482- CGIT_REPO_OWNER ( = repo.owner setting )
483- CGIT_REPO_DEFBRANCH ( = repo.defbranch setting )
484- CGIT_REPO_SECTION ( = section setting )
485- CGIT_REPO_CLONE_URL ( = repo.clone-url setting )
486
487If a setting is not defined for a repository and the corresponding global
488setting is also not defined (if applicable), then the corresponding
489environment variable will be an empty string.
490
491Note that under normal circumstance all these environment variables are
492defined. If however the total size of the defined settings exceed the
493allocated buffer within cgit then only the environment variables that fit
494in the allocated buffer are handed to the filter.
495
496
455MACRO EXPANSION 497MACRO EXPANSION
456--------------- 498---------------
457The following cgitrc options supports a simple macro expansion feature, 499The following cgitrc options supports a simple macro expansion feature,