feat(config): gitalk comments plugin add proxy configuration (#189)

This commit is contained in:
XPoet 2023-01-05 11:36:38 +08:00
parent bd26febaa2
commit 35bb634f9d
2 changed files with 4 additions and 1 deletions

View File

@ -234,6 +234,7 @@ comment:
repository: # Repository name to store issues
client_id: # GitHub Application Client ID
client_secret: # GitHub Application Client Secret
proxy: # GitHub oauth request reverse proxy for CORS
# Twikoo
# See: https://github.com/imaegoo/twikoo

View File

@ -5,7 +5,8 @@ const {
client_secret,
repository,
github_id,
github_admins
github_admins,
proxy
} = theme.comment?.gitalk
let cdn_css = '//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.css'
let cdn_js = '//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.js'
@ -46,6 +47,7 @@ if (t_cdn_enable === true) {
owner: '<%= github_id %>',
admin: '<%= github_admins || [github_id] %>',
id: __gitalk__pathname,
proxy: '<%= proxy %>',
language: '<%= config.language %>'
}).render('gitalk-container');
} catch (e) {