Hugo - Page.URL is deprecated

By xngo on April 11, 2020

I was following Hugo's Quick Start guide at https://gohugo.io/getting-started/quick-start/. When running hugo server -D, I got the following warning message:

Page.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

Solution

I opened ./themes/ananke/layouts/partials/social-share.html and replace .URL with .Permalink.

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.