博客搭起来的第一天,谈谈遇到的坑
搭建原生hexo时报错
Error: your blog file is still not created, please check it yourself
- 原因:我的原因呢是因为在配置nodejs时,需要新建两个新的文件夹,在设置环境变量的时候设置错了
修改代码之后却不能传到github/gitee/coding上
- 首先需要确认在根博客目录的yml文件上地址绑定正确,这里给个例子:
deploy: type: git repo: github: git@github.com:username/username.github.io.git gitee: git@gitee.com:username/username.github.io.git branch: master
- 之后进行hexo三部曲
还有一个hexo s 是在本地预览,默认端口是4000,其他端口是:-p port$ hexo clean # 除缓存文件 (db.json) 和已生成的静态文件 (public) $ hexo g # 生成静态文件 $ hexo d # 上传到云库上
上传到gitee,不刷新界面
- 因为gitee需要你手动去刷新page,需要你自己去服务里点 gitee pages,手动刷新界面,愿意花钱当我没说