-
Notifications
You must be signed in to change notification settings - Fork 75
中文教程
LoeiFy edited this page Aug 28, 2017
·
11 revisions
通过 Node.js 安装,没有安装 Node.js ? 看这里
$ sudo npm install Mirror -g
$ cd blog
$ mirror init
或者
$ mirror init blog
首先获取你的 token, 然后修改 config.yml
# 是否为组织项目
organization: false
# 文章排序,依据更新时间还是创建时间
# 值为 'UPDATED_AT' 或者 'CREATED_AT'
order: 'UPDATED_AT'
# 网站标题
title:
# GitHub 用户名或者组织名
user:
# 项目名称,项目里面的 issues 是你的博客内容
# 如果你的项目是组织项目,请设置 'organization' 为 true
repository:
# 多用户设置,上面设置的 user 用户名默认已经包括
# 多用户名字必须用 ',' 分割
# 例子: author0,author1
authors:
# token 设置
# token 必须以 '#' 分割
# 如果你的 token 是 5c31bffc137f44faf7efc4a84da827g7ca2cfeaa
# 那么这里填入的值为 5#c31bffc137f44faf7efc4a84da827g7ca2cfeaa
token:
# 文章列表分页
perpage: 10
这里有一个例子 config
$ mirror build
将所有内容都 push 到一个项目的 gh-pages
分支,你也可以在 CNAME
上定义你的域名
博客项目: https://github.com/LoeiFy/Mirror/tree/gh-pages
博客内容 issues: https://github.com/LoeiFy/Recordum/issues