一.配置域名问题
在GitHub配置域名domain,来解决只能在GitHub.learning9527.io页面显示,而不能在www.learning9527.cn域名显示的问题。
二.hexo提交GitHub报错
使用hexo提交GitHub时,hexo clean –> hexo generate –> hexo deploy,发生报错1
2
3
4
5
6error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error
两种解决方案如下
修改配置文件_config.yml
1.将repository: http://github.com/learning9527/learning9527.github.io.git 改为 repository: git@github.com:learning9527/learning9527.github.io.git
2.将repository: http://github.com/learning9527/learning9527.github.io.git 改为 repository: ssh://git@github.com/learning9527/learning9527.github.io
三.使用本地hexo服务报错
本地使用git bash => hexo s 命令的时候报错如下:1
2FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Template render error: (unknown path)Error: expected end of comment, got end of file at Object.exports.prettifyError (G:\hexo\node_modules\nunjucks\src\lib.js:34:15)
解决方案
在新建markdown文件的时候,不能正确渲染元素内符号,即在HTML中产生冲突1
2
3
4
5
6
7
8
9
10
11// .md文件中的渲染冲突代码如下
juicer.set({
'tag::operationOpen': '{@',
'tag::operationClose': '}',
'tag::interpolateOpen': '${',
'tag::interpolateClose': '}',
'tag::noneencodeOpen': '$${',
'tag::noneencodeClose': '}',
'tag::commentOpen': '{#',
'tag::commentClose': '}'
});
如有错误,烦请指正,谢谢!