{{ $tag := .Get 0 }} {{ $param := .Get 1 }} {{ $next := sort (where (sort site.RegularPages "Date" "asc") ".Date" "gt" .Page.Date) ".Params.tags" "intersect" (slice $tag) | first 1 }} {{ with $next }} {{ $page := index . 0 }}