初步安装
node 必须加入到环境变量中, 但npm不用,他们是在同一个文件夹内
在国内使用cnpm淘宝源更加快, 挂梯子会报错!
hexo init报错 (not empty folder)
这时候要整个删掉blog文件夹,以备初始化hexo重要错误 在之后的部署中多次出现git不可用! 因为没有正确安装hexo-deployer-git
错误写法:cnpm -install -save hexo-deployer-git
正确写法:cnpm -install --save hexo-deployer-git
注意双横线!
配置中
- 配置_config.yml中出现错误
- type:git 而不是’git’
- repo: 要新建一个github用户名同名的Name.github.io 之后建好之后提供的网址! 后面带有github.io.git
- 部署中报错
1
2please run : git config --global user.name
please run : git config --global user.email
解决方案: 使用git bash 打开,输入以上两个,设定默认用户名和邮箱
- 重大问题 到了认证github账户的时候:
- 输入密码光标不动? — 就应该是不动的
- 报错: support for github authentication was remove
解决方案: 在github-setting-developer-setting 里找到personal token 复制下来 然后用来登录
注意 : 因为cmd输入密码时候不能使用复制,需要先右键cmd窗口-属性-快速编辑模式(勾选)
这样就可以右键直接复制内容了!
前端
- 配置时应该先改动blog内部的author 和 subtitle 这样就可以直接改变前端的cover了
- git clone 非常慢,可以直接从github下载然后粘贴到themes里面
推上云端
- 出现open ssl —— connection is down; 或者, spawn error
一定是挂了梯子没有关!!!!!!!
解决方法:
- 先删除.deploy.git
- hexo clean
- hexo g
- hexo s
最后再deploy,如果不成功,重复此过程。
menu 不能显示的问题
- 先新建
hexo new page "tags" - 然后编辑index.md
操作如下:
1 | title: tags |
颜色调节
- 在source/css/matery 里面 约250行的 bg.color 可以渐变色 也可以单色
最后就大功告成了!
接下来要研究前端啦~
salute!