mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
@@ -23,6 +23,7 @@ import (
|
||||
"math"
|
||||
"path"
|
||||
"reflect"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Pager struct {
|
||||
@@ -268,6 +269,8 @@ func paginatePages(seq interface{}, pagerSize int, section string) (pagers, erro
|
||||
return nil, err
|
||||
}
|
||||
|
||||
section = strings.TrimSuffix(section, ".html")
|
||||
|
||||
urlFactory := newPaginationURLFactory(section)
|
||||
paginator, _ := newPaginator(pages, pagerSize, urlFactory)
|
||||
pagers := paginator.Pagers()
|
||||
|
@@ -172,7 +172,6 @@ func TestPaginate(t *testing.T) {
|
||||
}
|
||||
|
||||
func doTestPaginate(t *testing.T, useViper bool) {
|
||||
|
||||
pagerSize := 5
|
||||
if useViper {
|
||||
viper.Set("paginate", pagerSize)
|
||||
|
Reference in New Issue
Block a user