I’m having an issue where the {{ .Content }}
for the first item in a list loads, but not for the other items in the list even though their other attributes load.
I have a shortcode {{< key_finding >}}
that is called from within the content of another content type called chapter
. For example:
Within content/chapter/Two.md
:
{{< key_finding chapter="2" >}}
All of the Key Findings are stored in content/key_finding
. My shortcode template calls all of the key findings within the specified chapter as follows:
<div class="container-fluid owl-carousel-wrapper">
<div class="owl-carousel owl-theme">
{{ range where (index .Site.Sections "key_finding") ".Page.Params.chapter" .Params.chapter }}
{{ with .Page }}
<div id="finding-{{ .Params.chapter }}{{ .Params.ordinal }}" data-ohash="finding-{{ .Params.chapter }}{{ .Params.ordinal }}" class="owl-carousel-item container col-md-offset-1 col-md-10">
<h3>Key Finding {{ .Params.ordinal }}: {{ .Params.title }}</h3>
<p>{{ .Content }}</p>
<div class="supporting-evidence">
<a href="{{ safeURL .Params.gcis_uri }}" class="traceable_account_a qtip-top" title="Supporting Evidence">Supporting Evidence</a>
</div>
{{ end }}
</div>
{{ end }}
</div>
</div>
In the carousel where they load, the variables that load for all of the Key Findings are {{ .Params.title }}
and {{ .Params.ordinal }}
but for some reason {{ .Content }}
only loads for the first one. If I change a character anywhere in the template, or add a line break, save, and refresh, then the {{ .Content }}
for each list item shows up. But when I restart hugo server, the issue happens again.
This is on my local. However we deployed the site to a stage area and it does the same thing.
Not really sure what the issue is, any help appreciated.
It looks like there is a similar, unanswered, question here: