-
-
Notifications
You must be signed in to change notification settings - Fork 692
Description
Issue Check
- I have checked existing Issues and I feel this bug has not been raised
Hugo Version Check
- My Hugo version is within the supported range
Describe the Bug
I found an incredibly important bug. My directory structure is like this: content\posts.
So I set it up this way in config/menu:
[main]]
name = "Blog"
pageRef = "posts"
weight = 10
I can see that a blog menu has been added to the homepage, and clicking on it allows me to see all the .md files in the posts folder.
However, when I set it up like this in params.toml: mainSections = ["posts"], no articles are visible on the homepage.
I've checked all possible options and can't resolve the issue, and after carefully reading the documentation, I found that my settings seem correct.
The documentation states: The articles listed in this section are derived from the mainSections setting, which allows for whatever content types you are using on your website. For instance, if you had content sections for posts and projects, you could set this setting to ["posts", "projects"].
But even so, the recent articles still won't display.
Later, I looked at the options of other Hugo themes and suddenly thought of a possibility.
I made the following change: mainSections = ["post"]. After restarting the server, the recent articles immediately became visible.
To Reproduce
just follow the above
Expected Behaviour
post or posts? Why is it correct to use "Posts" in the menu, but I must use "post" in the mainsection?
Screenshots
No response
Platform
- OS:windows10
- Browser:edge
- Version:
Hugo Version
hugo v0.155.2-d8c0dfccf72ab43db2b2bca1483a61c8660021d9+extended windows/amd64 BuildDate=2026-02-02T10:04:51ZBlowfish Version
install using git at 2026-02-13Additional Context
No response
Code of Conduct
- I agree to follow this project's Code of Conduct