Commit a1d0c90
committed
fix(seo): 中身が全部 noindex の空ハブ (color/image) をインデックス対象から外す
カテゴリハブの掲載判定を「カテゴリ内の総ツール数」から
「index 対象ツール数」へ変更する。総数判定だと color(8件中0件) /
image(1件中0件) のように中身が全ツール noindex のカテゴリが
実質空のハブとして index,follow で本番配信され、sitemap にも
載っていた (2026-09-18 に本番実測: 両URL 200 / sitemap に126回出現)。
registry.ts に listIndexableByCategory() を追加し、判定を使う
4か所すべてを同じ述語に統一する:
- sitemap.ts : ハブの掲載
- generateStaticParams : ハブの生成
- siblings ナビ : 隣接ハブへの内部リンク
- Footer.tsx : 全ページのカテゴリ導線 (揃えないと 404 リンクが全ページに出る)
さらに generateMetadata に noindex を追加する。dynamicParams は
既定 true かつ output:"standalone" のため、sitemap と
generateStaticParams から外すだけでは未生成ハブがオンデマンドで
200 を返し index,follow のまま残ってしまう。
実測: 223ツール / index対象63 / ハブ 8→6 (DROP は color と image のみ)。
注意: このツリーに node_modules が無く npm run build は未実行。
各ファイルの構文検査と、tsx によるレジストリ実挙動の確認のみ済み。
Claude-Session: https://claude.ai/code/session_01ENHPNZ5ngcdrTHJ2H6oAFd1 parent b7ead2a commit a1d0c90
4 files changed
Lines changed: 32 additions & 7 deletions
File tree
- site/src
- app
- [locale]/tools/category/[cat]
- components/layout
- lib/tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
| 47 | + | |
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
| |||
78 | 85 | | |
79 | 86 | | |
80 | 87 | | |
81 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
82 | 91 | | |
83 | 92 | | |
84 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
94 | 96 | | |
95 | | - | |
| 97 | + | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | | - | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
529 | 541 | | |
530 | 542 | | |
531 | 543 | | |
| |||
0 commit comments