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.
18 lines
330 B
18 lines
330 B
'use strict'; |
|
|
|
const { Pattern } = require('hexo-util'); |
|
|
|
exports.process = file => { |
|
const { path } = file.params; |
|
|
|
if (file.type === 'delete') { |
|
file.box.removeView(path); |
|
return; |
|
} |
|
|
|
return file.read().then(result => { |
|
file.box.setView(path, result); |
|
}); |
|
}; |
|
|
|
exports.pattern = new Pattern('layout/*path');
|
|
|