Prepare deprecated stuff (post v0.55)
divinerites opened this issue · comments
divinerites commented
In the soon-to-be-released hugo v0.55 we have some WARNING about deprecated stuff :
.URL
should be replaced by.Permalink
(global, except .URL from shortcut menu obv) - see #123 too.- replace
.Hugo.Version
bysite.Hugo.Version
- replace
.Hugo.Generator
bysite.Hugo.Generator
- adapt attachement.html shortcode (wrap {{ with .Page.File }} around
.File.BaseFileName
)
+ {{ with .Page.File }}
{{if eq .BaseFileName "_index"}}
{{$.Scratch.Add "filesName" "files"}}
{{else}}
{{$.Scratch.Add "filesName" (printf "%s.files" .BaseFileName)}}
{{end}}
+ {{ end }}
Sarah Conway commented
@divinerites What is the fix for the .File.BaseFileName
deprecation errors popping up for header.html
and body-aftercontent.html
?
{{ range where .Site.Pages "File.BaseFileName" $header }}
&&
{{ range where .Site.Pages "File.BaseFileName" $footer }}
Frédéric COMBES commented
#198 Fix some requirements for 0.55 some others need attention. Help was accepted to fix this theme