文章目录
  1. 1. 官方链接
  2. 2. Quick Start
  3. 3. 操作命令
    1. 3.1. Create a new post
    2. 3.2. Run server
    3. 3.3. Generate static files
    4. 3.4. Deploy to remote sites

自己配置hexo的过程,存档备忘。

官方链接

Hexo首页
Hexo文档
Hoxo on GitHub

Quick Start

  1. 安装Git
  2. GitHub上建库
  3. 安装Node.js
  4. 安装hexo

    1
    npm install -g hexo-cli
  5. 配置工作目录

    1
    2
    3
    4
    5
    hexo init <folder>
    cd <folder>
    npm install
    npm install hexo-deployer-git --save
    npm install hexo-tag-asset-res --save
  6. 配置_config.yml

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    # Site
    title: Skywolf
    subtitle:
    description:
    author: Zhang Jianun
    language: zh_CN
    timezone: Asia/Shanghai
    # URL
    url: http://skywolf.github.io
    # Writing
    post_asset_folder: true
    # Deployment
    deploy:
    type: git
    repo: git@github.com:skywolf/skywolf.github.io
  7. 设置mathjax

  8. googleapis换成国内镜像useso
    替换themes\landscape\layout_partial\after-footer.ejs里的googleapis.com为useso.com

操作命令

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

文章目录
  1. 1. 官方链接
  2. 2. Quick Start
  3. 3. 操作命令
    1. 3.1. Create a new post
    2. 3.2. Run server
    3. 3.3. Generate static files
    4. 3.4. Deploy to remote sites