summaryrefslogtreecommitdiffabout
Side-by-side diff
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
@@ -44,3 +44,3 @@ cache-root::
Path used to store the cgit cache entries. Default value:
- "/var/cache/cgit".
+ "/var/cache/cgit". See also: "MACRO EXPANSION".
@@ -157,3 +157,3 @@ 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".
@@ -239,3 +239,4 @@ project-list::
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".
@@ -291,3 +292,4 @@ scan-path::
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".
@@ -452,2 +454,22 @@ 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