Make it compatible with Hugo 0.55 (#13680)
This commit adds two backwards compatible changes to prepare for the next Hugo version, most notable: * All the `File` methods on `Page` has been deprecated and will give a warning in the next Hugo version. Adjust this by changing `.Dir` to ´.File.Dir` and similar. * Version the capture shortcode to use the old behaviour for markdown rendering of shortcode inner content.
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
2d1fdb0666
commit
b51bdc88cc
@@ -1,10 +1,10 @@
|
||||
{{ .ctx.Scratch.Set "sections" slice }}
|
||||
<ul id="markdown-toc">
|
||||
{{ range .ctx.Scratch.Get "blocks" }}
|
||||
{{ if .content }}
|
||||
{{ $.ctx.Scratch.Set "section" .content }}
|
||||
{{ else}}
|
||||
{{ if .block }}
|
||||
{{ $.ctx.Scratch.Set "section" (partial "templates/block" .) }}
|
||||
{{ else}}
|
||||
{{ $.ctx.Scratch.Set "section" .content }}
|
||||
{{ end }}
|
||||
{{ $section := $.ctx.Scratch.Get "section" }}
|
||||
{{ $headers := findRE "<h2.*?>(.|\n)*?</h2>" $section }}
|
||||
|
||||
Reference in New Issue
Block a user