{{ $bookSection := default "docs" .Site.Params.BookSection }} {{ if eq $bookSection "*" }} {{ $bookSection = "/" }}{{/* Backward compatibility */}} {{ end }} {{ with .Site.GetPage $bookSection }} {{ $pages := partialCached "docs/prev-next-cache" .Pages }} {{ $prev := $pages.Next $ }} {{ $next := $pages.Prev $ }} {{- if or $prev $next }}