%PDF- %PDF-
| Direktori : /proc/thread-self/root/data/old/usr/lib/node_modules/hexo/lib/theme/processors/ |
| Current File : //proc/thread-self/root/data/old/usr/lib/node_modules/hexo/lib/theme/processors/config.js |
'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+$/);