Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
davepacheco opened this issue May 27, 2020 · 0 comments
Open

Comments

@davepacheco
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant