I'm having a weird problem where, only upon first generation, the first child page in a loop in apparently processed by the wrong template, see here an example. Header and footer are added in the "full" template, but should not be added for the page child, and isn't for all but the first child and the first time. (If I regenerate (delete output of this particular page first) then it is correctly generated.) If I remove the entire output dir, and generate, the problem comes back. This is extra unfortunate, because I generate the site on an external service (Netlify), so it starts from scratch every time.
blog.html has:
{{ range (.Site.Pages.Children "blog/").Slice 0 5 -}}
<article>
<h2><a href="{{ $.Rel .Url }}">{{ .Title }}</a></h2>
<p>
{{ template "date" .Date }}
{{ range $i, $t := .Tags }}{{if $i}},{{end}}
<a href="/archive/#{{ $t }}"><b>{{ $t }}</b></a>{{ end }}
</p>
{{ markdown .Content }}
</article>
{{- end }}
<nav class="pagination">
Read more in the <a href="/archive/">archive</a>.
</nav>
The relevant config:
blog.html: blog/*.md
yaml
directorify
inner-template
template full
relativize
Any idea what's going on?
I'm having a weird problem where, only upon first generation, the first child page in a loop in apparently processed by the wrong template, see here an example. Header and footer are added in the "full" template, but should not be added for the page child, and isn't for all but the first child and the first time. (If I regenerate (delete output of this particular page first) then it is correctly generated.) If I remove the entire output dir, and generate, the problem comes back. This is extra unfortunate, because I generate the site on an external service (Netlify), so it starts from scratch every time.
blog.html has:
The relevant config:
Any idea what's going on?