hexo 搭建个人网站

hexo 使用步骤

  • 生成网页

    1
    2
    # hexo generate
    hexo g
  • 部署服务

1
2
# hexo server
hexo s

部署到github或者Coding

  1. 安装需要的包
1
npm install hexo-deployer-git --save
  1. 修改_config.yml,到文件的最后去添加下面内容,将仓库修改成自己的仓库即可
1
2
3
4
deploy:
type: git
repo: https://github.com/ermore/ermore.github.io
branch: master

修改主题

  1. 修改默认主题,替换成Next

网站中有好多主题,可以选一个自己喜欢的主题。

1
git clone https://github.com/iissnan/hexo-theme-next themes/next
  1. _config.yml修改启动next主题
1
2
# theme: landscape  注释这个主题
theme: next