2021-02-19 23:33:19 +08:00
|
|
|
<%
|
|
|
|
var loadComment = false;
|
|
|
|
if (theme.comments.service && theme.comments.service.length > 0) {
|
|
|
|
if (page.comments == undefined || page.comments != false) {
|
|
|
|
loadComment = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 合并项目评论
|
|
|
|
if (loadComment && page.layout == 'wiki' && page.wiki) {
|
|
|
|
if (page.comment_id == undefined) {
|
|
|
|
if (theme.comments.service == 'utterances') {
|
|
|
|
// 使用项目名作为评论issue标题并共享评论数据
|
|
|
|
page.comment_id = page.wiki;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
%>
|
|
|
|
<% if (loadComment) { %>
|
2021-02-25 20:49:43 +08:00
|
|
|
<div class='related-wrap md' id="comments">
|
2021-02-19 23:33:19 +08:00
|
|
|
<div class='cmt-title cap cyan'>
|
|
|
|
<%- page.comment_title != undefined ? page.comment_title : __('meta.comment_title') %>
|
|
|
|
</div>
|
|
|
|
<div class='cmt-body <%- theme.comments.service %>'>
|
|
|
|
<%- partial(theme.comments.service + '/layout') %>
|
|
|
|
</div>
|
2021-02-25 20:49:43 +08:00
|
|
|
</div>
|
2021-02-19 23:33:19 +08:00
|
|
|
<% } %>
|