Skip to content

Commit e5b0b41

Browse files
committed
update readme
1 parent c9be7d7 commit e5b0b41

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
- 具备了代码高亮、权限管理、第三方 `github` 登录、评论与通知、以及邮件通知功能的个人博客...
88
- 具备文件导入导出功能,假如你之前用 `hexo` 博客, 那么你可以直接通过导入 `md` 文件迁移你的文章。
99

10-
* 我的博客地址: [郭大大的博客](http://47.112.48.225:4002/)
11-
* 测试博客地址: [测试使用的郭大大的博客](http://47.112.48.225:4003/)) `admin/admin` 为博主账号 小伙伴可以使用看看博客的完整功能!
10+
* 我的博客地址: [郭大大的博客](https://blog.alvin.run)
11+
* 测试博客地址: [测试使用的郭大大的博客](https://test.alvin.run)) `admin/admin` 为博主账号 小伙伴可以使用看看博客的完整功能!
1212

1313
[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php)
1414
[![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg)](https://github.com/996icu/996.ICU/blob/master/LICENSE)
@@ -106,12 +106,12 @@ const verifyList1 = [
106106
{ regexp: /\/article\/output/, required: 'get', verifyTokenBy: 'url' }, // 导出文章 verifyTokenBy 从哪里验证 token
107107
{ regexp: /\/article/, required: 'post, put, delete' }, // 普通用户 禁止修改或者删除、添加文章
108108
{ regexp: /\/discuss/, required: 'delete, post' }, // 普通用户 禁止删除评论
109-
{ regexp: /\/user/, required: 'get, put, delete' } // 普通用户 禁止获取用户、修改用户、以及删除用户
109+
{ regexp: /\/user/, required: 'get, put, delete' }, // 普通用户 禁止获取用户、修改用户、以及删除用户
110110
]
111111

112112
// role === 2 需要权限的路由
113113
const verifyList2 = [
114-
{ regexp: /\/discuss/, required: 'post' } // 未登录用户 禁止评论
114+
{ regexp: /\/discuss/, required: 'post' }, // 未登录用户 禁止评论
115115
]
116116

117117
/**
@@ -121,7 +121,7 @@ const verifyList2 = [
121121
*/
122122
function checkAuth(method, url) {
123123
function _verify(list, role) {
124-
const target = list.find(v => {
124+
const target = list.find((v) => {
125125
return v.regexp.test(url) && (v.required === 'all' || v.required.toUpperCase().includes(method))
126126
})
127127

@@ -177,8 +177,8 @@ export const SIDEBAR = {
177177
// 个人主页
178178
homepages: {
179179
github: 'https://github.com/gershonv',
180-
juejin: 'https://juejin.im/user/5acac6c4f265da2378408f92'
181-
}
180+
juejin: 'https://juejin.im/user/5acac6c4f265da2378408f92',
181+
},
182182
}
183183

184184
// === discuss avatar
@@ -188,14 +188,14 @@ export const DISCUSS_AVATAR = SIDEBAR.avatar // 评论框博主头像
188188
export const GITHUB = {
189189
enable: true, // github 第三方授权开关
190190
client_id: '', // Setting > Developer setting > OAuth applications => client_id
191-
url: 'https://github.com/login/oauth/authorize' // 跳转的登录的地址
191+
url: 'https://github.com/login/oauth/authorize', // 跳转的登录的地址
192192
}
193193

194194
export const ABOUT = {
195195
avatar: SIDEBAR.avatar,
196196
describe: SIDEBAR.subTitle,
197197
discuss: true, // 关于页面是否开启讨论
198-
renderMyInfo: <MyInfo /> // 我的介绍 自定义组件 => src/views/web/about/MyInfo.jsx
198+
renderMyInfo: <MyInfo />, // 我的介绍 自定义组件 => src/views/web/about/MyInfo.jsx
199199
}
200200
```
201201

@@ -212,7 +212,7 @@ const config = {
212212
client_secret: '',
213213
access_token_url: 'https://github.com/login/oauth/access_token',
214214
fetch_user_url: 'https://api.github.com/user', // 用于 oauth2
215-
fetch_user: 'https://api.github.com/users/' // fetch user url https://api.github.com/users/gershonv
215+
fetch_user: 'https://api.github.com/users/', // fetch user url https://api.github.com/users/gershonv
216216
},
217217
EMAIL_NOTICE: {
218218
// 邮件通知服务
@@ -224,16 +224,16 @@ const config = {
224224
secure: true, // true for 465, false for other ports
225225
auth: {
226226
user: 'guodadablog@163.com', // generated ethereal user
227-
pass: '123456' // generated ethereal password 授权码 而非 密码
228-
}
227+
pass: '123456', // generated ethereal password 授权码 而非 密码
228+
},
229229
},
230230
subject: '郭大大的博客 - 您的评论获得新的回复!', // 主题
231231
text: '您的评论获得新的回复!',
232-
WEB_HOST: 'http://127.0.0.1:3000' // email callback url
232+
WEB_HOST: 'http://127.0.0.1:3000', // email callback url
233233
},
234234
TOKEN: {
235235
secret: 'guo-test', // secret is very important!
236-
expiresIn: '720h' // token 有效期
236+
expiresIn: '720h', // token 有效期
237237
},
238238
DATABASE: {
239239
database: 'test',
@@ -246,15 +246,15 @@ const config = {
246246
max: 5,
247247
min: 0,
248248
acquire: 30000,
249-
idle: 10000
249+
idle: 10000,
250250
},
251251
define: {
252252
timestamps: false, // 默认不加时间戳
253-
freezeTableName: true // 表名默认不加 s
253+
freezeTableName: true, // 表名默认不加 s
254254
},
255-
timezone: '+08:00'
256-
}
257-
}
255+
timezone: '+08:00',
256+
},
257+
},
258258
}
259259

260260
// 部署的环境变量设置
@@ -266,7 +266,7 @@ if (!devMode) {
266266
...config.DATABASE,
267267
database: '', // 数据库名
268268
user: '', // 账号
269-
password: '' // 密码
269+
password: '', // 密码
270270
}
271271

272272
// 配置 github 授权
@@ -281,7 +281,7 @@ if (!devMode) {
281281
// config.EMAIL_NOTICE.enable = true
282282
config.EMAIL_NOTICE.transporterConfig.auth = {
283283
user: 'guodadablog@163.com', // generated ethereal user
284-
pass: '123456XXX' // generated ethereal password 授权码 而非 密码
284+
pass: '123456XXX', // generated ethereal password 授权码 而非 密码
285285
}
286286
config.EMAIL_NOTICE.WEB_HOST = 'https://guodada.fun'
287287
}

0 commit comments

Comments
 (0)