首先下载好node和cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
安装hexo博客框架
cnpm install -g hexo-cli
初始化博客
hexo init
启动博客
hexo s
新建一个博客
hexo s "博客的名字"
清理数据
hexo clean
生成修改后的博客
hexo g
安装git目录
cnpm install --save hexo-deployer-git
修改下载之后的_config.yml文件
在文件的最底下
deploy:
type: git
repo: git@github.com:LaiXingJie/huixing.github.io.git
branch: master
部署到GitHub远端
hexo d
远程需要部署了域名才可以访问
现在下载另一个主题
下载hexo-theme-yilio主题 放在themes/yilia目录下
git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia
修改博客的主题
下载好了之后需要在_config.yml里面进行修改
清理一下
hexo clean
生成一下
hexo g
启动
hexo s
个人搭建的博客:
https://www.huixing.icu/