feat(config): gitalk comments plugin add proxy configuration (#189)
This commit is contained in:
parent
bd26febaa2
commit
35bb634f9d
|
@ -234,6 +234,7 @@ comment:
|
||||||
repository: # Repository name to store issues
|
repository: # Repository name to store issues
|
||||||
client_id: # GitHub Application Client ID
|
client_id: # GitHub Application Client ID
|
||||||
client_secret: # GitHub Application Client Secret
|
client_secret: # GitHub Application Client Secret
|
||||||
|
proxy: # GitHub oauth request reverse proxy for CORS
|
||||||
|
|
||||||
# Twikoo
|
# Twikoo
|
||||||
# See: https://github.com/imaegoo/twikoo
|
# See: https://github.com/imaegoo/twikoo
|
||||||
|
|
|
@ -5,7 +5,8 @@ const {
|
||||||
client_secret,
|
client_secret,
|
||||||
repository,
|
repository,
|
||||||
github_id,
|
github_id,
|
||||||
github_admins
|
github_admins,
|
||||||
|
proxy
|
||||||
} = theme.comment?.gitalk
|
} = theme.comment?.gitalk
|
||||||
let cdn_css = '//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.css'
|
let cdn_css = '//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.css'
|
||||||
let cdn_js = '//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.js'
|
let cdn_js = '//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.js'
|
||||||
|
@ -46,6 +47,7 @@ if (t_cdn_enable === true) {
|
||||||
owner: '<%= github_id %>',
|
owner: '<%= github_id %>',
|
||||||
admin: '<%= github_admins || [github_id] %>',
|
admin: '<%= github_admins || [github_id] %>',
|
||||||
id: __gitalk__pathname,
|
id: __gitalk__pathname,
|
||||||
|
proxy: '<%= proxy %>',
|
||||||
language: '<%= config.language %>'
|
language: '<%= config.language %>'
|
||||||
}).render('gitalk-container');
|
}).render('gitalk-container');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in New Issue