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

Replace another 2 .URL occurrences with .Permalink #275

Merged
merged 2 commits into from
May 12, 2020

Conversation

strk
Copy link
Contributor

@strk strk commented May 11, 2020

This is basically a completion of #216

@strk
Copy link
Contributor Author

strk commented May 11, 2020

\cc @budparr @jish @bstoney

@@ -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">
Copy link
Member

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/

Copy link
Contributor Author

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/)

Copy link
Member

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.

@budparr
Copy link
Member

budparr commented May 11, 2020

The second one is fine. If you could remove the one in the navigation, please, I'll merge this.

@strk
Copy link
Contributor Author

strk commented May 12, 2020

Done, and confirm the WARN does not re-surface

@budparr budparr merged commit 2d6a91d into theNewDynamic:master May 12, 2020
@budparr
Copy link
Member

budparr commented May 12, 2020

Thanks!

fpiantini pushed a commit to fpiantini/gohugo-theme-ananke that referenced this pull request May 15, 2020
* Replace another 2 .URL occurrences with .Permalink

This is basically a completion of theNewDynamic#216

* Revert site-navigation URL change
Remicck pushed a commit to Remicck/gohugo-theme-ananke that referenced this pull request Mar 7, 2022
* Replace another 2 .URL occurrences with .Permalink

This is basically a completion of theNewDynamic#216

* Revert site-navigation URL change
saramic added a commit to failure-driven/blog that referenced this pull request Dec 14, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants