Closed kaushalmodi closed 7 years ago
Yep I'm currently having trouble upgrading to v0.18(.1) because of my custom section in config.toml
:
[author] name = "Thibault ROHMER" email = "....@gmail.com" github = "TiTi" gaID = "UA-60799648-1"
[params] notoc = true disqusShortname = "thibaultrohmer"
{{ if .Site.Author.gaID }} ... mailto:{{ .Site.Author.email }} ... {{ if isset .Site.Params "disqusShortname" }}
I manage to solve the author issue by renaming [author] to [Author] in config.toml (because case is now sensitive).
Note that: updating template to {{ if .Site.author.gaID }}
did NOT help.
Right now I have NO compilation error but the google analytics condition does not work anymore: script is not included!
{{ if .Site.Author.gaID }}
compilation ok but section NOT rendered :-/{{ if isset .Site.Author "gaID" }}
compilation ok but section NOT rendered :-/{{ if .Site.Params.disqusShortname }}
compilation ok and section rendered{{ if isset .Site.Params "disqusShortname" }}
compilation ok and section NOT rendered :-/Definitely weird and breaking-change...
What should I put in both my config and my templates? Uppercase, lowercase ? sub-sections ?
@TiTi try discuss.gohugo.io
The params casing was fixed in Hugo 0.18.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hello,
We are in dire need of a spec that states:
config.toml
, what letter casing should be used consistently, etc.Coming from a non-toml and non-go background, the current state does not seem to follow any spec.. some vars are all lower case, some are upper camel case and some are lower camel case.
See my minimum working example here.
There was also a recent commit related to config variables and cases that breaks hugo building that used to work on v0.17:
This is what I have in my
config.toml
:And these are the contents in my
_default/summary.html
: