-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 @@ -39,13 +39,13 @@ agefile:: The first line in the file is used as input to the "parse_date" function in libgit. Recommended timestamp-format is "yyyy-mm-dd hh:mm:ss". Default value: "info/web/last-modified". cache-root:: Path used to store the cgit cache entries. Default value: - "/var/cache/cgit". + "/var/cache/cgit". See also: "MACRO EXPANSION". cache-dynamic-ttl:: Number which specifies the time-to-live, in minutes, for the cached version of repository pages accessed without a fixed SHA1. Default value: "5". @@ -152,13 +152,13 @@ head-include:: header:: The content of the file specified with this option will be included verbatim at the top of all pages. Default value: none. include:: Name of a configfile to include before the rest of the current config- - file is parsed. Default value: none. + file is parsed. Default value: none. See also: "MACRO EXPANSION". index-header:: The content of the file specified with this option will be included verbatim above the repository index. This setting is deprecated, and will not be supported by cgit-1.0 (use root-readme instead). Default value: none. @@ -234,13 +234,14 @@ noheader:: Flag which, when set to "1", will make cgit omit the standard header on all pages. Default value: none. See also: "embedded". project-list:: A list of subdirectories inside of scan-path, relative to it, that should loaded as git repositories. This must be defined prior to - scan-path. Default value: none. See also: scan-path. + scan-path. Default value: none. See also: scan-path, "MACRO + EXPANSION". readme:: Text which will be used as default value for "repo.readme". Default value: none. remove-suffix:: @@ -286,13 +287,14 @@ scan-path:: A path which will be scanned for repositories. If caching is enabled, the result will be cached as a cgitrc include-file in the cache directory. If project-list has been defined prior to scan-path, scan-path loads only the directories listed in the file pointed to by project-list. Be advised that only the global settings taken before the scan-path directive will be applied to each repository. - Default value: none. See also: cache-scanrc-ttl, project-list. + Default value: none. See also: cache-scanrc-ttl, project-list, + "MACRO EXPANSION". section:: The name of the current repository section - all repositories defined after this option will inherit the current section name. Default value: none. @@ -447,12 +449,32 @@ options are only acknowledged in repo-specific config files when "enable-filter-overrides" is set to "1". Note: the "repo." prefix is dropped from the option names in repo-specific config files, e.g. "repo.desc" becomes "desc". +MACRO EXPANSION +--------------- +The following cgitrc options supports a simple macro expansion feature, +where tokens prefixed with "$" are replaced with the value of a similary +named environment variable: + +- cache-root +- include +- project-list +- scan-path + +Macro expansion will also happen on the content of $CGIT_CONFIG, if +defined. + +One usage of this feature is virtual hosting, which in its simplest form +can be accomplished by adding the following line to /etc/cgitrc: + + include=/etc/cgitrc.d/$HTTP_HOST + + EXAMPLE CGITRC FILE ------------------- .... # Enable caching of up to 1000 output entriess cache-size=1000 |