2026-05-16 04:24:10 +08:00

24 lines
845 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<% if (theme.twikoo && theme.twikoo.envId) { %>
<div id="tcomment"></div>
<script src="https://cdn.jsdelivr.net/npm/twikoo@1.6.44/dist/twikoo.min.js"></script>
<script>
twikoo.init({
envId: '<%= theme.twikoo.envId %>',
el: '#tcomment',
// region: 'ap-guangzhou', // 腾讯云环境时需要Vercel 不需要
path: location.pathname,
lang: '<%= theme.twikoo.lang || "zh-CN" %>'
}).then(function () {
console.log('Twikoo 评论系统加载成功');
}).catch(function (err) {
console.error('Twikoo 评论系统加载失败:', err);
});
</script>
<% } else { %>
<div class="mdui-container" style="text-align: center; padding: 2rem;">
<mdui-typography variant="body2" style="color: var(--mdui-color-on-surface-variant);">
Twikoo 评论系统未正确配置,请检查您的设置。
</mdui-typography>
</div>
<% } %>