{{ if .Params.pager | default true }} {{ if or .NextInSection .PrevInSection }} {{ $next := .NextInSection }} {{ $prev := .PrevInSection }} {{ if (eq (.Scratch.Get "invert_pager") true) | default .Params.invert_pager | default false }} {{ $next = .PrevInSection }} {{ $prev = .NextInSection }} {{ end }}

{{ if $prev }} {{ $prev.Title }} {{ if .Params.show_date | default true }} {{ time.Format (site.Params.locale.date_format | default ":date_long") $prev.Date }} {{ end }} {{ end }}
{{ if $next }} {{ $next.Title }} {{ if .Params.show_date | default true }} {{ time.Format (site.Params.locale.date_format | default ":date_long") $next.Date }} {{ end }} {{ end }}
{{ end }} {{ end }}