mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
hugolib: Revise paginator alias path handling
This commit is contained in:
@@ -122,12 +122,15 @@ func (s *Site) renderPaginator(p *PageOutput) error {
|
||||
paginatePath := s.Cfg.GetString("paginatePath")
|
||||
|
||||
// write alias for page 1
|
||||
// TODO(bep) ml all of these n.addLang ... fix.
|
||||
//TODO(bep) output fix
|
||||
addend := fmt.Sprintf("/%s/%d", paginatePath, 1)
|
||||
target, err := p.createTargetPath(p.outputFormat, addend)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
aliasPath := p.addLangPathPrefix(s.PathSpec.PaginateAliasPath(path.Join(p.sections...), 1))
|
||||
link := p.Permalink()
|
||||
s.writeDestAlias(aliasPath, link, nil)
|
||||
// TODO(bep) output do better
|
||||
link := newOutputFormat(p.Page, p.outputFormat).Permalink()
|
||||
s.writeDestAlias(target, link, nil)
|
||||
|
||||
pagers := p.paginator.Pagers()
|
||||
|
||||
|
Reference in New Issue
Block a user