diff options
author | bep <bjorn.erik.pedersen@gmail.com> | 2015-05-10 15:23:36 +0200 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-05-10 15:23:36 +0200 |
commit | 0e00ca6a6e94f30b0e5b6fcba3749029075a3462 (patch) | |
tree | d6c930c8c6e3ee6c167d7907cb9fadf28f559496 /hugolib/pagination.go | |
parent | bef496b97e1dc2df8c52b080152d539a58752801 (diff) |
Fix paginator with uglyurls
Fixes #1120
Diffstat (limited to 'hugolib/pagination.go')
-rw-r--r-- | hugolib/pagination.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hugolib/pagination.go b/hugolib/pagination.go index 8210ca945..5c477bd5f 100644 --- a/hugolib/pagination.go +++ b/hugolib/pagination.go @@ -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() |