-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Replace another 2 .URL occurrences with .Permalink #275
Conversation
This is basically a completion of theNewDynamic#216
@@ -9,7 +9,7 @@ | |||
<ul class="pl0 mr3"> | |||
{{ range .Site.Menus.main }} | |||
<li class="list f5 f4-ns fw4 dib pr3"> | |||
<a class="hover-white no-underline white-90" href="{{ .URL }}" title="{{ .Name }} page"> | |||
<a class="hover-white no-underline white-90" href="{{ .Permalink }}" title="{{ .Name }} page"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test this? This one is incorrect. For menus, the .URL
remains. https://gohugo.io/templates/menu-templates/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not test, other than verifying that the following annoying message goes away with the patch:
WARN 2020/05/11 16:14:04 Page's .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url.
I'm new to Hugo so don't really know how to test site-navigation (and I'm actually missing it, see http://strk.kbt.io/blog/)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries. We can just take this out. I'll have a look at the other one on my local, but should be good.
The second one is fine. If you could remove the one in the navigation, please, I'll merge this. |
Done, and confirm the WARN does not re-surface |
Thanks! |
* Replace another 2 .URL occurrences with .Permalink This is basically a completion of theNewDynamic#216 * Revert site-navigation URL change
* Replace another 2 .URL occurrences with .Permalink This is basically a completion of theNewDynamic#216 * Revert site-navigation URL change
comment out the twitter.svg as it no longer lives in svg/ but in themes/ananke/assets/ananke/socials/twitter.svg and I could not work out how to render it from there? also with theNewDynamic/gohugo-theme-ananke#275 .URL was renamed to .Permalink
This is basically a completion of #216