A Wintersmith plugin to manipulate contents
Install globally or locally using npm:
npm install [-g] wintersmith-contents
Add wintersmith-contents
to your config.json
:
{
"plugins": [
"wintersmith-contents"
]
}
List all entries:
env.helpers.contents.list(contents);
List all entries from a given subtree:
env.helpers.contents.list(contents.articles);
List all text files:
env.helpers.contents.filter(contents, '**/*.txt');
Please note that wintersmith-contents
relies on minimatch
to match filenames with specified patterns. So, any pattern supported by minimatch
is also supported by wintersmith-contents
.
wintersmith-contents
is released under the MIT license.