開始折騰靜態(tài)博客,想把網(wǎng)址 https://itcuihao.github.io/itcuihao 換成 https://itcuihao.github.io
于是把原來的 repository name 由 itcuihao 改為 itcuihao.github.io
hexo配置文件進(jìn)行相應(yīng)的修改
deploy:
type: git
repo: https://github.com/itcuihao/itcuihao.github.io.git
branch: master
執(zhí)行命令
hexo g -d
就報(bào)錯(cuò)了:
FATAL Cannot read property 'replace' of null
解決:
看帖子都是說 _config.yml 配置文件中的url 設(shè)置錯(cuò)誤
我的設(shè)置:
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://itcuihao.github.io
root:
permalink: :year/:month/:day/:title/
permalink_defaults:
想了下url應(yīng)該沒有錯(cuò)辟汰,那會(huì)不會(huì)是root設(shè)置有問題盖腕,于是改成
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://itcuihao.github.io
root: itcuihao.github.io
permalink: :year/:month/:day/:title/
permalink_defaults:
執(zhí)行 hexo g -d 成功陪竿。