How to use this blog system

over 1 year切换至中文

This blog system is not a node module for now, and you need to download whole project from GitHub.

After downloading, you need to create a file named .env.local in your project root.

NODE_ENV=development # If you want to develop this project

APP_KEYS=APP_KEYS # define APP_KEYS for koa-session

GITHUB_TOKEN= # define your own GitHub token for calling GitHub API

# If you want user to login, you need define following variables, more detail: https://github.com/settings/applications/new
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_OAUTH_CALLBACK=http://localhost:7000/api/oauth

And also, you need to modify .env file to enable your own GitHub repository information.

GITHUB_REPOSITORY_OWNER_TYPE should be user or organization .

GITHUB_EXCLUDED_LABELS represents which issue labels you want to exclude displaying in your blog.

Then install dependencies for development or building (yarn) or for production (yarn run prune).

That's all you need to do!

Start the sever on development: yarn dev or on production: yarn build && yarn start.

Addition

This project provides some useful scripts to deploy to your own server.

If you're using Travis , it will automatically sync built assets to a branch named asstes, then on your own server, you can run yarn sync:pull to sync assets into a folder named assets, finally you can simply run yarn pm2 to use pm2 holding your server.