curtiscde / hugo-theme-massively

Massively theme for Hugo static site generator
https://hugo-theme-massively.netlify.app
Other
155 stars 138 forks source link

Fix Pagination Limit curtistimson/hugo-theme-massively#23 #58

Closed tfabritz closed 5 years ago

curtiscde commented 5 years ago

Can you please add a comment to this PR to explain exactly what it does?

From what I can tell it just adds a "First" and "Last" links to the pagination list?

If so I think this should be hidden by default with the ability to activate it with configuration. This would prevent current consumers of the theme being forced to use this feature when they next update, and instead can opt in.

tfabritz commented 5 years ago

It not only adds first and last but it implements pagination as suggested in https://github.com/curtistimson/hugo-theme-massively/issues/23 with a configurable amount of pages shown to the left and right of the current page. So for the default setting of 2 it shows up to 5 Pages with the current, the 2 before, the 2 after, a next button, a previous button and a first and last button.

First and last are hidden depending on the size of the screen using the already existing extra attribute.

Would you suggest to make the complete new behaviour triggerable? Or just the First and Last button?

curtiscde commented 5 years ago

@Urm3l Thanks for the explanation and the great contribution!

I would suggest that just the First & Last buttons are configurable (default to hidden) as this is an additional feature the current theme doesn't support, whereas the trimming of the pages could be seen as a bug fix (as too many pages breaks design).

Please update the PR when this has been done and I'll re-review and merge

tfabritz commented 5 years ago

Ok it is now optional to display the first and last button.

tfabritz commented 5 years ago

All issues except the case issue should be resolved now. I am open to go with lowercase params if you tried $outer.Site.params.posts.showFirstLast and its also not working as I commented above

tfabritz commented 5 years ago

I bumped all the versions but now the build fails. Netlify strangely still uses 0.20 and I can't get it to change that

curtiscde commented 5 years ago

@Urm3l I've upgraded the theme to 0.54.0 version as part of #60 and moved the build commands and version into a new netlify.toml to increase control and visibility to the codebase.