Skip to content

Commit

Permalink
fix(route/zsxq): 为主题添加跳转链接 (DIYgod#18113)
Browse files Browse the repository at this point in the history
  • Loading branch information
ygguorun authored Jan 13, 2025
1 parent 494fe64 commit 9279aa1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/routes/zsxq/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export function generateTopicDataItem(topics: Topic[]): DataItem[] {
return topics.map((topic) => {
let description: string | undefined;
let title = '';
const url = `https://wx.zsxq.com/topic/${topic.topic_id}`;
switch (topic.type) {
case 'talk':
title = topic.talk?.text?.split('\n')[0] ?? '文章';
Expand Down Expand Up @@ -66,6 +67,7 @@ export function generateTopicDataItem(topics: Topic[]): DataItem[] {
title: topic.title ?? title,
description,
pubDate: parseDate(topic.create_time),
link: url,
};
});
}

0 comments on commit 9279aa1

Please sign in to comment.