Hexo部署
Content
Installation
1 2 3 4
| npm install -g hexo-cli
hexo -v
|
Initialize Project
1 2 3 4
| hexo init phd_blog cd phd_blog npm install
|
Change Theme
个人很prefer vivia
这个theme,直戳XP。
- 下载repo
1 2 3
| cd /phd_blogs git clone https://github.com/saicaca/hexo-theme-vivia.git themes/vivia npm install colorjs.io stylus hexo-symbols-count-time
|
- 创建
config
文件
将vivia
目录下的example_config.vivia.yml
copy一份到/phd_blogs
,重命名为_config.vivia.yml
- 自定义
config
- 设置
vivia
为Theme
- 创建
about
Page
- Disable the Pagination of Archive Page
Without this configuration, the archive page will only show up to ten articles at most.
1 2
| archive_generator: per_page: 0
|
One Command Deployment
首先安装hexo-deployer-git
1 2
| cd phd_log npm install hexo-deployer-git --save
|
Add following info in _config.yml
.
1 2 3 4
| deploy: type: git repo: https://github.com/Antidington/Antidington.github.io branch: gh-pages
|
更改repo默认branch
为gh-pages
一键部署
1
| hexo clean && hexo deploy
|
Reference
- https://github.com/saicaca/hexo-theme-vivia#6-disable-the-pagination-of-archive-page
- https://hexo.io/zh-cn/docs/github-pages.html
- https://hexo.io/zh-cn/docs/one-command-deployment
- https://blog.csdn.net/yaorongke/article/details/119089190