Deprecated functions

When I launch Hugo I get the following messages:

WARN 2020/03/26 11:19:23 Page.Hugo is deprecated and will be removed in a future release. Use the global hugo function.

WARN 2020/03/26 11:19:23 Page.Dir is deprecated and will be removed in a future release. Use .File.Dir

WARN 2020/03/26 11:19:23 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

I searched this forum - and the first one seems to be generated by .Hugo.Generator. When I replace by hugo.Generator the warning changes to
WARN 2020/03/26 11:33:08 .File.Dir on zero object. Wrap it in if or with: {{ with .File }}{{ .Dir }}{{ end }}

I checked all the templates both in the theme & my own - but I can’t find Page.Dir or Page.URL in the source files so I’m a bit lost. I guess like with the first warning caused by .Hugo.Generator they are called by some other function but I wouldn’t know where to look.

Any suggestions? I use Hugo v0.68.3 on Mac. Code is here https://github.com/dceuppens/hugo-testing

You have a reference to .Dir here

.URL here

and .Hugo here.

Problem was that I was looking for the page. rather than .url or .dir
Really appreciate your help.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.