diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 3488334b3..a87333a1c 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -91,7 +91,11 @@
{{ "1" }}
+ {{- end }}
+ {{- if gt (sub $paginator.PageNumber 1) 2 }}
...
+ {{- end }}
+ {{- if gt (sub $paginator.PageNumber 1) 1 }}
{{ sub $paginator.PageNumber 1 }}
@@ -101,11 +105,15 @@
{{ $paginator.PageNumber }}
- {{- if not (eq $paginator.PageNumber $paginator.TotalPages) }}
+ {{- if lt (add $paginator.PageNumber 1) $paginator.TotalPages }}
{{ add $paginator.PageNumber 1 }}
+ {{- end }}
+ {{- if lt (add $paginator.PageNumber 2) $paginator.TotalPages }}
...
+ {{- end }}
+ {{- if not (eq $paginator.PageNumber $paginator.TotalPages) }}
{{ $paginator.TotalPages }}