.URL Deprecated?

Hi all,

Been seeing a warning that is now an error stating “.URL” has been depreciated. This seems very, very strange since .URL still appears in official Hugo documentation, and it’s the thing that drives my navigation menus (especially showing “active” menu items"). The suggestions of “RelPermalink” and “Permalink” don’t function for baseline, top-band navigation despite how the frontmatter is configured.

Seeing as how this feature is disappearing soon, what is the recommended fix?

The warning actually tells you what to exchange with what in most cases. Also, not .URL is deprecated, but, I think, .Page.URL? The proper parameter for the permalink of a page is .Page.Permalink.

Show your template that is using this (update to 0.92.0 and run Hugo with --panicOnWarning to see where it is used).

Hey Patrick,

Thanks for your reply, and apologies for the delay getting back to you.

Running Hugo with --panicOnWarning doesn’t show me anything at all. I am reusing code between projects, and it’s this one that keeps giving me the warning where others don’t. I’m only leveraging .URL for the navigation, so I’m left wondering if there’s documentation about these depreciated commands that haven’t been clearly communictated.

Anyone else? Seems strange this has sat for three days with a single reply…

If this is about the .Page.URL deprecation, that happened about 3 years back:

If you search this forum for a similar error, you’ll find posts like yours all the way back from 2019.

If you can share your repo, someone can help you fix the warning.