From 951ab023ecee31868c8a95dc99605fa1004d6171 Mon Sep 17 00:00:00 2001 From: hoilc Date: Tue, 28 Apr 2020 23:47:27 +0800 Subject: [PATCH] fix: BoF article URL (#4596) --- lib/routes/bof/home.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/routes/bof/home.js b/lib/routes/bof/home.js index 7122be9f3..dd36c2acc 100644 --- a/lib/routes/bof/home.js +++ b/lib/routes/bof/home.js @@ -21,11 +21,13 @@ module.exports = async (ctx) => { }); const items = response.data.data.articles.edges.map((item) => { + const url = new URL(item.node.url); + url.host = 'cn.businessoffashion.com'; const single = { title: item.node.title, description: `${item.node.summary}
${item.node.content}`, pubDate: new Date(item.node.published.value).toUTCString(), - link: item.node.url, + link: url.href, author: item.node.authors[0].displayName, };