Skip to content

paginate parameter in README is boolean, but hugo expects a number? #41

@davepacheco

Description

@davepacheco

The README for this project has a sample config with paginate = true. If I use this setting, I wind up with a front page that has just one post, and each page has only one post. I tried to turn pagination off by setting it to false, but I got this error:

failed to render pages: render of "home" failed: "/Users/dap/projects/blog-hugo/dap-blog/themes/pixyll/layouts/index.html:12:41": execute of template failed: template: index.html:12:41: executing "index.html" at <.Paginate>: error calling Paginate: 'pager size' must be a positive integer

When I first saw this, I didn't understand it, but I found that if I left the paginate parameter off completely, then I seemed to get no pagination. (That wasn't actually true -- I just didn't have enough posts to fill up a page.)

Anyway, the hugo pagination param is a number, not a boolean. The README should probably either leave this out (using the default) or set it to a value (10 is the default). I think the confusing behavior I saw resulted from "true" being mapped to 1 and "false" being mapped to 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions