Blog list layout not rendered

Is there any reason why mysite/blog/ list page doesn’t use the blog/list.html layout given my directory structure? According to [SOLVED] Hugo uses _default/list.html instead of blog/list.html for /blog/ and Unify the section template lookup order, please comment I should be able to.

Hugo version: v0.49/extended darwin/amd64 BuildDate: unknown

├── content
│   ├── _index.md
│   ├── blog
│   │   ├── post-1.md
│   │   ├── post-2.md
│   │   ├── post-3.md
│   ├── get-started.md
│   └── services.md
├── data
├── layouts
│   ├── 404.html
│   ├── _default
│   │   ├── baseof.html
│   │   ├── list.html -----> Don't want to use this layout
│   │   ├── taxonomy.html
│   │   └── terms.html
│   ├── blog
│   │   ├── li.html
│   │   ├── list.html -----> Want to use this layout
│   │   ├── single.html
│   │   ├── summary-with-image.html
│   │   └── summary.html
│   ├── get-started
│   │   └── single.html
│   ├── index.html
│   ├── partials
│   │   ├── site-footer.html
│   │   ├── site-header.html
│   │   ├── site-scripts-footer.html
│   │   ├── site-scripts-head.html

I wrote 2 posts about this:

https://discourse.gohugo.io/t/my-experiences-with-hugos-template-lookup-order/9959/3
https://discourse.gohugo.io/t/see-which-template-is-used-by-hugo/9983/3

Hope this helps.

1 Like

Thanks, but it’s not really helping me. In your post,

If an additional _index.md is created in the directory, it is used as a list page for the directory contents. You can assign an individual list template to it by creating layouts/hugo-docs/list.html . This template is then automatically taken by Hugo because the directory names are identical ( content/hugo-docs and layouts/hugo-docs ).

So, I created an empty _index.md file in content/blog/ and /layouts/blog/list.html is not being rendered. I’ve also tried to specify the layout in that _index.md file, layout: "list"

Do you have a git repo to look at?

It’s a private repo, what’s your github name and I’ll share. Thanks!

I think the hugo binary is outdated, site is using 18.1. I’m not sure why it’s not using the latest version I have installed…

Edit:
This project I inherited came with a bin directory that had an old Hugo version. I simply got rid of the bin directory and added node_module hugo-bin and updated the gulp file.