You were right: theanswer lies into the paginator
plugin.
Wintersmith will constently watch the contents
folder, building a ContentTree
array.
That objet array will contain a descriptor for each file and folder within contents
.
The getArticles
just filter this possible candidates, and you just need to enhance it to get plain markdown files in the contents/articles
folder.
getArticles = (contents) ->
# helper that returns a list of articles found in *contents*
# include articles with dedicated directory
articles = contents[options.articles]._.directories.map (item) -> item.index
# add articles that are in the *contents/articles* folder
articles = articles.concat contents[options.articles]._.pages
articles.sort (a, b) -> b.date - a.date
return articles