mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Merge commit '8b9803425e63e1b1801f8d5d676e96368d706722'
This commit is contained in:
@@ -32,7 +32,7 @@ This shortcode performs error checking, then renders an HTML `img` element with
|
||||
{{ errorf "The %q shortcode was unable to find %s. See %s" $.Name $src $.Position }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "The %q shortcode requires a 'src' parameter. See %s" .Name .Position }}
|
||||
{{ errorf "The %q shortcode requires a 'src' argument. See %s" .Name .Position }}
|
||||
{{ end }}
|
||||
{{< /code >}}
|
||||
|
||||
@@ -46,5 +46,5 @@ Hugo renders the page to:
|
||||
{{% note %}}
|
||||
In the shortcode template above, the [`with`] statement is used to create conditional blocks. Remember that the `with` statement binds context (the dot) to its expression. Inside of a `with` block, preface shortcode method calls with a `$` to access the top level context passed into the template.
|
||||
|
||||
[`with`]: /functions/go-template/with
|
||||
[`with`]: /functions/go-template/with/
|
||||
{{% /note %}}
|
||||
|
Reference in New Issue
Block a user