vjeantet/hugo-theme-docdock

Prepare deprecated stuff (post v0.55)

Open

#185 opened on Apr 8, 2019

 (2 comments) (4 reactions) (0 assignees)JavaScript (315 forks)github user discovery
help wanted

Repository metrics

Stars
 (614 stars)
PR merge metrics
 (PR metrics pending)

Description

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

Contributor guide