adambrault/bumble — pull request #6 by nlf (2013-06-12 23:30:00+00:00)
Title: implemented basic pagination

So, using a little wrapper function to assign locals I implemented pagination in the backend. It respects your config.maxPosts settings for each page. Pages are specified via query parameter like

```
http://localhost?page=2
```

If you specify a page less than 1, you're redirected to page 1. If you specify a page greater than the highest available page, you're redirected to the highest available page. It's been added to the index, yearIndex, monthIndex, and dateIndex routes.

Templates will now receive the totalPosts, totalPages, and currentPage variables so that pagination can be implemented and made pretty in the frontend also.