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

Menu url property is capitalized, not uppercase. Use {{ .Url }}, not {{ .URL }}. #1454

Closed
ShaunDychko opened this issue Sep 23, 2015 · 2 comments
Labels

Comments

@ShaunDychko
Copy link

While following the menu docs at http://gohugo.io/extras/menus/, I had to use {{ .Url }} rather than {{ .URL }}. This issue also causes some downloaded themes to fail. Is there a need for a pull request on the docs (I would be happy to make this), or is there something peculiar with my installation?

I added

[[menu.main]]
    name = "Blog"
    identifier = "blog"
    url = "/blog/"

to config.toml. I confirmed that capitalization (rather than uppercase) was need by inspecting the output of

                {{ range .Site.Menus.main }}
                    {{ printf "%#v" . }}
                {{ end }}

in header.html, which output

&hugolib.MenuEntry{Url:"/blog/", Name:"Blog", Menu:"main", Identifier:"blog", Pre:"", Post:"", Weight:0, Parent:"", Children:hugolib.Menu(nil)}
@ShaunDychko
Copy link
Author

Nevermind, my homebrew was out of date and I was using Hugo 0.13. With an update to Hugo 0.14 all is good with {{ .URL }}.

@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 Apr 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant