20 lines
524 B
HTML
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 }}
|