@marcel91200 / caddy Mirror · read-only / commits / 95f6bd7e
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 05:15 UTC

templates: Update docs

Matthew Holt committed Apr 7, 2020 at 12:29 UTC 95f6bd7e5ca1450d95405665ee3fb7aa1adc5228
1 file changed +9 -1
modules/caddyhttp/templates/templates.go
+9 -1
@@ -40,7 +40,7 @@ func init() {
40 // In addition to the standard functions and Sprig functions, Caddy adds
41 // extra functions and data that are available to a template:
42 //
43 -// ##### **`.Args`**
43 +// ##### `.Args`
44 //
45 // Access arguments passed to this page/context, for example as the result of a `include`.
46 //
@@ -56,6 +56,14 @@ func init() {
56 // {{.Cookie "cookiename"}}
57 // ```
58 //
59 +// ##### `env`
60 +//
61 +// Gets an environment variable.
62 +//
63 +// ```
64 +// {{env "VAR_NAME"}}
65 +// ```
66 +//
67 // ##### `.Host`
68 //
69 // Returns the hostname portion (no port) of the Host header of the HTTP request.