We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here's the code for image shortcode:
image
{{- $author := .Get "author" -}} {{- $description := .Get "description" -}} {{- $src := .Get "src" -}} {{- $link := .Get "link" -}} <figure class="image"> <img src="{{ $src }}"{{ with $description }} alt="{{ . }}"{{ end }} /> {{- if $description | or $author | or (gt (len .Inner) 0) -}} <figcaption> <cite> {{ if gt (len .Inner) 0 }}{{ .Inner }}{{ end }} {{ with $author }}{{ if $link }}<a href="{{ $link }}">{{ end }}{{ . }}{{ if $link }}</a>{{ end }} {{ end }}{{ with $description }}<em>{{ . }}</em>{{ end }} </cite> </figcaption> {{- end -}} </figure>
Here's the code that throws errors:
{{< image src="https://c1.staticflickr.com/9/8426/29316998152_07355d7b6b_z.jpg" author="Joao" description="Hear me roar" link="twitter.com" />}} {{< image src="https://c1.staticflickr.com/9/8426/29316998152_07355d7b6b_z.jpg" author="Joao" description="Hear me roar" link="twitter.com" />}}
The first usage of the shortcode will throw:
ERROR: 2016/09/27 15:25:56 shortcode.go:284: in-vino-veritas:73: unclosed shortcode
Replace the above with:
{{< image src="https://c1.staticflickr.com/9/8426/29316998152_07355d7b6b_z.jpg" author="Joao" description="Hear me roar" link="twitter.com" >}}{{</ image >}} {{< image src="https://c1.staticflickr.com/9/8426/29316998152_07355d7b6b_z.jpg" author="Joao" description="Hear me roar" link="twitter.com" />}}
And it works. However, adding anything after the last shortcode will lead to the same issue, and it, too, will need a {{</ image >}}
{{</ image >}}
The text was updated successfully, but these errors were encountered:
Fix half-broken self-closing shortcodes
99dd458
Fixes gohugoio#2498
59df7db
Fixes #2498
You rock!
Sorry, something went wrong.
e3eac63
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
bep
Successfully merging a pull request may close this issue.
Here's the code for
image
shortcode:Here's the code that throws errors:
The first usage of the shortcode will throw:
Replace the above with:
And it works. However, adding anything after the last shortcode will lead to the same issue, and it, too, will need a
{{</ image >}}
The text was updated successfully, but these errors were encountered: