Weird Hugo/Theme behaviour

My setup:

Hugo version: hugo v0.91.2-1798BD3F windows/amd64 BuildDate=2021-12-23T15:33:34Z
OS: Windows 10
Theme: WingLim/hugo-tania: A simple theme for bloggers. (github.com)

I’m having a weird problem which I don’t know how to solve. I have a basic blog with a few posts and a few projects (click the following link to see what i mean). Last night I tried to add a new project/post to my site and the site stopped displaying my posts correctly and started displaying the title of my projects. Here’s what I mean, click the following link to see my site working as intended.

Properly working website: https://jsanchez.net

As you can see, i have a few posts/articles and exactly 5 “projects” below. Now, when I create a new “content/projects/new_project.md” file, the site no longer displays my articles but it display the projects names instead. See that the articles have the same name/title as the projects in the following image.

I suspect this might be a theme error but I just don’t know where to start debugging this. I tried creating different permutations of projects and I’m 100% sure it happens when I have more than 5 markdown files inside “content/projects”.

I appreciate any help, thank your for your time.

I think that when you add a project, you now have more projects than posts. Your theme is using mainSections to get the first list, and that defaults, according to the documentation, to the section with the most pages, which is now projects.

So, in your config, set mainSections specifically to the post section.

3 Likes

That worked perfectly, thank you. :heart:

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