]> gitweb.ps.run Git - ps-cgit/blobdiff - cgitrc.5.txt
Makefile: fetch git tarballs from http://hjemli.net/git/git/
[ps-cgit] / cgitrc.5.txt
index c3698a643dc65a7d7cee43d3da780bbe9e844c2c..26c4bfc5bada6be120ade611118dad00d6903323 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
@@ -155,7 +155,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
@@ -237,7 +237,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
@@ -287,8 +288,10 @@ scan-path::
        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. Default value: none. See also: cache-scanrc-ttl,
-       project-list.
+       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,
+       "MACRO EXPANSION".
 
 section::
        The name of the current repository section - all repositories defined
@@ -308,7 +311,8 @@ side-by-side-diffs::
 snapshots::
        Text which specifies the default set of snapshot formats generated by
        cgit. The value is a space-separated list of zero or more of the
-       values "tar", "tar.gz", "tar.bz2" and "zip". Default value: none.
+       values "tar", "tar.gz", "tar.bz2", "tar.xz" and "zip". Default value:
+       none.
 
 source-filter::
        Specifies a command which will be invoked to format plaintext blobs
@@ -396,6 +400,12 @@ repo.logo-link::
        calculated url of the repository index page will be used. Default
        value: global logo-link.
 
+repo.module-link::
+       Text which will be used as the formatstring for a hyperlink when a
+       submodule is printed in a directory listing. The arguments for the
+       formatstring are the path and SHA1 of the submodule commit. Default
+       value: <module-link>
+
 repo.max-stats::
        Override the default maximum statistics period. Valid values are equal
        to the values specified for the global "max-stats" setting. Default
@@ -448,6 +458,26 @@ 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
 -------------------