{{ $p := .pages }} {{ if and (.limit) (not .paginate) }} {{ $p = first .limit .pages }} {{ end }} {{ $paginator := .pages }} {{ if .paginate }} {{ $paginator = .context.Paginate $p }} {{ $p = $paginator.Pages }} {{ end }} {{ if or .content (and (.paginate) (.content) (eq $paginator.PageNumber 1)) }} {{ partial "snippets/content" (dict "content" .context.Content) }} {{ end }} {{ if $p }}
{{ .Summary }}
{{ else if .Content }} {{ .Content }} {{ else if $image }} {{ $i := (.Resources.GetMatch $image).Permalink }}