I’m trying to rebuild my site and when I try to pass in custom variables added in hugo.toml, it wasn’t working. So I passed in just the following to see what I got:
{{ .Site.Params }}
Hugo returned the following on the page:
map[]
If I pass in just {{ .Params }} for the page params, I get the following:
map[date:2023-11-23 11:34:45 -0500 EST draft:false iscjklanguage:false lastmod:2023-11-23 11:34:45 -0500 EST menu:map[main:map[weight:1]] publishdate:2023-11-23 11:34:45 -0500 EST title:Home]
So for some odd reason Hugo is not letting me access site parameters. Very odd, its worked before in the same context.
That seemed to work. Calling {{ .Site.Params }} in a layouts/partial file started returning “map[author=‘example’…]” and I’m able to call {{ .Site.Params.author }} for example and it returns what’s set in that param.
I think it’s a case of me trying to do things by memory, and I must have remembered wrongly about how to put in custom site parameters.