gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
73.49k stars 7.37k forks source link

conflict in `Related` with `.Site.Params.tags` (similar to already fixed (#9188) #12609

Open bryndin opened 1 week ago

bryndin commented 1 week ago

9188 is still happening. The problem is similar to this report: https://github.com/gohugoio/hugo/issues/9188#issuecomment-1130334193

defining Params.tags in hugo.toml freaks out .Site.RegularPages.Related

[params.tags]
  disable = false # Disables and hides the widget
{{ $related := .Site.RegularPages.Related . | first .Site.Params.relatedPosts.Limit }}

Error: error calling Related: indexing currently not supported for index "tags" and type maps.Params

Renaming params to, say [params.tags2222] fixes the problem.

What version of Hugo are you using (hugo version)?

hugo v0.127.0-74e0f3bd63c51f3c7a0f07a7c779eec9e922957e+extended linux/amd64 BuildDate=2024-06-05T10:27:59Z VendorInfo=snap:0.127.0

Does this issue reproduce with the latest release?