blog/themes/fluid/layout/_partials/comments/discuss.ejs

18 lines
617 B
Plaintext
Raw Normal View History

2024-11-16 11:34:10 +08:00
<% if (theme.discuss && theme.discuss.serverURLs) { %>
<div id="discuss-comments"></div>
<script type="text/javascript">
Fluid.utils.loadComments('#comments', function() {
Fluid.utils.createScript('<%= url_join(theme.static_prefix.discuss, 'discuss.js') %>', function() {
var options = Object.assign(
<%- JSON.stringify(theme.discuss || {}) %>,
{ el: '#discuss-comments',
path: <%= theme.discuss.path %>
}
)
discuss.init(options)
});
});
</script>
<noscript>Please enable JavaScript to view the comments</noscript>
<% } %>