{{ define "main" }} {{ $pages := "" }} {{ $showDate := false }} {{ if .IsPage }} {{/* We currently have a slightly odd content structure with no top level /docs section. */}} {{ $pages = .CurrentSection.Pages }} {{ else }} {{ if eq .Section "news" }} {{ $pages = partial "news/get-news-items.html" . }} {{ $showDate = true }} {{ else }} {{ $pages = .Pages }} {{ end }} {{ end }}
{{ partial "layouts/docsheader.html" . }}
{{ range $pages }} {{ if eq . $ }} {{ continue }} {{ end }} {{ if $showDate }}

{{ .Date.Format "January 2, 2006" }}

{{ end }}

{{ .LinkTitle }}

{{ with .Params.action.signatures }} {{/* Set in functions and methods pages. */}} {{ with $signature := index . 0 }} {{ if $.Params.action.returnType }} {{ $signature = printf "%s ⟼ %s" $signature $.context.Params.action.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 }}

{{ end }}
{{ end }} {{ define "rightsidebar" }} {{ printf "%c" '\u00A0' }} {{ end }}