diff --git a/layouts/partials/posts_navigation.html b/layouts/partials/posts_navigation.html index 1fbc7dde8148..fe4419d4999b 100644 --- a/layouts/partials/posts_navigation.html +++ b/layouts/partials/posts_navigation.html @@ -1,17 +1,33 @@ {{ $skipPageNav := .Scratch.Get "skipPageNav" }} {{ if not (or .Params.skip_pagenav $skipPageNav) }} - {{ if or .NextInSection .PrevInSection }} - - {{ end }} -{{ end }} \ No newline at end of file + {{ $prev := .Params.prev | default (cond (or .Scratch.Get "reversePagination") .NextInSection .PrevInSection) }} + {{ $next := .Params.next | default (cond (or .Scratch.Get "reversePagination") .PrevInSection .NextInSection) }} + + {{ with $prev }} + {{ $prev = $.Site.GetPage . }} + {{ end }} + {{ with $next }} + {{ $next = $.Site.GetPage . }} + {{ end }} + + {{ if or $prev $next }} + + {{ end }} +{{ end }}