Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danielr18/ghost-pagination

Custom Handlebars Helper to improve how you paginate in Ghost
https://github.com/danielr18/ghost-pagination

Last synced: about 1 month ago
JSON representation

Custom Handlebars Helper to improve how you paginate in Ghost

Awesome Lists containing this project

README

        

# Ghost - Handlebars Pagination Helper
Custom Handlebars Helper to improve Pagination in Ghost. Based on [Handlebars Paginate](https://github.com/olalonde/handlebars-paginate).

![preview](https://github.com/danielr18/ghost-pagination/raw/master/preview.jpg)

##Install
```
npm install ghost-pagination
```
##Usage
Ghost config.js
```javascript
/* ... */
var pagination = require('ghost-pagination');
var hbs = require('express-hbs');
/* ... */
hbs.registerHelper('paginate', pagination);
/* ... */
```

partials/pagination.hbs

```html


```

Include limit attribute if you wish to restrict the number of pages, that appear between the first one and last one.

You can easily include previous and next links with Ghost built-in Pagination attributes. Refer to [Handlebars Template Example](examples/pagination.hbs).

## License

MIT License