feat: twikoo

This commit is contained in:
沈宇
2020-12-24 13:36:44 +08:00
parent 1c3644ef7b
commit 2dd7a5408b
3 changed files with 17 additions and 3 deletions

View File

@@ -67,5 +67,5 @@
post.slug, title: post.title, url: config.url+url_for(post.path) }) %> <% } %>
<% if (is_post()) { %> <%- partial('post/gitalk') %> <% } %> <% if
(theme.minivaline && theme.minivaline.enable && !post.no_minivaline){ %> <%-
partial('post/minivaline') %> <% } %>
partial('post/minivaline') %> <% } %> <% if (is_post()) { %> <%- partial('post/twikoo') %> <% } %>
</article>

View File

@@ -0,0 +1,9 @@
<% if (!index && theme.twikoo && theme.twikoo.enable){ %>
<script src="https://cdn.jsdelivr.net/npm/twikoo/dist/twikoo.all.min.js"></script>
<div id="twikoo" class="twikoo"></div>
<script>
twikoo.init({
envId: "<%- theme.twikoo.envId %>"
})
</script>
<% } %>