-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 | |||
@@ -42,7 +42,7 @@ agefile:: | |||
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 |
@@ -155,7 +155,7 @@ header:: | |||
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 |
@@ -237,7 +237,8 @@ noheader:: | |||
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 |
@@ -289,7 +290,8 @@ 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 |
@@ -450,6 +452,26 @@ 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 | ||