{{/* arguments */}}
{{`https://golang.org/pkg/text/template/#hdr-Arguments` | markdownify }}
{{`A boolean, string, character, integer, floating-point, imaginary or
complex constant in Go syntax. These behave like Go's untyped
constants.`}}
{{print true }}
{{print "foo" }}
{{print '\n' }}
{{print 42 }}
{{print 1e2 }}
{{print 1i }}
{{`The keyword nil, representing an untyped Go nil.`}}
{{print nil }}
{{`The character '.' (period)`}}
{{print . }}
{{`A variable name, which is a (possibly empty) alphanumeric string
preceded by a dollar sign`}}
{{ $foo := "bar" }}
{{ print $foo }}
{{ print $ }}
{{`The name of a field of the data, which must be a struct, preceded
by a period`}}
{{ print $.Dir }}
{{`The result is the value of the field. Field invocations may be
chained`}}
{{ print .Params.Title }}
{{`Fields can also be evaluated on variables, including chaining`}}
{{ $myPage := .Site.GetPage "section" "examples" }}
{{ print $myPage.Dir }}
{{`The name of a key of the data, which must be a map, preceded by a
period`}}
{{ $data := dict "foo" "bar" "world" 42}}
{{ print $data.foo }}
{{`Key invocations may be chained and combined with fields to any
depth`}}
{{`Keys can also be evaluated on variables, including chaining`}}
{{ $data := dict "foo" "bar" "world" 42 "more" (dict "hej" 24 "11" "me") "and" 11}}
{{ print $data.more.hej }}
{{`The name of a niladic method of the data, preceded by a period`}}
{{`Method invocations may be chained and combined with fields and keys
to any depth`}}
{{ $myPage := .Site.GetPage "section" "examples" }}
{{ print $myPage.Params.weight }}
{{`The name of a niladic function`}}
{{`The return types and values behave as in methods.`}}
{{ print now.Unix }}
{{`A parenthesized instance of one the above, for grouping.
The result may be accessed by a field or map key invocation.`}}
{{ print (.Site.GetPage "section" "examples").Dir }}
https://golang.org/pkg/text/template/#hdr-Arguments
A boolean, string, character, integer, floating-point, imaginary or
complex constant in Go syntax. These behave like Go's untyped
constants.
true
foo
10
42
100
(0+1i)
The keyword nil, representing an untyped Go nil.
<nil>
The character '.' (period)
Page("Arguments")
A variable name, which is a (possibly empty) alphanumeric string
preceded by a dollar sign
bar
Page("Arguments")
The name of a field of the data, which must be a struct, preceded
by a period
examples/basics/
The result is the value of the field. Field invocations may be
chained
Arguments
Fields can also be evaluated on variables, including chaining
examples/
The name of a key of the data, which must be a map, preceded by a
period
bar
Key invocations may be chained and combined with fields to any
depth
Keys can also be evaluated on variables, including chaining
24
The name of a niladic method of the data, preceded by a period
Method invocations may be chained and combined with fields and keys
to any depth
10
The name of a niladic function
The return types and values behave as in methods.
1527780493
A parenthesized instance of one the above, for grouping.
The result may be accessed by a field or map key invocation.
examples/