diff options
Diffstat (limited to 'cgitrc.5.txt')
-rw-r--r-- | cgitrc.5.txt | 60 |
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 | ||
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 |
@@ -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 | ||
85 | css:: | 86 | css:: |
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 | ||
109 | enable-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 | |||
108 | enable-index-links:: | 114 | enable-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 | ||
293 | section:: | 300 | section:: |
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:: | |||
308 | snapshots:: | 315 | snapshots:: |
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 | ||
313 | source-filter:: | 321 | source-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 | ||
321 | summary-branches:: | 329 | summary-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 | ------------------- |
350 | repo.about-filter:: | 358 | repo.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 | ||
354 | repo.clone-url:: | 362 | repo.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 | ||
358 | repo.commit-filter:: | 366 | repo.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 | ||
362 | repo.defbranch:: | 370 | repo.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 | ||
429 | repo.source-filter:: | 437 | repo.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 | ||
433 | repo.url:: | 441 | repo.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 | |||
448 | config files, e.g. "repo.desc" becomes "desc". | 456 | config files, e.g. "repo.desc" becomes "desc". |
449 | 457 | ||
450 | 458 | ||
459 | FILTER 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 | |||
476 | Also, 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 | |||
485 | If a setting is not defined for a repository and the corresponding global | ||
486 | setting is also not defined (if applicable), then the corresponding | ||
487 | environment variable will be an empty string. | ||
488 | |||
489 | Note that under normal circumstance all these environment variables are | ||
490 | defined. If however the total size of the defined settings exceed the | ||
491 | allocated buffer within cgit then only the environment variables that fit | ||
492 | in the allocated buffer are handed to the filter. | ||
493 | |||
494 | |||
451 | EXAMPLE CGITRC FILE | 495 | EXAMPLE CGITRC FILE |
452 | ------------------- | 496 | ------------------- |
453 | 497 | ||