{{ define "main" }} {{ if not (or .Title .Description .Content .Pages) }}

Nothing Here

{{ else }}
{{ if or .Title .Description }}
{{ if .Title }}

{{ if .Params.link }} {{ .Title | markdownify }} {{ else }} {{ .Title | markdownify }} {{ end }}

{{ end }} {{ if .Description }}

{{ .Description | markdownify }}

{{ end }}
{{ end }} {{ if .Content }}
{{ .Content }}
{{ end }} {{ if .Pages }} {{ $p := .Paginate (.Pages.ByDate.Reverse.GroupByDate "January 2006") }}
{{ range $p.PageGroups }}
{{ .Key }}
{{ range .Pages }}

{{ .Title | markdownify }} {{- if .Description -}}
{{- .Description | markdownify -}} {{- end -}}

{{ end }} {{ end }}
{{ if or $p.HasPrev $p.HasNext }} {{ end }} {{ end }}
{{ end }} {{ end }}