${reply.author.name}
`; - html += `${reply.content.text}
`; + html += ``; + html += `${reply.content.text.slice(0, 200)}
`; html += `diff --git a/layout/comment/webmention-timeline.jsx b/layout/comment/webmention-timeline.jsx
index 733a56b..b8c73db 100644
--- a/layout/comment/webmention-timeline.jsx
+++ b/layout/comment/webmention-timeline.jsx
@@ -14,17 +14,13 @@ class WebmentionTimeline extends Component {
return
-
-
-
长短波
+ 网络回响
你有对这篇文章写回应吗? 你可以在这里提交你的文章网址或推特链接(文章或推特内容需要包含这篇文章的地址,点击这里了解 Webmention):
` + html +=`` + html +=`${webmentionCountPromise.count}
` - // } - // html += `${webmentionCountPromise.type}
` + const distinctMentions = [ ...new Map(data.children.map((item) => [item.author.url, item])).values()].sort((a, b) => new Date(a['wm-received']) - new Date(b['wm-received'])); - const replies = distinctMentions.filter( - (mention) => 'in-reply-to' in mention && 'content' in mention - ); + html += ``; if (distinctMentions.length > 0) { - html += `Already ${distinctMentions.length} awesome people liked, shared or talked about this article:
`; - } else { - html += `Be the first one to share this article!`; + html += `已经有 ${distinctMentions.length} 朋友喜欢、分享或讨论这篇文章:`; } html += ``; + + const replies = distinctMentions.filter( + (mention) => ('in-reply-to' in mention || 'mention-of' in mention)&& 'content' in mention + ); if (replies && replies.length) { html += `