常见问题
The page build failed for the master branch with the following error
master branch with the following error问题描述


解决方案


小结
最后更新于
master branch with the following error



最后更新于
var moment = require('moment');
module.exports = {
book: {
assets: './assets',
css: [
'footer.css'
],
},
hooks: {
'page:before': function(page) {
var _label = '最后更新时间: ',
_format = 'YYYY-MM-DD',
_copy = 'powered by snowdreams1006'
if(this.options.pluginsConfig['tbfed-pagefooter']) {
_label = this.options.pluginsConfig['tbfed-pagefooter']['modify_label'] || _label;
_format = this.options.pluginsConfig['tbfed-pagefooter']['modify_format'] || _format;
var _c = this.options.pluginsConfig['tbfed-pagefooter']['copyright'];
_copy = _c ? _c + ' all right reserved,' + _copy : _copy;
}
var _copy = '<span class="copyright">'+_copy+'</span>';
var str = ' \n\n<footer class="page-footer">' + _copy +
'<span class="footer-modification">' +
_label +
'\n{{file.mtime | date("' + _format +
'")}}\n</span></footer>';
str += '\n\n<link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css">'+
'\n\n<script src="https://unpkg.com/gitalk@latest/dist/gitalk.min.js"></script>'+
'\n\n<div id="gitalk-container"></div>'+
'\n\n<script src="https://gitbook.prlrr.com/gitalk-config.js"></script>';
page.content = page.content + str;
return page;
}
},
filters: {
date: function(d, format) {
return moment(d).format(format)
}
}
};$ touch .nojekyll
$ git add .nojekyll
$ git commit -m "add .nojekyll"
$ git push