aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp/templates/templates.go
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2020-04-07 12:29:09 -0600
committerMatthew Holt <[email protected]>2020-04-07 12:29:09 -0600
commit95f6bd7e5ca1450d95405665ee3fb7aa1adc5228 (patch)
tree5679ea74bcca6fe37b92a2535c1e765fea0014d5 /modules/caddyhttp/templates/templates.go
parentb1ce9d4db7f7ee6d8b83a29675efc10550919d11 (diff)
downloadcaddy-95f6bd7e5ca1450d95405665ee3fb7aa1adc5228.tar.gz
caddy-95f6bd7e5ca1450d95405665ee3fb7aa1adc5228.zip
templates: Update docs
Diffstat (limited to 'modules/caddyhttp/templates/templates.go')
-rw-r--r--modules/caddyhttp/templates/templates.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/caddyhttp/templates/templates.go b/modules/caddyhttp/templates/templates.go
index a0b7ffee2..d67b35b9b 100644
--- a/modules/caddyhttp/templates/templates.go
+++ b/modules/caddyhttp/templates/templates.go
@@ -40,7 +40,7 @@ func init() {
// In addition to the standard functions and Sprig functions, Caddy adds
// extra functions and data that are available to a template:
//
-// ##### **`.Args`**
+// ##### `.Args`
//
// Access arguments passed to this page/context, for example as the result of a `include`.
//
@@ -56,6 +56,14 @@ func init() {
// {{.Cookie "cookiename"}}
// ```
//
+// ##### `env`
+//
+// Gets an environment variable.
+//
+// ```
+// {{env "VAR_NAME"}}
+// ```
+//
// ##### `.Host`
//
// Returns the hostname portion (no port) of the Host header of the HTTP request.