部署发布
- 将本地博客中编写的博客发布到云服务器中。
- 在本地博客目录,安装hexi-deployer-git插件
npm install hexo-deployer-git --save
- 编辑_config.yml文件,配置deploy属性。
deploy: type: git repo: git@39.98.255.120:/home/git/repos/hexo.git branch: master
- 执行如下指令,将生成html文件,并发布到云服务器。
hexo clean hexo generate hexo deploy
- 浏览器直接输入云服务器地址访问即可。
- 注意:config.yml文件中deploy属性的repo可以存在多个,也就是说可以同时发布到多个服务器:
deploy: type: git repository: github: git@github.com:xxx/yyy.git myserver: git@xxx:yyy.git branch: master
主题配置
- 几个不错的主题
- a. icarus: https://github.com/ppoffice/hexo-theme-icarus.git
- b. jacman: https://github.com/wuchong/jacman.git
- c. maupassant: https://github.com/tufu9441/maupassant-hexo.git
- d. next: https://github.com/theme-next/hexo-theme-next.git
- e. melody: https://github.com/Molunerfinn/hexo-theme-melody.git
- 导入主题指令
- a. git clone https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus
- b. git clone https://github.com/wuchong/jacman.git themes/jacman
- c. git clone https://github.com/tufu9441/maupassant-hexo.git themes/maupassant
- d. git clone https://github.com/theme-next/hexo-theme-next.git themes/next
- e. git clone https://github.com/Molunerfinn/hexo-theme-melody.git themes/melody
- 编辑_config.yml文件,配置主题
- a. theme: next