Hexo 简单使用

  1. npm安装

    1
    npm install hexo -g
  2. 查看版本号

    1
    hexo -v
  3. 初始化项目

    1
    hexo init
  4. 发布

    1
    hexo g
  5. 启动

    1
    hexo server -p 8080
  6. 创建新页面

    1
    hexo new post "***"
  7. 发布到github

    安装github发布扩展

    1
    npm install hexo-deployer-git --save

    配置__config.yml,末尾添加

    1
    2
    3
    4
    5
    6
    # Deployment
    ## Docs: https://hexo.io/docs/deployment.html
    deploy:
    type: git
    repository: git@github.com:legatoplay/legatoplay.github.io.git
    branch: master

    发布到github

    1
    hexo d -g