From 95f6bd7e5ca1450d95405665ee3fb7aa1adc5228 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Tue, 7 Apr 2020 12:29:09 -0600 Subject: templates: Update docs --- modules/caddyhttp/templates/templates.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/caddyhttp/templates/templates.go b/modules/caddyhttp/templates/templates.go index a0b7ffe..d67b35b 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. -- cgit v1.2.3