diff --git a/_config.yml b/_config.yml index 8cb2353..9cb8cda 100644 --- a/_config.yml +++ b/_config.yml @@ -203,7 +203,8 @@ comment: # See: https://github.com/imaegoo/twikoo twikoo: env_id: # Tencent Cloud environment id - region: # environment region. If select Guangzhou, fill in "ap-guangzhou". + region: # Environment region. If select Guangzhou, fill in "ap-guangzhou". + version: 1.6.7 # Twikoo version, default use v1.6.7, you can custom fill # --------------------------------------------------------------------------------------- # RSS diff --git a/layout/_partial/comment/twikoo.ejs b/layout/_partial/comment/twikoo.ejs index 957f6b8..072e549 100644 --- a/layout/_partial/comment/twikoo.ejs +++ b/layout/_partial/comment/twikoo.ejs @@ -1,19 +1,28 @@ -<% if(theme.comment.use === 'twikoo' && theme.comment.twikoo.env_id) { %> +<% +const { enable: pjax_enable } = theme.pjax +let { + env_id: tk_env_id, region: tk_region, version: tk_version +} = theme.comment.twikoo +if (!tk_version) { tk_version = '1.6.7' } +const twikoo_cdn_url = `//cdn.jsdelivr.net/npm/twikoo@${tk_version}/dist/twikoo.all.min.js` +%> +<% if(theme.comment.use === 'twikoo' && tk_env_id) { %>
-
-