!= partial("includes/third-party/newest-comments/common.pug", {}, { cache: true }) script. window.newestComments.ready(() => { const keyName = 'disqus-newest-comments' const { changeContent, run } = window.newestComments const getComment = () => { return fetch('https://disqus.com/api/3.0/forums/listPosts.json?forum=!{forum}&related=thread&limit=!{newestCommentsLimit}&api_key=!{apiKey}') .then(response => response.json()) .then(data => data.response.map(item => { return { 'avatar': item.author.avatar.cache, 'content': changeContent(item.message), 'nick': item.author.name, 'url': item.url, 'date': item.createdAt } })) } run(keyName, getComment) })