Skip to content
LoeiFy edited this page Jul 9, 2017 · 11 revisions

安装

通过 Node.js 安装,没有安装 Node.js ? 看这里

$ sudo npm install Mirror -g

使用

新建一个博客

$ cd blog
$ mirror init

或者

$ mirror init blog

配置你的博客

首先获取你的 token, 然后修改 config.yml

# 网站标题
title:

# GitHub 用户名
user:

# 项目名称,项目里面的 issues 是你的博客内容
repository:

# 多用户设置,上面设置的 user 用户名默认已经包括
# 多用户名字必须用 ',' 分割
# 例子: author0,author1
authors:

# token 设置
# token 必须以 '#' 分割
# 如果你的 token 是 5c31bffc137f44faf7efc4a84da827g7ca2cfeaa 
# 那么这里填入的值为 5#c31bffc137f44faf7efc4a84da827g7ca2cfeaa
token:

# 文章列表分页
perpage: 10

这里有一个例子 config

生成你的博客

$ mirror build

发布你的博客

将所有内容都 push 到一个项目的 gh-pages 分支,你也可以在 CNAME 上定义你的域名

Clone this wiki locally