Giog 是一个基于github issues 的轻量级博客系统,由 vue2.x + vue-router + vuex + axios 构建, 使用koa 进行服务端渲染。并使用了Github GraphQL API v4同步issues数据。vue
github: github.com/eteplus/gio…node
后续功能会完善和优化ios
预览地址:www.eteplus.com git
手机预览二维码:github
Required:vue-router
# install dependencies
npm install # or yarn
复制代码
userInfo: {
// 我的 github 地址
github: 'https://github.com/eteplus',
// 用户名
userName: 'ETEPLUS',
// 头像地址
avatar: '/static/img/avatar.jpeg',
// 座右铭
motto: 'Designer and Coder. ^_^',
},
siteInfo: {
// 网站名称
name: 'ETEPLUS',
// 域名备案号 - ICP备xxxxx号
recordText: ''
}
复制代码
Apply accessToken -> Page -> Personal access tokens -> Generate new tokenvuex
pageSize: 每次同步issues的数量数据库
{
"accessToken": "github accessToken",
"owner": "github username",
"repository": "issues repository",
"pageSize": 8
}
复制代码
npm run db:migrate
npm run sync
复制代码
清除数据库表:npm
全部数据会被清除,须要从新迁移和同步json
npm run db:migrate:undo
复制代码
# serve in dev mode, with hot reload at 127.0.0.1:3030
npm run dev
# build for production
npm run build
# serve in production mode
npm start
复制代码
修改 pm2.json
pm2 startOrReload pm2.json
复制代码