metalsmith-collections-tree
v2.2.4
Published
create nested metadata from the metalsmith-collections global metadata
Downloads
11
Readme
metalsmith-collections-tree
create nested metadata from the metalsmith-collections global metadata
Installation
$ npm install metalsmith-collections-tree
or
$ yarn add metalsmith-collections-tree
Usage
Create collections tree after metalsmith-collections:
var collectionsTree = require('metalsmith-collections-tree');
metalsmith.use(collections());
metalsmith.use(collectionsTree({
sortKey: 'path',
extension: 'html'
}));
Extra
- Allows advanced custom sorting to be matched with metalsmith-collections.
See an example here!
- File details are now passed through. Which works with the following PR for metalsmith-permalinks.
Notes
collections trees are accessible via "collections-tree" metadata for each collection or ".all"
License
MIT