A blog tool powered by GitHub, write your blog on GitHub issue
$ sudo npm install Mirror -g
$ cd newblog
$ mirror init
or
$ mirror init newblog
modify config.yml
# site title
title: Mirror
# github user: your github username
user: LoeiFy
# issue repo: your issues repo, all blog content from here
repo: Recordum
# multi-authors, `user` is included by default
# example: author0,author1
authors:
# per page
per_page: 10
# sandbox
# quick preview other blog
sandbox: false
Add your access token in token.txt
, this token is read-only
https://github.com/settings/tokens
DO NOT check any permissions
grants read-only access to public information (includes public user profile info, public repository info, and gists)
$ mirror build
you can add domain in CNAME
push all files to a repo gh-pages
branch
example
https://github.com/LoeiFy/Mirror/tree/gh-pages
everything done, now you can write your blog on GitHub issue :)
example
write the blog on this issues
https://github.com/LoeiFy/Recordum/issues
and the blog will update automatically
upgrade mirror
$ sudo npm install Mirror -g
remove your config file
$ cd yourblog
$ rm config.yml
reinitialize blog
$ mirror init
configure
config.yml
rebuild
$ mirror build
ok, you can download the latest release and configure quickly
https://github.com/LoeiFy/Mirror/raw/master/mirror.zip
<!-- index.html -->
<script>
// blog config here
// token should be separated by '#'. example: 5#c31bffc137f44faf7efc4a84da827g7ca2cfeaa
// example:
// window.config = {"title":"rorriM","user":"acyortjs","repo":"acyortjs.github.io","token":"5#c31bffc137f44faf7efc4a84da827g7ca2cfeaa","authors":"LoeiFy,User0","per_page":1,"sandbox":false}
window.config = {"title":"","user":"","repo":"","token":"","authors":"","per_page":"", "sandbox":false}
</script>
fork and install modules
$ npm install
local test
$ npm run dev
build
$ npm run build
MIT
Mirror
by DJ Okawari