mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
Add option to not generate aliases for first page of pagination pages
Also consolidate the pagination configuration into a struct. Closes #12572
This commit is contained in:
@@ -263,7 +263,7 @@ func splitPageGroups(pageGroups PagesGroup, size int) []paginatedElement {
|
||||
|
||||
func ResolvePagerSize(conf config.AllProvider, options ...any) (int, error) {
|
||||
if len(options) == 0 {
|
||||
return conf.Paginate(), nil
|
||||
return conf.Pagination().DefaultPageSize, nil
|
||||
}
|
||||
|
||||
if len(options) > 1 {
|
||||
@@ -400,7 +400,7 @@ func newPaginationURLFactory(d TargetPathDescriptor) paginationURLFactory {
|
||||
pathDescriptor := d
|
||||
var rel string
|
||||
if pageNumber > 1 {
|
||||
rel = fmt.Sprintf("/%s/%d/", d.PathSpec.Cfg.PaginatePath(), pageNumber)
|
||||
rel = fmt.Sprintf("/%s/%d/", d.PathSpec.Cfg.Pagination().Path, pageNumber)
|
||||
pathDescriptor.Addends = rel
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user