This commit is contained in:
xaoxuu 2022-10-19 14:01:04 +08:00
parent bb14edc97f
commit 53b7078a2d
2 changed files with 5 additions and 3 deletions

View File

@ -40,7 +40,9 @@ function postTimeline(args, content) {
var el = '';
if (args.api && args.api.length > 0) {
el += '<div class="tag-plugin timeline stellar-timeline-api" api="' + args.api + '">';
el += '<div class="tag-plugin timeline stellar-timeline-api"';
el += ' ' + hexo.args.joinTags(args, ['api']).join(' ');
el += '>';
} else {
el += '<div class="tag-plugin timeline">';
}

View File

@ -97,9 +97,9 @@ const StellarTimeline = {
}
}
}
if (item.comments) {
if (item.comments != null) {
cell += '<a class="item comments last" href="' + item.html_url + '" target="_blank" rel="external nofollow noopener noreferrer">';
cell += '<span>💬 ' + item.comments + '</span>';
cell += '<span>💬 ' + (item.comments || 0) + '</span>';
cell += '</a>';
}