Contents
  1. 1. 具体步骤
  2. 2. Hexo 常用命令
    1. 2.1. Create a new post
    2. 2.2. Run server
    3. 2.3. Generate static files
    4. 2.4. Deploy to remote sites
    5. 2.5. 查看help
    6. 2.6. 清理缓存
  3. 3. 问题

具体步骤

  • 在自己的github创建仓库, 比如你的github叫hook, 那么必须创建名为 hook.github.io的仓库.

  • 然后安装Hexo.

  • 我选用Jacman主题.

  • 如果想在自己的博客中添加分类和标签, 需要按照如下Markdown格式撰写博客.

    1
    2
    3
    4
    title: zookeeper 扩容实战
    categories: 分布式
    tags: zookeeper
    ---

Hexo 常用命令

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

查看help

1
$ hexo help

清理缓存

1
$ hexo clean

问题

  • 出现 multiple stage entries for merged file 执行如下命令

    1
    2
    3
    $ rm -rf hexo/.deploy_git/.git/index
    $ hexo generate
    $ hexo deploy

(转载本站文章请注明作者和出处 Panda

Contents
  1. 1. 具体步骤
  2. 2. Hexo 常用命令
    1. 2.1. Create a new post
    2. 2.2. Run server
    3. 2.3. Generate static files
    4. 2.4. Deploy to remote sites
    5. 2.5. 查看help
    6. 2.6. 清理缓存
  3. 3. 问题