My computer recently crashed and I had to install a new version of hugo.
Previously I was able to build my site with no warnings but now I get 3 warnings:
WARN 2020/11/15 09:05:43 .File.TranslationBaseName on zero object. Wrap it in if or with: {{ with .File }}{{ .TranslationBaseName }}{{ end }}
WARN 2020/11/15 09:05:43 Page.GetParam is deprecated and will be removed in a future release. Use .Param or .Params.myParam.
WARN 2020/11/15 09:05:43 Page.LanguagePrefix is deprecated and will be removed in a future release. Use .Site.LanguagePrefix.
For the first warning, I search and it is only used inside the sitemap.xml as:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{{ $baseURL := .Site.BaseURL }}
{{ range sort .Data.Pages }}
<url>
<loc>{{ $baseURL }}{{ .LanguagePrefix }}/#{{ .File.TranslationBaseName }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}
</url>
{{ end }}
</urlset>
Can someone please tell me how do I need to change this as I do not know the GO language?
Also, any help on the 2nd and 3rd warnings will be really appreciated.