码云上搭建 Hexo 静态博客
-
下载 Node.js
-
下载并配置 Git
-
安装 Hexo
- 设置 cnpm,设置为国内的淘宝镜像
npm install -g cnpm --registry=https://registry.npm.taobao.org - 安装 Hexo,
cnpm install -g hexo-cli - 查看是否安装成功
hexo -v
- 设置 cnpm,设置为国内的淘宝镜像
-
建立博客文件夹
-
执行
hexo init -
Hexo 常用的几个命令
hexo s运行 Hexohexo n 文件名.md创建博客文章,也可以直接在\source\_posts文件夹中创建hexo g生成博客文件hexo clean清理缓存hexo d推送到远端服务器
-
创建远程仓库,仓库名要与自己的用户名相同
-
安装 Git 依赖,
cnpm install --save hexo-deployer-git -
修改配置文件
1 2 3 4deploy: type: git repo: https://gitee.com/eternidad33/eternidad33.git branch: master -
开启
Gitee Pages服务
推荐 B 站 Up 主:CodeSheep