Closed paskal closed 8 months ago
Came here to post about exactly this too! (@paskal Thank you for the detailed description.)
Figuring out if Params.author
is set but is string and not a trivial task, see reflect.IsMap and this discussion for reference.
Thank you @paskal for fixing this issue, it has been merged into master. sorry for the late reply......
@paskal There's a bug in the config that you've changed.
[params.author]
name = "Jane" # essential # 必需
url = "/about" # optional # 可选
logoTitle = "Jane" # default: the title value # 默认值: 上面设置的title值
keywords = ["Hugo", "theme","jane"]
description = "Hugo theme jane example site."
the logoTitle
& keywords
& description
& etc. will be parsed as params.author.logoTitle
& params.author.keywords
...
they should be params.logoTitle
.
I'm not sure this is TOML syntax problem (https://toml.io/en/v1.0.0#table) Or Hugo TOML parser problem yet.
I fix this at https://github.com/xianmin/hugo-theme-jane/commit/baa2b23d3151037394c0737b29ea3baf98506621
Hello!
hugo
with version 0.120.2 and newer says following on the build:This theme should be altered to use
Params.author
as a fallback ifSite.Author
(keysname
,email
andurl
) is absent. The problem is thatParams.author
is already used as a substitute forSite.Author.name
in this theme, so it would be a breaking change to remove all the old key usages in favour of using onlyParams.author.name
andSite.Author.name
.I'll prepare the changes, and I guess I'll add throwing an error if
Params.author
is present as a string so that it will break explicitly and the theme users would be fully aware of what they need to change to make it work.