docs: Update links, and change references of v2 branch to master

This commit is contained in:
Matthew Holt 2020-03-23 23:01:44 -06:00
parent ee55602b14
commit e8e0ec148b
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5
5 changed files with 6 additions and 6 deletions

View file

@ -104,7 +104,7 @@ Save that, then restart Caddy, then reload the browser tab. You should see:
Page loaded at: {{now | date "Mon Jan 2 15:04:05 MST 2006"}} Page loaded at: {{now | date "Mon Jan 2 15:04:05 MST 2006"}}
``` ```
With Caddy's [templates module](/docs/json/apps/http/servers/errors/routes/handle/templates/), you can do a lot of useful things with static files, such as including other HTML files, making sub-requests, setting response headers, working with data structures, and more! With Caddy's [templates module](/docs/modules/http.handlers.templates), you can do a lot of useful things with static files, such as including other HTML files, making sub-requests, setting response headers, working with data structures, and more!
<aside class="complete">✅ Templates</aside> <aside class="complete">✅ Templates</aside>

View file

@ -4,7 +4,7 @@ title: templates (Caddyfile directive)
# templates # templates
Executes the response body as a [template](/docs/json/apps/http/servers/errors/routes/handle/templates/) document. Templates provide functional primitives for making simple dynamic pages. Features include HTTP subrequests, HTML file includes, Markdown rendering, JSON parsing, basic data structures, randomness, time, and more. Executes the response body as a [template](/docs/modules/http.handlers.templates) document. Templates provide functional primitives for making simple dynamic pages. Features include HTTP subrequests, HTML file includes, Markdown rendering, JSON parsing, basic data structures, randomness, time, and more.
## Syntax ## Syntax

View file

@ -146,7 +146,7 @@ file {
By files. By files.
- `root` defines the directory in which to look for files. Default is the current working directory, or the `root` [variable](https://caddyserver.com/docs/json/apps/http/servers/errors/routes/handle/vars/) (`{http.vars.root}`) if set. - `root` defines the directory in which to look for files. Default is the current working directory, or the `root` [variable](/docs/modules/http.handlers.vars) (`{http.vars.root}`) if set.
- `try_files` checks files in its list that match the try_policy. - `try_files` checks files in its list that match the try_policy.
- `try_policy` specifies how to choose a file. Default is `first_exist`. - `try_policy` specifies how to choose a file. Default is `first_exist`.
- `first_exist` checks for file existence. The first file that exists is selected. - `first_exist` checks for file existence. The first file that exists is selected.

View file

@ -76,9 +76,9 @@ Requirements:
- [Go](https://golang.org/dl) 1.14 or newer - [Go](https://golang.org/dl) 1.14 or newer
- [Go modules](https://github.com/golang/go/wiki/Modules) enabled - [Go modules](https://github.com/golang/go/wiki/Modules) enabled
Download the `v2` branch source code: Download the source code:
<pre><code class="cmd bash">git clone -b v2 "https://github.com/caddyserver/caddy.git"</code></pre> <pre><code class="cmd bash">git clone "https://github.com/caddyserver/caddy.git"</code></pre>
Build: Build:

View file

@ -2,7 +2,7 @@
<nav> <nav>
<a href="https://github.com/caddyserver/caddy/releases">Download</a> <a href="https://github.com/caddyserver/caddy/releases">Download</a>
<a href="/docs/">Documentation</a> <a href="/docs/">Documentation</a>
<a href="https://github.com/caddyserver/caddy/tree/v2">GitHub</a> <a href="https://github.com/caddyserver/caddy">GitHub</a>
<a href="https://caddy.community">Community</a> <a href="https://caddy.community">Community</a>
<a href="/v1/">v1</a> <a href="/v1/">v1</a>
<a href="https://www.ardanlabs.com/my/contact-us?dd=caddy" class="red button">Support</a> <a href="https://www.ardanlabs.com/my/contact-us?dd=caddy" class="red button">Support</a>