Files
website/layouts/docs/list.html
T
Bjørn Erik Pedersen b51bdc88cc 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.
2019-04-08 18:19:05 -07:00

20 lines
524 B
HTML

{{ define "content" }}
{{ $hasContent := false }}
{{ with .File }}
{{ if ne .Filename "" }}
{{ $hasContent = (ge (len $.RawContent) 100) }}
{{ end }}
{{ end }}
{{ if $hasContent }}
{{ partial "docs/content-page" (dict "ctx" $ "page" $ ) }}
{{ else }}
{{ if ge (len .Pages) 1 }}
{{ $page := index .Pages 0 }}
{{ partial "docs/content-page" (dict "ctx" $ "page" $page) }}
{{ end }}
{{ end }}
{{ end }}
{{ define "side-menu" }}
{{ partial "docs/side-menu.html" . }}
{{ end }}