hexo+码云搭建我的博客

1.示例git

1 https://blog.csdn.net/weidong_y/article/details/90904781
2 https://www.jianshu.com/p/13f5e4d7099d

 2.hexo安装npm

1 npm install hexo-cli -g 2 hexo init blog 3 cd blog 4 npm install 5 hexo server
1 固然也能够直接用以前搭建的项目 2 只须要将以前项目的scaffolds、source、themes_config.ymlpackage.json五个文件拷到新的项目目录下面 3 接下来执行命令:npm install等待下载完依赖便可

3.项目部署在码云上面json

 1 在码云上建立本身的仓库  2 添加公钥  3  打开git bash  4     输入ssh-keygen -t rsa -C "你的邮箱地址" 三次回车以后就能够生成密钥对  5     输入cat ~/.ssh/id_rsa.pub 查看你的 public key(公钥)  6 配置用户名和邮箱(有点小坑)  7  由于以前我是用GitHub配置过一次(觉得就不须要了),配置的名称必须得是码云的名字及关联邮箱  8     git config --global user.name空格+你的码云的名字  9     git config --global user.email空格+你的码云的邮箱 10 修改配置项目根目录_config.yml 文件,修改deploy的值 11  deploy: 12  type: git 13       repo: https://gitee.com/lin2x/earwind.git
14  branch: master 15 安装hexo-deployer-git 16     npm install hexo-deployer-git --save 17 部署 18  hexo clean 19  hexo g 20     hexo deploy

4.码云厅的免费访问域名bash

1 在码云项目中找到服务->gitee pages->第一次须要设置绑定电话号码(若是设置过的就直接更新便可) 2 在站点文件_config.yml文件下作一下修改 3     url: http://lin2x.gitee.io/earwind #网站连接
4     root: /earwind/ #项目名 5     permalink: :year/:month/:day/:title/
相关文章
相关标签/搜索