hexo/node_modules/hexo-theme-fluid/layout/_partials/comments/gitalk.ejs

20 lines
798 B
Plaintext

<% if(theme.gitalk.clientID && theme.gitalk.clientSecret && theme.gitalk.repo){ %>
<div id="gitalk-container"></div>
<script type="text/javascript">
Fluid.utils.loadComments('#gitalk-container', function() {
Fluid.utils.createCssLink('<%= url_join(theme.static_prefix.internal_css, 'gitalk.css') %>')
Fluid.utils.createScript('<%= url_join(theme.static_prefix.gitalk, 'gitalk.min.js') %>', function() {
var options = Object.assign(
<%- JSON.stringify(theme.gitalk || {}) %>,
{
id: '<%= md5(page.path) %>'
}
)
var gitalk = new Gitalk(options);
gitalk.render('gitalk-container');
});
});
</script>
<noscript>Please enable JavaScript to view the comments</noscript>
<% } %>