Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

params with upper-case characters #22

Closed
Intelligent2013 opened this issue Dec 24, 2016 · 1 comment
Closed

params with upper-case characters #22

Intelligent2013 opened this issue Dec 24, 2016 · 1 comment
Labels

Comments

@Intelligent2013
Copy link

Looks like the parameters with upper-case characters don't recognition with 'isset' function.

For example, config.toml has parameter
googleAnalytics = "UA-12345678-123"
But I get the message 'You must set a googleAnalytics UA-Code within the global config.toml Params.' on the page.

I've made a changes in the file themes\gohugo-amp\layouts\partials\amp\google-analytics.html:
from
{{ if isset $.Site.Params "googleAnalytics" }}
to
{{ if isset $.Site.Params "googleanalytics" }}
and everything is working now.

But the strings:
{{ printf "%s" $.Site.Params.googleAnalytics }}
{{ printf "%s" $.Site.Params.googleanalytics }}
work both.

The same problem in the file 'app-banner-header.html' and others.

@wildhaber
Copy link
Owner

@Intelligent2013 thanks for reporting this issue.

It should be fixed in the current branch develop. I'll make a versioned update in master as soon as its tested.

Related PR: #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants