如何使用hexo搭建个人博客
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
#
Quick Start#
Create a new postMore info: Writing
#
Run serverMore info: Server
#
Generate static filesMore info: Generating
#
Deploy to remote sites#
如何搭建自己的博客网站平台: github/gitee
代码工程应为youname.github.io, 如此依赖便可直接访问 https://yourname.github.io/
打开GitHub Pages,即可访问。建议使用master存放开发代码, gp-pages存放用于访问的静态资源。
More info: Deployment
#
发布#
方式1安装hexo-deployer-git, 配置_config.yml中的
命令
#
方式2: gh-pages- chalk
- progress
#
方式3: Travis CI 持续发布- https://travis-ci.org/ (面向社区,不久将关闭)
- https://travis-ci.com/
操作步骤:
- 上添加监听仓库
- 配置环境变量, 注意https://token@github.com/username/username.github.io.git localBranch:remoteBranch
- .travis.yml添加相应指令
注意: git init 后没有分支, 在git add . 后默认创建mater分支
也可以直接执行npm run deploy, 注意先设置token, 否则运行会失败
#
选择主题当前使用主题: Melody
修改配置文件_config.yml
#
常见问题#
build资源为空错误提示
原因: node v14下存在的bug, 尝试其他版本
参考: