Ghost-Need-Pagination
Custom handlebars helper to display pagination if only it's needed, in other words, if only it's more than one page.
Installation
npm install ghost-need-pagination
Example
Register custom helper in the config.js
ghost file:
var need_pagination = ; var hbs = ; hbs;
Update ghost template partials/pagination.hbs
:
{{#need_pagination pages}} {{#if prev}} {{/if}} {{#if next}} {{/if}} {{/need_pagination}}
To remove undesired whitespaces, look at Whitespace Control section on the official handlebars site.
Tests
npm test
License
MIT License