vjeantet/hugo-theme-docdock

Prepare deprecated stuff (post v0.55)

開放

#185 建立於 2019年4月8日

 (2 則留言) (4 個反應) (0 位負責人)JavaScript (315 個分叉)github user discovery
help wanted

倉庫指標

星標
 (614 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南