From 8e1009a9a150cba50ce080dc4ba09c5cb25b8961 Mon Sep 17 00:00:00 2001 From: Lewis Dale Date: Wed, 1 Nov 2023 08:28:23 +0000 Subject: [PATCH] Partially fix missing author images on mentions --- src/_data/posts.js | 5 ++++- src/_includes/post.njk | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/_data/posts.js b/src/_data/posts.js index bfb1e85..f33ab25 100644 --- a/src/_data/posts.js +++ b/src/_data/posts.js @@ -2,7 +2,9 @@ const postCache = require('./_postData'); const dateSort = (a, b) => new Date(b.date) - new Date(a.date); -const mapComment = comment => ({ +const mapComment = comment => { + console.log(comment); + return ({ author: { name: comment.author_name, avatars: comment.author_avatar_urls, @@ -12,6 +14,7 @@ const mapComment = comment => ({ canonical: comment.meta.url, date: comment.date, }); +} module.exports = async () => { diff --git a/src/_includes/post.njk b/src/_includes/post.njk index c90ad07..658e095 100644 --- a/src/_includes/post.njk +++ b/src/_includes/post.njk @@ -32,7 +32,7 @@ eleventyComputed:
{% for like in post.comments.like %} - {{ like.author.name }} + {{ like.author.name }} {% endfor %}
@@ -46,7 +46,7 @@ eleventyComputed:
{% for like in post.comments.repost %} - {{ like.author.name }} + {{ like.author.name }} {% endfor %}