vjeantet/hugo-theme-docdock

Prepare deprecated stuff (post v0.55)

Aperta

#185 aperta il 8 apr 2019

 (2 commenti) (4 reazioni) (0 assegnatari)JavaScript (315 fork)github user discovery
help wanted

Metriche repository

Star
 (614 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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

Guida contributor