summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-25 19:21:19 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-27 15:43:56 +0200
commit24c1770288803bd7a344f5903dd4f03cccc6a8f0 (patch)
treec70d87dd60b71976f5e645384be420209172434c /hugolib
parentb7ed67d425524717d3cafdde9a5ce3cb92defdc6 (diff)
hugolib: Revise paginator alias path handling
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/site_render.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/hugolib/site_render.go b/hugolib/site_render.go
index be512fe48..fdac03489 100644
--- a/hugolib/site_render.go
+++ b/hugolib/site_render.go
@@ -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()