mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
doc: move the index func reference to where it's used
This commit is contained in:
parent
da08fad5f3
commit
beacfcf865
1 changed files with 4 additions and 4 deletions
|
@ -144,10 +144,6 @@ range.
|
|||
{{ $element }}
|
||||
{{ end }}
|
||||
|
||||
The `index` function is a [Go][] built-in, and you can read about it [here][gostdlibpkgtexttemplate]. `index`:
|
||||
|
||||
> ...returns the result of indexing its first argument by the following arguments. Thus "index x 1 2 3" is, in Go syntax, `x[1][2][3]`. Each indexed item must be a map, slice, or array.
|
||||
|
||||
### Conditionals
|
||||
|
||||
`if`, `else`, `with`, `or` & `and` provide the framework for handling conditional
|
||||
|
@ -224,6 +220,10 @@ illustration of how to use the pipes.
|
|||
|
||||
Access the page parameter called "disqus_url" and escape the HTML.
|
||||
|
||||
The `index` function is a [Go][] built-in, and you can read about it [here][gostdlibpkgtexttemplate]. `index`:
|
||||
|
||||
> ...returns the result of indexing its first argument by the following arguments. Thus "index x 1 2 3" is, in Go syntax, `x[1][2][3]`. Each indexed item must be a map, slice, or array.
|
||||
|
||||
**Example 3:**
|
||||
|
||||
{{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
|
||||
|
|
Loading…
Reference in a new issue