I’ve created a layouts/_default/baseof.html with a {{ block "body" . }}{{ end }}, but my layouts/home.html is blank even if I define the body block as such:
{{ define "body" }}
Test
{{ end }}
If I add anything outside the block definition, it gets shown. What am I doing wrong?
I was reducing my page to a bare minimum that reproduced the problem and found out that it happened because I had a HTML comment outside of the block. When I removed that comment and refreshed the page, it worked. Why does this happen?