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

Inconsistent param case handling inside with #6077

Closed
VincentTam opened this issue Jul 6, 2019 · 2 comments
Closed

Inconsistent param case handling inside with #6077

VincentTam opened this issue Jul 6, 2019 · 2 comments

Comments

@VincentTam
Copy link

Background

While working on pacollins/hugo-future-imperfect-slim#31, I've created a site param called gitProvider. However, mixed case variable names don't work inside {{ with }}

Problem

# config.toml
[params]
  foo = "bar"
  [params.staticman]
    gitProvider = "gitlab"
worked failed
result gitlab
// Go-HTML template file
{{ with .Site.Params.staticman }}{{ .gitProvider }}{{ end }}    // failed
{{ with .Site.Params.staticman }}{{ .gitprovider }}{{ end }}    // worked
{{ .Site.Params.staticman.gitProvider }}  // worked
{{ .Site.Params.staticman.gitprovider }}  // worked

Is it a bug? It seems that Hugo supports mixed case variables, but not inside {{ with }}

I'm using the latest stable version of Hugo on Ubuntu 18.04.

$ hugo version
Hugo Static Site Generator v0.55.6/extended linux/amd64 BuildDate: 2019-05-18T11:36:21Z
@bep bep self-assigned this Jul 6, 2019
@bep bep added this to the v0.56 milestone Jul 6, 2019
@bep bep modified the milestones: v0.56, v0.57, v0.58 Jul 26, 2019
@bep bep modified the milestones: v0.58, v0.59 Aug 13, 2019
VincentTam added a commit to VincentTam/hugo-swift-theme that referenced this issue Aug 22, 2019
@bep bep modified the milestones: v0.59, v0.60 Sep 6, 2019
@bep bep modified the milestones: v0.60, v0.61 Oct 21, 2019
@bep bep modified the milestones: v0.61, v0.62, v0.63 Nov 25, 2019
@bep bep modified the milestones: v0.63, v0.64 Dec 11, 2019
@bep bep modified the milestones: v0.64, v0.65 Jan 22, 2020
@bep bep modified the milestones: v0.65, v0.66 Jan 30, 2020
@bep bep modified the milestones: v0.66, v0.67 Mar 2, 2020
@bep bep modified the milestones: v0.67, v0.68 Mar 9, 2020
@bep bep modified the milestones: v0.68, v0.69 Mar 20, 2020
@bep bep modified the milestones: v0.69, v0.70 Apr 8, 2020
@bep bep modified the milestones: v0.70, v0.71 Apr 28, 2020
@bep bep modified the milestones: v0.71, v0.72 May 18, 2020
@bep bep modified the milestones: v0.72, v0.73 May 31, 2020
@bep bep modified the milestones: v0.73, v0.74 Jun 23, 2020
@bep bep modified the milestones: v0.74, v0.75 Jul 13, 2020
@bep bep modified the milestones: v0.75, v0.76 Sep 14, 2020
@bep bep modified the milestones: v0.76, v0.77 Oct 6, 2020
@bep bep modified the milestones: v0.77, v0.78 Oct 30, 2020
@bep bep modified the milestones: v0.78, v0.83 Apr 23, 2021
@jmooring
Copy link
Member

jmooring commented May 1, 2021

Unable to reproduce with v0.83.

@jmooring jmooring closed this as completed May 1, 2021
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants