vjeantet/hugo-theme-docdock

Prepare deprecated stuff (post v0.55)

Offen

#185 geöffnet am 08.04.2019

 (2 Kommentare) (4 Reaktionen) (0 zugewiesene Personen)JavaScript (315 Forks)github user discovery
help wanted

Repository-Metriken

Stars
 (614 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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