From 93f2cd6525e0e5afe5314bd3e7da41367b46eefc Mon Sep 17 00:00:00 2001 From: kyuuseiryuu Date: Mon, 16 Mar 2026 02:10:56 +0900 Subject: [PATCH] fix(index): trim club name from event titles and simplify calendar name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Modified `title` generation to remove the club name prefix if it exists. - Updated `calName` to display only the club name instead of adding "的比赛" suffix. - This prevents redundant information in the calendar event titles. --- src/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index de4e010..dd7ed9e 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -63,7 +63,7 @@ const server = serve({ } } : {}), start: ics.convertTimestampToArray(dayjs.tz(e.startDate, 'Asia/Tokyo').toDate().getTime(), 'local') , duration: { hours: 6, minutes: 30 }, - title: e.title, + title: e.title.replace(clubInfo?.name || '', ''), // end: dayjs(event.startDate).add(6, 'h').add(30, 'minute').format('YYYY-MM-DD HH:mm'), // description: 'Annual 10-kilometer run in Boulder, Colorado', // url: e.url, @@ -83,7 +83,7 @@ const server = serve({ // ] })); const data: string = await new Promise(resolve => ics.createEvents(configs, { - calName: clubInfo?.name ? `${clubInfo.name}的比赛` : '', + calName: clubInfo?.name ? `${clubInfo.name}` : '', }, (err, data) => { if (err) { console.log(err);