{{ define "main" }} {{ $pages := "" }} {{ if .IsPage }} {{/* We currently have a slightly odd content structure with no top level /docs section. */}} {{ $pages = .CurrentSection.Pages }} {{ else }} {{ $pages = .Pages }} {{ if eq .Section "news" }} {{ $pages = $pages.ByPublishDate.Reverse }} {{ end }} {{ end }}
{{ partial "layouts/docsheader.html" . }}
{{ range $pages }} {{ if eq . $ }} {{ continue }} {{ end }} {{ if .Params.show_publish_date }} {{ with .PublishDate }}

{{ partial "layouts/date.html" . }}

{{ end }} {{ end }}

{{ .LinkTitle }}

{{ with .Params.functions_and_methods.signatures }} {{/* Set in functions and methods pages. */}} {{ with $signature := index . 0 }} {{ if $.Params.functions_and_methods.returnType }} {{ $signature = printf "%s ⟼ %s" $signature $.context.Params.functions_and_methods.returnType }} {{ end }}
{{- $signature -}}
{{ end }} {{ end }}

{{ if and (eq .Section "commands") .IsPage }} {{ $simpleCobraCommandShort := .RawContent | strings.ReplaceRE `(?s)^##\s.+?\n\n(.+?)\n\n.*` "$1" }} {{ printf "%s." $simpleCobraCommandShort }} {{ else }} {{ (or .Params.description .Summary) | plainify | safeHTML }} {{ end }}

{{ if and hugo.IsDevelopment site.Params.debug.display_page_metadata }} {{ partial "helpers/debug/list-item-metadata.html" . }} {{ end }}
{{ end }}
{{ end }} {{ define "rightsidebar" }} {{ printf "%c" '\u00A0' }} {{ end }}