File size: 225 Bytes
a7060a0
 
 
 
 
 
 
1
2
3
4
5
6
7
8
const fs = require('fs');
const path = require('path');

hexo.extend.helper.register('file_exists', function(filePath) {
  const fullPath = path.join(hexo.theme_dir, 'layout', filePath);
  return fs.existsSync(fullPath);
});