Hexo建站
安装
安装Git
安装Note.js
安装淘宝镜像源
1 2
| #安装淘宝镜像源 npm install -g cnpm --registry=https://registry.npm.taobao.org
|
下载hexo
1
| cnpm install -g hexo-cli
|
部署hexo
初始化hexo目录
1 2 3 4 5 6
| ::创建blog目录 mkdir blog #移动到blog目录 cd blog #使用hexo初始化当前目录 hexo init
|
启动hexo
创建gitee仓库
国内github总是部署失败,所以部署到gitee
创建一个仓库
仓库名则为自己的gitee名
我的为an-ran0
安装部署hexo的插件
1
| cnpm install --save hexo-deployer-git
|
修改站点配置文件
打开_confing.yml
打开最后看到
改成
1 2 3 4
| deploy: type: git repo: https://github.com/ yourname/yourname.github.io.git branch: master
|
部署到gitee
1 2 3 4
| //部署 hexo deploy //缩写 hexo text
|
申请Gitee Pages 服务
尝试访问自己的网站
我的是安苒 (gitee.io)
感谢鼓励