mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-26 21:51:02 +03:00
parent
7966c0b5b7
commit
f7375c4972
8 changed files with 154 additions and 25 deletions
|
@ -171,12 +171,9 @@ func (s *Site) renderPaginator(p *pageState, layouts []string) error {
|
|||
f := p.s.rc.Format
|
||||
d.Type = f
|
||||
|
||||
// Rewind
|
||||
p.paginator.rewind()
|
||||
defer func() {
|
||||
// Prepare for any re-rendering in server mode.
|
||||
p.paginator.rewind()
|
||||
}()
|
||||
if p.paginator.current == nil || p.paginator.current != p.paginator.current.First() {
|
||||
panic(fmt.Sprintf("invalid paginator state for %q", p.pathOrTitle()))
|
||||
}
|
||||
|
||||
// Write alias for page 1
|
||||
d.Addends = fmt.Sprintf("/%s/%d", paginatePath, 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue