Skip to content

Commit

Permalink
🎨 优化评论代码
Browse files Browse the repository at this point in the history
  • Loading branch information
zkqiang committed May 20, 2021
1 parent b095944 commit e5bec03
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 3 additions & 1 deletion layout/_partial/comments/gitalk.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
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) %>' }
{
id: '<%= md5(page.path) %>'
}
)
var gitalk = new Gitalk(options);
gitalk.render('gitalk-container');
Expand Down
5 changes: 4 additions & 1 deletion layout/_partial/comments/twikoo.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
Fluid.utils.createScript('<%= url_join(theme.static_prefix.twikoo, 'twikoo.all.min.js') %>', function() {
var options = Object.assign(
<%- JSON.stringify(theme.twikoo || {}) %>,
{ el: "#twikoo", path: '<%= theme.twikoo.path %>' }
{
el: '#twikoo',
path: '<%= theme.twikoo.path %>'
}
)
twikoo.init(options)
});
Expand Down
5 changes: 4 additions & 1 deletion layout/_partial/comments/valine.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
Fluid.utils.createScript('<%= url_join(theme.static_prefix.valine, 'Valine.min.js') %>', function() {
var options = Object.assign(
<%- JSON.stringify(theme.valine || {}) %>,
{ el: "#valine", path: <%= theme.valine.path %> }
{
el: "#valine",
path: <%= theme.valine.path %>
}
)
new Valine(options);
});
Expand Down
5 changes: 4 additions & 1 deletion layout/_partial/comments/waline.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
Fluid.utils.createScript('<%= url_join(theme.static_prefix.waline, 'Waline.min.js') %>', function() {
var options = Object.assign(
<%- JSON.stringify(theme.waline || {}) %>,
{ el: "#waline", path: <%= theme.waline.path %> }
{
el: '#waline',
path: <%= theme.waline.path %>
}
)
new Waline(options);
});
Expand Down

0 comments on commit e5bec03

Please sign in to comment.