You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Hmmm... Not from the top of my head. Is your site/sources of your site public? Or maybe you could try reproducing the problem with a smaller setup, so we can narrow that down to something in sources?
I tried reordering blog/* and blog.html in case somehow sometimes blog.html was picking up on already processed and rendered .Content, but that didn't help.
Changing {{ markdown .Content }} for {{ markdown .Raw }} produces the correct output. But I don't really understand why, you?
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?
The text was updated successfully, but these errors were encountered: