From 3a8a15a824ef55aaa3cc7e2d87fab70f7b10a3c3 Mon Sep 17 00:00:00 2001 From: ma91n Date: Fri, 30 Oct 2026 18:10:23 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E3=83=A9=E3=83=B3=E3=82=AD=E3=83=B3?= =?UTF-8?q?=E3=82=B0=E3=81=AE=20NEW=20=E3=81=AE=E7=AA=93=E3=82=9230?= =?UTF-8?q?=E6=97=A5=E3=81=8B=E3=82=8914=E6=97=A5=E3=81=AB=E7=B5=9E?= =?UTF-8?q?=E3=82=8B=20(#3408)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit トレンドは直近30日の PV で並ぶので、NEW の窓が30日だと集計期間と重なり、 行の半分以上に付いて新顔と定番が見分けられない。窓は NEW_DAYS の1箇所が持つ。 Tech Cast のコメントにあった記事の NEW との日数比較は成り立たなくなるので外した。 Co-Authored-By: Claude Opus 5.5 --- scripts/lib/post_list.js | 13 ++++++++----- scripts/techcast_latest.js | 2 -- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/lib/post_list.js b/scripts/lib/post_list.js index cf69b1a37c16..e1c1e14f3640 100644 --- a/scripts/lib/post_list.js +++ b/scripts/lib/post_list.js @@ -2,18 +2,21 @@ const { getSNSCnt } = require('./sns'); -// 公開から30日以内かどうか。 -// // **NEW を出すのはランキングだけ**(呼び出し側が withNew で渡す、#2788)。 // 関連記事は関連度順、参照している記事は張られたリンクの記録で、どちらも // 新しさが並びの理由ではない。実測では参照している記事の92%が NEW // (12ページ中10ページが全行 NEW)で、しかも並びが日付降順なので二重だった。 // 関連記事は逆に全期間で0.5%しか出ず、出るのは同じ連載の同時期の記事。 // ランキングは PV 順で新しさと無関係なので、「まだ読んでいないかもしれない -// 新顔」の合図として働く(74行中14行) +// 新顔」の合図として働く +// +// 窓はトレンドの集計期間より短くする。同じ長さだとトレンドの +// 行の半分に付き、新顔と定番が見分けられない (#3408) +const NEW_DAYS = 14; + const isRecent = (date) => { const threshold = new Date(); - threshold.setDate(threshold.getDate() - 30); + threshold.setDate(threshold.getDate() - NEW_DAYS); return threshold.toISOString() <= date.toISOString(); }; @@ -30,7 +33,7 @@ const isRecent = (date) => { * @param {string} [opts.titleAttr] a の title 属性。省略時は lede * @param {boolean} [opts.withThumb] タイトルの左に小さいサムネを添える (#2230) * @param {{html: string, className: string}} [opts.rankMark] 行頭に出す順位の丸 (#2249) - * @param {boolean} [opts.withNew] 公開30日以内なら NEW を出す (#2788) + * @param {boolean} [opts.withNew] 公開から NEW_DAYS 日以内なら NEW を出す (#2788) */ const postListItem = ( ctx, diff --git a/scripts/techcast_latest.js b/scripts/techcast_latest.js index 90d820717713..8af6b195b129 100644 --- a/scripts/techcast_latest.js +++ b/scripts/techcast_latest.js @@ -29,8 +29,6 @@ let feedItems = []; }); })(); -// 公開から15日以内を新着として扱う。記事一覧の NEW(scripts/lib/post_list.js)が -// 30日なのに対して短いのは、こちらが「今週出た回」の合図で、記事の新顔とは役が違うため function isNewEpisode(isoDate) { const threshold = new Date(); threshold.setDate(threshold.getDate() - 15); From dd78df8ae47f15ff25d70df04e218dcab7d98979 Mon Sep 17 00:00:00 2001 From: ma91n Date: Fri, 30 Oct 2026 18:11:52 +0900 Subject: [PATCH 2/2] =?UTF-8?q?Tech=20Cast=20=E3=81=AE=E6=96=B0=E7=9D=80?= =?UTF-8?q?=E3=81=AE=E7=AA=93=E3=81=AB=E7=90=86=E7=94=B1=E3=82=921?= =?UTF-8?q?=E8=A1=8C=E3=81=A7=E6=88=BB=E3=81=99=20(#3408)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 記事の NEW との比較を外したときに 15日の理由まで消えていたので、「今週出た回」の合図であることだけを書く。 Co-Authored-By: Claude Opus 5.5 --- scripts/techcast_latest.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/techcast_latest.js b/scripts/techcast_latest.js index 8af6b195b129..343b388c15d5 100644 --- a/scripts/techcast_latest.js +++ b/scripts/techcast_latest.js @@ -29,6 +29,7 @@ let feedItems = []; }); })(); +// 公開から15日以内を新着として扱う。「今週出た回」の合図 function isNewEpisode(isoDate) { const threshold = new Date(); threshold.setDate(threshold.getDate() - 15);