I have read through the docs and I’m pretty sure I am putting my single.html file in the correct place for a section.
I have the following:
I have created a custom theme.
But all of the blog posts are using the single.html layout from my theme’s _default directory.
What and how can I troubleshoot the problems? I tried moving the custom single.html file to all of the other places and nothing works.
I have Permalinks set? Does that affect the layouts at all?
@greathouse hi, can you paste your post’s frontmatter? Some settings in there can override what’s getting loaded.
/themes/MYTHEME/layouts/blog.single.html looks correct to me according to the docs. Personally, I’m chucking everything in
One trick to help see what template or partial is getting rendered is, to put html comments on the first and last lines.
I have those ENTERING / LEAVING statements in my templates and partials so that I can see what’s getting rendered, by doing view source.
1: putting the single layout in:
2: the list layout in
type = "post" to
type = "blog" in the frontmatter.
I think that should fix things as regards using the correct template. However, if you’ve written any other custom code elsewhere which depends on looking for
type = "post" in the frontmatter, that might need adjusted too.