Implement defer

Closes #8086
Closes #12589
This commit is contained in:
Bjørn Erik Pedersen 2024-06-08 11:52:22 +02:00
parent 8731d88222
commit 6cd0784e44
33 changed files with 1033 additions and 148 deletions

View file

@ -111,7 +111,7 @@ func (s *Site) renderPages(ctx *siteRenderContext) error {
err := <-errs
if err != nil {
return fmt.Errorf("failed to render pages: %w", herrors.ImproveIfNilPointer(err))
return fmt.Errorf("failed to render pages: %w", herrors.ImproveRenderErr(err))
}
return nil
}
@ -226,7 +226,7 @@ func (s *Site) renderPaginator(p *pageState, templ tpl.Template) error {
paginatePath := s.Conf.Pagination().Path
d := p.targetPathDescriptor
f := p.s.rc.Format
f := p.outputFormat()
d.Type = f
if p.paginator.current == nil || p.paginator.current != p.paginator.current.First() {