vjeantet / hugo-theme-docdock

Declination of @matcornic Learn theme to Hugo

Home Page:https://docdock.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prepare deprecated stuff (post v0.55)

divinerites opened this issue · comments

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 by site.Hugo.Version
  • replace .Hugo.Generator by site.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 }}

@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 }}

#198 Fix some requirements for 0.55 some others need attention. Help was accepted to fix this theme