Skip to content

Replace another 2 .URL occurrences with .Permalink#275

Merged
budparr merged 2 commits into
gohugo-ananke:masterfrom
strk:permalink
May 12, 2020
Merged

Replace another 2 .URL occurrences with .Permalink#275
budparr merged 2 commits into
gohugo-ananke:masterfrom
strk:permalink

Conversation

@strk

@strk strk commented May 11, 2020

Copy link
Copy Markdown
Contributor

This is basically a completion of #216

@strk

strk commented May 11, 2020

Copy link
Copy Markdown
Contributor Author

\cc @budparr @jish @bstoney

Comment thread layouts/partials/site-navigation.html Outdated
{{ 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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor

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

budparr commented May 11, 2020

Copy link
Copy Markdown
Contributor

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

@strk

strk commented May 12, 2020

Copy link
Copy Markdown
Contributor Author

Done, and confirm the WARN does not re-surface

@budparr
budparr merged commit 2d6a91d into gohugo-ananke:master May 12, 2020
@budparr

budparr commented May 12, 2020

Copy link
Copy Markdown
Contributor

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 gohugo-ananke#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 gohugo-ananke#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 gohugo-ananke/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