If a page calls a shortcode that in turns renders other page’s content with their own shortcode calls then the latter page’s content is not rendered (no error is printed with verbose flag).
Is this illegal use of shortcodes in hugo or a bug?
That’s a bit of a complex explanation so here’s the basic sequence I use:
- content/post/main.md - Page to render (front matter omitted)
...
{{% loadsomeotherpages %}}
...
- layouts/shortcodes/loadsomeotherpages.html
{{ range where .Page.Site.Pages "Section" "event" }}
{{ .Content }}
{{ end }}
- content/event/pagenotrendered.md - (front matter omitted)
[Who]({{< relref "about.md" >}}) is the author?
I expect to see “Who is the author?” but it is missing.
However, if I add any other shortcode to main.md (e.g. another relref) then I see “Who is the author?” rendered.