If I use a shortcode inside a block redefinition, I get the below error.
Am I doing something wrong?
$ hugo --verbose
INFO 2019/12/08 07:17:19 No translation bundle found for default language "en"
INFO 2019/12/08 07:17:19 Translation func for language en not found, use default.
INFO 2019/12/08 07:17:19 i18n not initialized; if you need string translations, check that you have a bundle in /i18n that matches the site language or the default language.
Total in 17 ms
Error: add site dependencies: load resources: loading templates: "/home/mhh/sites/scgit/layouts/index.html:2:1": parse failed: template: index.html:2: unexpected "<" in command
The error happens in both v0.60.1
as well as v0.58.3
.
The code can be found in this public repository.
If you don’t want to use the repo, you can reproduce by:
- Create a new site
- Add a file
layouts/_default/baseof.html
with the following content:<html><head></head> <body> {{block "main" .}} <h1>Hello</h1> {{end}} </body></html>
- Add file
layouts/index.html
with the following content:{{define "main"}} {{< gist user 12345 >}} {{end}}