[Bug] featured: true / featured: false not working as expected
CyberPunkie opened this issue · comments
I confirm:
- I am running the extended version of Hugo version 0.91.0 or above to build my site.
- I have read the Hugo Clarity theme documentation.
- I have used the example site's config files as reference.
- I have reviewed other issues in this repository and mine is not recorded.
Hugo version
hugo v0.118.2-da7983ac4b94d97d776d7c2405040de97e95c03d+extended windows/amd64 BuildDate=2023-08-31T11:23:51Z VendorInfo=gohugoio
Where is this bug showing up?
In the browser: Hugo builds the site, but something doesn't look right.
Operating system
Windows 10
Browser (if applicable)
Chrome Version 117.0.5938.132 (Official Build) (64-bit)
Current behavior
Bug 1:
featured: true
It makes the post appear in "Featured" section, but removes it from "Recent"
featured: false
It makes the post appear in "Recent" section, but removes it from "Featured"
Bug Details: I have a rogue post that when setting "featured: true" makes it appear in both Featured and Recent sections. When setting"featured: false" removes it from both sections. See attached file rogue.md
Bug 2
As per #353
featured: true + tag:featured
Should make the post appear in "Featured" section, and also pinned at the top of the post list.
I can confirm It does appear in "Featured" section but it is not pinned at the top of the post list. See attached file pinned.md
Expected behavior
Bug 1:
featured: true
It makes the post appear in "Featured" section, but removes it from "Recent"
featured: false
It makes the post appear in "Recent" section, but removes it from "Featured"
Bug 2:
featured: true + tag:featured
It makes the post appear in "Featured" section but also at the top of the main post list (home page)
Steps to reproduce
Use attached sample posts to reproduce the issue
Relevant log output
No response
Related code
No response
Preferred solution
No response
Other information
No response
Anyone?
Haven't validated this but will try.
@onweru can you also confirm?
@CyberPunkie I've tested some cases with the hugo version 0.120.4
Bug 1:
Behaved as it should be that the post is shown in the featured list when featured: true
and shown in the recent list when featured: false
.
I'm not able to reproduce the problem with the file rouge.md
.
Bug 2:
Please make sure that you have added pinFeatured = true
to the site config (might be in the file config/_default/params.toml
) which is default to false.
@chipzoller The featured posts might appear in the "Recent Posts" list that shouldn't be as the "Bug 1".
I've submitted a PR #456 for this.