hugo-theme-nightfall icon indicating copy to clipboard operation
hugo-theme-nightfall copied to clipboard

Not working disabled metadata

Open renanbastos93 opened this issue 1 year ago • 5 comments

I have setted showMetadata = false in config.toml but it doesn't work.

example

[params]
user = ""
hostname = "renanbastos.dev"
sitedescription = 'Renan Bastos has been working as a Software Engineer for over 9 years with cutting-edge technologies'
showMetadata = false
image

renanbastos93 avatar May 20 '24 19:05 renanbastos93

PR opened: https://github.com/LordMathis/hugo-theme-nightfall/pull/41

renanbastos93 avatar May 20 '24 20:05 renanbastos93

I see. So basically, if you set it to false it becomes false | true which is evaluates to true

lordmathis avatar May 21 '24 16:05 lordmathis

Wait actually the disabling works as expected but it has to be changed individually in each post frontmatter. Globally turning off post metadata is not yet implemented. I'd welcome a PR for this. I'll keep this issue open but I'll close #41

lordmathis avatar May 21 '24 16:05 lordmathis

What do you expect to do?

renanbastos93 avatar May 21 '24 17:05 renanbastos93

The if statement currently checks if .Params.showMetadata is set to false. .Params is set in post frontmatter. To be able to disable post metadata globally it also needs to check .Site.Params.showMetadata. If either of those is false the metadata on that post won't be shown

lordmathis avatar May 21 '24 18:05 lordmathis