Skip to content

Commit

Permalink
[fix] proj.comments false (xaoxuu#430)
Browse files Browse the repository at this point in the history
* [fix] proj.comments false

* [fix] page.comments false
  • Loading branch information
weekdaycare authored Apr 10, 2024
1 parent 335514c commit f0c743a
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions layout/_partial/comments/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,20 @@ if (theme.comments.service && theme.comments.service.length > 0) {
// 合并项目评论
const proj = theme.wiki.tree[page.wiki]
if (loadComment && (proj != null)) {
if (proj.comment_title != undefined && page.comment_title == undefined) {
if (['utterances', 'beaudar', 'giscus'].includes(theme.comments.service)) {
page.comment_title = proj.comment_title;
if (proj.comments === false) {
loadComment = false;
page.comments = false;
} else {
if (proj.comment_title != undefined && page.comment_title == undefined) {
if (['utterances', 'beaudar', 'giscus'].includes(theme.comments.service)) {
page.comment_title = proj.comment_title;
}
}
if (proj.comments && proj.comments.service) {
cmt = proj.comments;
let s = proj.comments.service;
cmt[s] = Object.assign({}, theme.comments[s], proj.comments[s]);
}
}
if (proj.comments && proj.comments.service) {
cmt = proj.comments;
let s = proj.comments.service;
cmt[s] = Object.assign({}, theme.comments[s], proj.comments[s]);
}
}
if (cmt.service && page[cmt.service]) {
Expand Down

0 comments on commit f0c743a

Please sign in to comment.