mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-22 00:17:16 +08:00
templates: Document httpError
function (#4972)
* added the httpError function into the document * Update templates.go * Update templates.go * Fix gofmt Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
This commit is contained in:
parent
f2a7e7c966
commit
66959d9f18
|
@ -189,6 +189,14 @@ func init() {
|
|||
// {{.RespHeader.Set "Field-Name" "val"}}
|
||||
// ```
|
||||
//
|
||||
// ##### `httpError`
|
||||
//
|
||||
// Returns an error with the given status code to the HTTP handler chain.
|
||||
//
|
||||
// ```
|
||||
// {{if not (fileExists $includedFile)}}{{httpError 404}}{{end}}
|
||||
// ```
|
||||
//
|
||||
// ##### `splitFrontMatter`
|
||||
//
|
||||
// Splits front matter out from the body. Front matter is metadata that appears at the very beginning of a file or string. Front matter can be in YAML, TOML, or JSON formats:
|
||||
|
|
Loading…
Reference in New Issue
Block a user