summaryrefslogtreecommitdiffabout
authorLars Hjemli <hjemli@gmail.com>2011-06-13 21:58:39 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2011-06-13 21:59:50 (UTC)
commitef13e5eafe16474bb5b3c3b8156bbb24a9249b2e (patch) (unidiff)
tree9ab02e11a594490e19788cfe25443d84223d096a
parent2a0c9dcbe81db150bd778ce1ea1aff550d198c4d (diff)
downloadcgit-ef13e5eafe16474bb5b3c3b8156bbb24a9249b2e.zip
cgit-ef13e5eafe16474bb5b3c3b8156bbb24a9249b2e.tar.gz
cgit-ef13e5eafe16474bb5b3c3b8156bbb24a9249b2e.tar.bz2
cgitrc.5.txt: describe macro expansion of cgitrc options
This is a new feature in cgit-0.9 which was formerly undocumented. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--cgitrc.5.txt30
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
@@ -39,13 +39,13 @@ agefile::
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
43cache-root:: 43cache-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
47cache-dynamic-ttl:: 47cache-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
@@ -152,13 +152,13 @@ head-include::
152header:: 152header::
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
156include:: 156include::
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
160index-header:: 160index-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.
@@ -234,13 +234,14 @@ 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
237project-list:: 237project-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
242readme:: 243readme::
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
246remove-suffix:: 247remove-suffix::
@@ -286,13 +287,14 @@ 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
294section:: 296section::
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
@@ -447,12 +449,32 @@ 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
449Note: the "repo." prefix is dropped from the option names in repo-specific 451Note: the "repo." prefix is dropped from the option names in repo-specific
450config files, e.g. "repo.desc" becomes "desc". 452config files, e.g. "repo.desc" becomes "desc".
451 453
452 454
455MACRO EXPANSION
456---------------
457The following cgitrc options supports a simple macro expansion feature,
458where tokens prefixed with "$" are replaced with the value of a similary
459named environment variable:
460
461- cache-root
462- include
463- project-list
464- scan-path
465
466Macro expansion will also happen on the content of $CGIT_CONFIG, if
467defined.
468
469One usage of this feature is virtual hosting, which in its simplest form
470can be accomplished by adding the following line to /etc/cgitrc:
471
472 include=/etc/cgitrc.d/$HTTP_HOST
473
474
453EXAMPLE CGITRC FILE 475EXAMPLE 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
458cache-size=1000 480cache-size=1000