aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mars-attacks.org>2013-10-07 17:12:14 +0200
committerNicolas Vigier <boklm@mars-attacks.org>2013-10-07 17:12:14 +0200
commit697cef42fb1320f8e1e504586b39519e382bb1b9 (patch)
treec6c603700257c31f7ff54b5a7c8d99409e212af4
parentf6e7618153610805af91c0b4a3f43d18737f52fc (diff)
Add some documentation about template variables
-rw-r--r--README29
1 files changed, 29 insertions, 0 deletions
diff --git a/README b/README
index 34accb4..ab66fbe 100644
--- a/README
+++ b/README
@@ -106,3 +106,32 @@ The following configuration options are available :
gl_template:
template file used to define the repos
+
+Template variables
+------------------
+
+The following variables are available in all templates :
+
+ config:
+ The general config
+
+ r:
+ The repos, groups and users definitions
+
+The following variables are available in repo definition templates :
+
+ repo:
+ The repo name
+
+ repo_conf:
+ A function to get the value of some configuration option, for
+ the current repo. It will first try to get it from the repo
+ specific configuration, and if not defined will return the
+ configuration from the repo definition origin, or the main
+ configuration.
+
+ origin_conf:
+ This is the same as repo_conf, except that it will skip the repo
+ specific configuration. You will use this function when you
+ don't want the option to be overriden by the repo definition.
+