Hugo

Site not working after updating to 0.55

Per onedrawingperday’s suggestion I’m posting here.

In short, the homepage doesn’t lost list of posts.

My theme kiss was updated with suggested changes from @onedrawingperday, but it still seems to be buggy using the latest version of hugo (0.58.0).

https://www.ribice.ba/

The index page is not build correctly, the blog pages are fine.

I just cloned your theme and the exampleSite almost works…you just need to add the line themesDir = "../.." to config.toml.

However, for your personal site, we’d need to see the code.

The code’s available here: https://gitlab.com/ribice/blog/

I think you need to move your blog posts pages into a subdirectory under content.

Because your kiss theme ranges through Regular Pages which are in mainSections all the pages which are in the root of the /content directory are ignored.

That did work but now all posts are under /posts/ URL, which I don’t like.

Previously it worked without that. What do I need to do in order to achieve it again?

Try using .Site.RegularPages instead of mainSections in your list templates.

Or you could set the URL structure in your config.toml file

I’ve tried this:

{{ $pages := where site.RegularPages "Type" "in" site.RegularPages }}

But the result is the same.

I’d rather avoid having to change the config.tom as it would mean a breaking change for theme users.

You are confusing Type which is an alias of Section with Hugo’s built in Page collections.

Please have a look at the Docs. There is a table that explains Hugo’s Page collections.

Also see the code sample posted in Hugo’s 0.57.2 release notes and the example provided in the themes repo issue about the broken page lists.