1.基于node 的npm包管理工具
2.npm install -g hexo(hexo-cli)
3.下载的资源是国外的可能比较慢,可以使用淘宝镜像(代理的仓库)npm install -g hexo --registry=https://registry.npm.taobao.org
4.在一个空目录(hexo init)博客系统的初始化
5.hexo\source\_posts md文档就是博客文档
6.如果要写一篇博客(新建文件 xxx.md)
7.把md文档转html文件(hexo g)
8.在自己的服务器预览(hexo s) localhost:4000
9.如果从新生成html文件可能会有缓存 (hexo clean,hexo g)

10.和github关联 推代码到github
11.和git关联 hexo-deploy-git 插件(安装 npm install hexo-deployer-git --save )
12.和github关联需要配置文件
13.修改文件 _config.yml 在最下面
14.
    type: git
    repo: git@github.com:用户名/用户名.github.io.git
    branch: master
15. 需要在github配置仓库 名称(用户名.github.io)
16. 把代码推到github (hexo d)
17. 只能预览代码 无法预览页面
18. 配置当前仓库可以通过网络访问页面
19. 在仓库的首页 settings--->GitHub Pages-->改选项 Source(none---master branch)
20. 通过 用户名.github.io 访问你的博客

 

相关文章:

  • 2022-02-26
  • 2021-08-18
  • 2021-10-06
  • 2021-06-30
  • 2022-03-07
  • 2022-12-23
猜你喜欢
  • 2021-04-09
  • 2022-01-14
  • 2021-10-26
  • 2022-12-23
  • 2021-09-03
  • 2022-12-23
  • 2021-06-06
相关资源
相似解决方案