🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

handlebars-helper-paginate

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

handlebars-helper-paginate

{{paginate}} handlebars helper, for adding pagination to Assemble, the static site generator for Node.js, Grunt.js and Yeoman.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

{{paginate}} NPM version

{{paginate}} handlebars helper for Assemble.

See live examples →

image

Quickstart

In the root of your project, run the following in the command line:

npm i handlebars-helper-paginate --save-dev

Please create an issue to report bugs or to make a feature request.

Assemble config

If you use Assemble config and Grunt, in your Gruntfile simply add handlebars-helper-paginate to the helpers property in the Assemble task or target options:

grunt.initConfig({
  assemble: {
    options: {
      // the 'handlebars-helper-paginate' module must also be listed in devDependencies
      // for assemble to automatically resolve the helper
      helpers: ['handlebars-helper-paginate', 'foo/*.js']
    }
    ...
  }
});

You can now use begin using the helper in your templates:

{{paginate pagination}}

Results in:

<ul class="pager">
  <li class="previous">
    <a href="index.html">&larr; Previous</a>
  </li>
  <li> <a href="index.html">1</a> </li>
  <li class="active">
    <a href="foo-01.html">2</a>
  </li>
  <li> <a href="foo-02.html">3</a> </li>
  <li> <a href="foo-03.html">4</a> </li>
  <li> <a href="foo-04.html">5</a> </li>
  <li> <a href="foo-05.html">6</a> </li>
  <li class="next">
    <a href="foo-02.html">Next &rarr;</a>
  </li>
</ul>

See live examples.

Options

modifier

Type: String Default: undefined

Allows defining a modifier class for the pager.

{{paginate pagination modifier="pager-justified"}}

Please create an issue to report bugs or to make a feature request.

Author

Licensed under the MIT License Copyright (c) Jon Schlinkert, contributors.

Keywords

assemble

FAQs

Package last updated on 28 Nov 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts