You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
425 B

'use strict';
const { Pattern } = require('hexo-util');
exports.process = function(file) {
if (file.type === 'delete') {
file.box.config = {};
return;
}
return file.render().then(result => {
file.box.config = result;
this.log.debug('Theme config loaded.');
}).catch(err => {
this.log.error('Theme config load failed.');
throw err;
});
};
exports.pattern = new Pattern(/^_config\.\w+$/);