]> gitweb.ps.run Git - ps-cgit/commitdiff
Merge branch 'stable'
authorLars Hjemli <hjemli@gmail.com>
Mon, 13 Jun 2011 22:02:02 +0000 (22:02 +0000)
committerLars Hjemli <hjemli@gmail.com>
Mon, 13 Jun 2011 22:02:02 +0000 (22:02 +0000)
Conflicts:
cgitrc.5.txt

cgitrc.5.txt

index 5903a938c8c4cbe9c5b1e110ae8fbbb787f656f9..8e315786d85917ff16890d411389dad62605bd15 100644 (file)
@@ -42,7 +42,7 @@ agefile::
 
 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
@@ -161,7 +161,7 @@ header::
 
 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
@@ -243,7 +243,8 @@ noheader::
 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
@@ -295,7 +296,8 @@ 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
@@ -492,6 +494,26 @@ allocated buffer within cgit then only the environment variables that fit
 in the allocated buffer are handed to the filter.
 
 
+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
 -------------------