两年来编辑随意加 tag(「看起来有用!」)——你有 800 个 tag。600 个只有 1-2 篇文章。每个 tag 生成一个归档页——现在 600 个归档页各只列一篇文章——Google 看到站点充满重复薄内容。crawl budget 烧在这些上而不是文章上。
tag 作 metadata 没问题——tag 作公开页需要最少文章阈值,否则成薄内容工厂。修法:设阈值(≥5 篇)、合并近义词、低于阈值 noindex、加编辑治理让 tag 增殖不再发生。
常见原因
按命中率从高到低:
1. 无 tag 治理——任何人都能加
CMS 让任何作者在 frontmatter 输新 tag——两个作者同周写出 ai-coding、ai-programming、code-with-ai——一个概念三个 tag。
如何判断:tag 列表有明显近义词。grep -h "^tags:" *.mdx | tr ',' '\n' | sort | uniq -c | sort -nr 看冗余变体。
2. 没”何时 tag 成公开页”的阈值
每个 tag 不管文章数都成公开页——用了一次的 tag = 一页带一篇文章——页面比它列的文章还薄。
如何判断:爬一遍发现很多 tag 页 <10 词独有内容——tag-page 模板没加文章本身没有的。
3. 没合并 / 清理流程
tag 积累——没东西修剪——两年后一半休眠或近义词,但每个还生成页。
如何判断:你 tag registry 或 tag 规范化脚本的 git log——「12+ 月没编辑」= 无清理流程。
4. tag 同时当 topic、sub-topic、keyword
ai、ai-coding、claude-code-tutorials、setting-up-claude、claude-setup——某种意义都有效但重叠——每个独立 tag 页。
如何判断:挑个 tag——看和它分享文章的有几个其他 tag——重叠高 = 无明确差异化。
5. 自动生成的 tag 页 0 编辑内容
tag 页只「标签为 X 的文章」+ 列表——无 intro、无 curation、无编辑点评——空模板 + 1 篇 = 薄。
如何判断:看 tag 页源码——一切自动生成且文章数 ≤2 = 薄。
6. tag URL 因大小写 / 格式变化增殖
/tag/AI、/tag/ai、/tag/AI-coding、/tag/ai-coding——case-sensitive 路由或不一致规范化造重复 tag 页。
如何判断:爬一遍找仅大小写不同的 tag URL——规范化坏了。
最短修复路径
按收益从高到低。Step 1 审计,2-4 减少。
Step 1:审 tag 分布
# 每 tag 文章数
grep -h "^tags:" src/content/articles/en/**/*.mdx \
| tr ',' '\n' \
| sed 's/^[" ]*//;s/["]*$//' \
| sort | uniq -c | sort -nr
输出:tag → 文章数。<5 的是低阈值候选。
Step 2:设公开页阈值
tag 页生成器:
// src/pages/tag/[slug].astro
export async function getStaticPaths() {
const articles = await getCollection("articles");
const tagCounts = countTags(articles);
return Object.entries(tagCounts)
.filter(([_, count]) => count >= 5) // 只 ≥5 篇的 tag
.map(([slug, _]) => ({ params: { slug }, props: { /* ... */ } }));
}
低于阈值的 tag 还在文章 metadata 里,但不生成公开页。
Step 3:合并近义词
ai-coding → 合并:ai-programming、code-with-ai、ai-code
claude-setup → 合并:setting-up-claude、claude-installation
每个合并:
1. 选 canonical tag(用得最多、名字最清晰)
2. 更新所有文章 frontmatter 用 canonical
3. 旧 tag URL 301 到 canonical tag URL
4. 验证 canonical tag 页现在有合并后的文章
Step 4:现有薄 tag 页 noindex
低于阈值但已索引的 tag 页:
<!-- tag 页模板、articleCount < 5 时 -->
<meta name="robots" content="noindex, follow" />
follow 让 Google 还能爬到列的文章。
或从生成器移除了就 410 tag URL。
Step 5:加 tag 治理
repo 里建 curated tag 列表:
// src/lib/allowed-tags.ts
export const ALLOWED_TAGS = [
"ai", "ai-coding", "claude", "claude-code", "chatgpt", "cursor",
"openai-api", "anthropic-api", "prompt-engineering",
// ... 共 ~50 个
] as const;
CI check:拒绝引入 ALLOWED_TAGS 外 tag 的 PR——强制”新 tag 是否需要”的对话。
Step 6:等重爬 + 衡量
# 4-8 周后:
# - Search Console:已索引 tag 页数应该降
# - 「Crawled - not indexed」数应该降(之前是薄 tag 页)
# - crawl budget 收回 → 看新文章 index 时间
预防建议
- 代码里维护 curated
ALLOWED_TAGS——新 tag 要 code review - 公开 tag 页最少文章阈值(如 ≥5)——其余只 metadata
- schema 层规范化 tag 格式(小写、kebab-case)
- 季度审近义词合并
- 高价值 tag(≥10 篇),把 tag 页当 hub 文章对待,加编辑 intro
- 50 个 curated tag + 强 tag 页 胜过 800 个 tag + 薄页