RobinThrift/metalsmith-paginate — pull request #6 by mikestopcontinues (2014-08-31 16:19:14+00:00)
Title: optionally use opts array in place of flat-file config, config overrides, and ':page' replacement

Actually, a bit more than that.

If passed opts array, will use that to determine which collections to paginate:

```js
.use(paginate([
{
paginate: 'posts',
path: 'blog/page-:page.html',
pathFirst: 'blog.md'
},
{
//...
}
]))
```

If passed opts hash, will collect all files with `paginate` metadata, and use the opts hash as default values. So you can specify perPage and path in you flat-file config. You can also pass arbitrary default metadata via the opts hash to the paginated pages, aka, `template`, `sidebar`, etc.

Also added ':page' replacement. This way, whichever config method you prefer, you can also choose specify path however you want, including extension.

A consequence of array method is that you must specify pathFirst if you want to maintain the difference in path for the first page, but this also gives you some latitude, as you can override pathFirst in flat-file/hash config as well.