Closed freder closed 6 years ago
Hi @freder
As stated in the plugin's README : the filter
param can be used to select files on which the transformation is applied, leaving the others unchanged (so they are still inside the files
array).
So i guess that if you want to get rid of every non-markdown files before passing them to matter
, you should first apply an Array filter like so :
function excludeJunkFiles() {
return files => files.filter(file => file.extname === '.md');
}
site.use(excludeJunkFiles);
// now files should only contains markdown files
site.use(matter);
ah, I see. + yes, that's what I ended up doing. — thx!
with
.DS_Store
still makes it through, even though the filter function returnfalse
.