新建仓库

仓库名一定是 用户名.github.io
github page + hexo 搭建个人博客

开启github page

github page + hexo 搭建个人博客
默认开启
github page + hexo 搭建个人博客
选择主题
github page + hexo 搭建个人博客
选择完成后即可通过上面的网址访问:https://skyeblack.github.io/

修改网页

添加一个index.html网页
github page + hexo 搭建个人博客
github page + hexo 搭建个人博客
提交代码到github,刷新个人网址:https://skyeblack.github.io/
github page + hexo 搭建个人博客

HEXO

全局安装hexo

npm install -g hexo-cli
github page + hexo 搭建个人博客

新建网站

不要跟github.io放同一个仓库,把源码和网站分开
github page + hexo 搭建个人博客
hexo init [folder]

  • folder 博客源码程序目录
    github page + hexo 搭建个人博客
    github page + hexo 搭建个人博客

启动服务

hexo server
github page + hexo 搭建个人博客
github page + hexo 搭建个人博客

安装依赖

npm install hexo-deployer-git --save

修改_config.yml

配置到博客仓库目录去,不是源码仓库
github page + hexo 搭建个人博客
提交到另一项目用下面这种方式
github page + hexo 搭建个人博客

  • repo 自己的博客路径
  • branch 博客的分支,由于github限制必须在master,所以不能改

提交

源码用git提交,但是博客代码不要用github的提交
hexo d -g
github page + hexo 搭建个人博客
github page + hexo 搭建个人博客

相关文章:

  • 2021-04-20
  • 2022-02-11
  • 2022-01-14
  • 2021-09-02
  • 2021-08-24
猜你喜欢
  • 2022-12-23
  • 2021-11-22
  • 2021-11-20
  • 2021-11-30
  • 2018-05-02
  • 2021-08-24
  • 2021-12-12
相关资源
相似解决方案