0.1.1 • Published 9 years ago
metalsmith-archive v0.1.1
Metalsmith Archive
Create archive metadata for all your posts
Installation
npm install --save-dev metalsmith-archive
Usage
JavaScript API:
var Metalsmith = require('metalsmith');
var archive = require('metalsmith-archive');
Metalsmith()
.use(archive());
Options
collections
The folder your posts live in. Defaults to "posts"
dateFields
The fields to search through froup grouping. Defaults to ['publishDate', 'modifiedDate', 'date']
. The first field found is considered the date to group it in
groupByMonth
Group your posts by month? Defaults to true
. Pass in false
to disable this functionality.
listSortOrder
Sort years asc
or desc
. Defaults to desc
monthSortOrder
Sort months asc
or desc
. Defaults to desc
postSortOrder
Sort posts asc
or desc
. Defaults to desc
locale
The language locale to use. This affects the months being returned. Accepts any valid moment locale
Notes
The metalsmith cli workflow has not been tested