{{ define "main" }} {{ $type := .Type | default "page" }} {{ if or (eq $type "issue") (eq $type "discussion") }}

{{ .Title }} {{ with .Params.number }}#{{ . }}{{ end }}

{{ partial "state-badge.html" . }} {{ with .Params.author }}{{ . }}{{ end }} opened {{ with .Date }}{{ .Format "Jan 2, 2006" }}{{ end }}
{{ with .Params.author }}{{ . }}{{ end }} commented {{ with .Date }}{{ .Format "Jan 2, 2006" }}{{ end }}
{{ .Content }}
{{ partial "metadata-sidebar.html" . }}
{{ else }}

{{ .Title }}

{{ .Content }}
{{ end }} {{ end }}