Pages not generated after upgrading from 0.143.0 to 0.147.5

Repository on which this happens:

Version 0.143.0 works. A specific example for clarity:

content\en\01-introduction-to-utilitarianism.md

has a slug:

slug: "introduction-to-utilitarianism"

This file is generated:

public\en\introduction-to-utilitarianism\index.html

and is accessible locally:

http://localhost:1313/introduction-to-utilitarianism/

:warning: BUT :warning:

With 0.147.5 the folder is not created:

public\en\introduction-to-utilitarianism

Note: the _index.html and _index.md pages are generated successfully on 0.147.5 but Iโ€™m unsure what I need to adjust to make the rest of the pages generate as they did in the old version.

Thank you so much for your time๐Ÿ™‡โ€โ™‚๏ธ

when I build your new-hugo branch I get:

WARN  found no layout file for "html" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

having a look at your layouts folder you have

layouts/_default/baseof.html
layouts/_default/book.html
layouts/_default/list.html
layouts/_page/single.html
  • with hugo 146+ thereโ€™s no _default any more (just for backward compatibility
  • _page does not address the kind page (would match a toplevel section _page I guess.
  • for most cases you can use either the default layout single.html or the kind page.html

==> moving all these layouts directly to the toplevel seems to do the trick:

layouts/baseof.html
layouts/book.html
layouts/list.html
layouts/single.html

now you can delete the _default and _page folder :wink:

                   | EN  | ES  | DE
-------------------+-----+-----+------
  Pages            |  88 |  26 |  28
  Paginator pages  |   0 |   0 |   0
  Non-page files   |   0 |   0 |   0
  Static files     | 157 | 157 | 157
  Processed images |   0 |   0 |   0
  Aliases          |   0 |   0 |   0
  Cleaned          |   0 |   0 |   0

more details here:

1 Like

Thank you @irkode for such a thorough write up and an education :man_bowing:

After the changes you recommended all the pages show up as expected in dev and in the built version of the website :rocket:

The Vercel deployment works as expected as well - problem solved :white_check_mark:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.