I had a similar issue, but it was with json files. In my case all json files would be turned into pages and I didn't want any of them to be. So what I ended up doing was creating a file extend.js
and placing it inside of the scripts folder in my theme. Then I included this bit of code.
hexo.extend.filter.register('after_init', function () {
// Remove json files being inserted to db.json -> Pages
var listSync = hexo.extend.renderer.list(true),
listAsync = hexo.extend.renderer.list();
delete listSync.json;
delete listAsync.json;
});
The possible objects you can delete are, htm, html, css, js, json, swig, yml, yaml
. Hope that helps.