chipzoller / hugo-clarity

A theme for Hugo based on VMware Clarity
Other
577 stars 262 forks source link

[Bug] featured: true / featured: false not working as expected #451

Closed CyberPunkie closed 8 months ago

CyberPunkie commented 11 months ago

I confirm:

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 https://github.com/chipzoller/hugo-clarity/pull/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

pinned.md rogue.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

CyberPunkie commented 10 months ago

Anyone?

chipzoller commented 10 months ago

Haven't validated this but will try.

chipzoller commented 10 months ago

@onweru can you also confirm?

LukeHong commented 10 months ago

@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.

LukeHong commented 8 months ago

@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.