Skip to content

Commit e5bec03

Browse files
committed
🎨 优化评论代码
1 parent b095944 commit e5bec03

4 files changed

Lines changed: 15 additions & 4 deletions

File tree

layout/_partial/comments/gitalk.ejs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
Fluid.utils.createScript('<%= url_join(theme.static_prefix.gitalk, 'gitalk.min.js') %>', function() {
77
var options = Object.assign(
88
<%- JSON.stringify(theme.gitalk || {}) %>,
9-
{ id: '<%= md5(page.path) %>' }
9+
{
10+
id: '<%= md5(page.path) %>'
11+
}
1012
)
1113
var gitalk = new Gitalk(options);
1214
gitalk.render('gitalk-container');

layout/_partial/comments/twikoo.ejs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
Fluid.utils.createScript('<%= url_join(theme.static_prefix.twikoo, 'twikoo.all.min.js') %>', function() {
66
var options = Object.assign(
77
<%- JSON.stringify(theme.twikoo || {}) %>,
8-
{ el: "#twikoo", path: '<%= theme.twikoo.path %>' }
8+
{
9+
el: '#twikoo',
10+
path: '<%= theme.twikoo.path %>'
11+
}
912
)
1013
twikoo.init(options)
1114
});

layout/_partial/comments/valine.ejs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
Fluid.utils.createScript('<%= url_join(theme.static_prefix.valine, 'Valine.min.js') %>', function() {
66
var options = Object.assign(
77
<%- JSON.stringify(theme.valine || {}) %>,
8-
{ el: "#valine", path: <%= theme.valine.path %> }
8+
{
9+
el: "#valine",
10+
path: <%= theme.valine.path %>
11+
}
912
)
1013
new Valine(options);
1114
});

layout/_partial/comments/waline.ejs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
Fluid.utils.createScript('<%= url_join(theme.static_prefix.waline, 'Waline.min.js') %>', function() {
66
var options = Object.assign(
77
<%- JSON.stringify(theme.waline || {}) %>,
8-
{ el: "#waline", path: <%= theme.waline.path %> }
8+
{
9+
el: '#waline',
10+
path: <%= theme.waline.path %>
11+
}
912
)
1013
new Waline(options);
1114
});

0 commit comments

Comments
 (0)