{{/* Article navigation on the footer of the article */}} {{- $reversePagination := .Scratch.Get "reversePagination" | default false -}} {{- $prev := cond $reversePagination .PrevInSection .NextInSection -}} {{- $next := cond $reversePagination .NextInSection .PrevInSection -}} {{- with .Params.prev -}} {{- with $.Site.GetPage . -}} {{- if $reversePagination }}{{ $next = . }}{{ else }}{{ $prev = . }}{{ end -}} {{- end -}} {{- end -}} {{- with .Params.next -}} {{- with $.Site.GetPage . -}} {{- if $reversePagination }}{{ $prev = . }}{{ else }}{{ $next = . }}{{ end -}} {{- end -}} {{- end -}} {{- if or $prev $next -}}