pagination
它能做什么
这个技能检查博客归档和分类页面等分页列表,确保每一页都指向自己的地址。它面向内容分散在许多页面中的网站所有者。
适用场景
- ✓你请智能体检查博客归档或分类页面上的规范标签的时候。
- ✓列表的第二页及之后的页面没有出现在搜索结果中的时候。
- ✓你的网站使用无限滚动或“加载更多”按钮,而你希望搜索引擎仍能访问内容的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/pagination/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的分类页面从第二页开始在 Google 中都没有显示。请帮我检查规范标签吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会找出分页网址,并检查每一页的规范标签是否指向它自己。如果某页指向第一页,而实际上并不存在真正的重复内容,它会更新该标签,并为无限滚动添加可被抓取的链接。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Use canonicals on paginated pages
Incorrect pagination canonicalization can prevent pages 2, 3, etc. from being indexed, removing valuable content from search results and breaking user journeys from search queries that match content on later pages.
Quick Reference
- Each paginated page (/page/2, /page/3) should self-canonicalize to its own URL
- Do NOT canonicalize all paginated pages to page 1 — this is a common mistake
- Google dropped support for rel=prev/next in 2019 — don't rely on it
- Use consistent URL patterns for pagination (?page=2 or /page/2, never both)
- Infinite scroll and load-more UIs still need crawlable paginated URLs or links
Check
Find paginated page sequences (URLs with ?page=, /page/, /p/, or numbered suffixes). For each page, check the canonical tag. Verify that each page self-canonicalizes (page 2 canonical-url = page 2 URL). Flag any paginated page that incorrectly points canonical-url to page 1. If the UI uses infinite scroll or "load more", verify equivalent crawlable pagination links exist.
Fix
Update canonical tags so each paginated page self-references. For /category?page=2, set <link rel='canonical' href='https://example.com/category?page=2' />. Remove any canonical pointing paginated pages to the first page unless those pages genuinely have duplicate content. Add crawlable paginated URLs or fallback links for infinite-scroll interfaces.
Explain
Pagination canonical tags tell Google which URL is the preferred version of each page. Setting all paginated pages to canonical-url to page 1 tells Google that pages 2, 3, etc. are duplicates of page 1 — so Google stops indexing them. Content that only appears on page 3 (for example) then becomes unreachable from search.
Code Review
Identify paginated URL patterns (URLs with page=, /page/, /p/ parameters). For each paginated page beyond page 1, check the canonical tag. Flag any page 2+ that has a canonical pointing to page 1 (the base URL). Verify that page 1 has a self-referencing canonical. Check that pagination URL format is consistent (no mixing of ?page= and /page/). For JS-driven infinite scroll, verify there is still a crawlable path to page 2+ via real links or paginated URLs.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/seo/pagination
常见问题
为什么把每一页都指向第一页是错误的?
这可能会让第二页及之后的页面被排除在搜索之外,导致内容丢失,并破坏通过后续页面进入网站的搜索路径。
rel prev 和 next 还有用吗?
这个技能说,Google 已于 2019 年停止支持它们,因此不应依赖。
网址格式应该统一吗?
应该。这个技能建议只使用一种格式,例如 ?page=2 或 /page/2,而不要两种都用。
详情
作者的原始描述
Use when auditing paginated content (blog archives, product category pages, search results). Applies to any site with lists or grids of content split across multiple pages.
热度
- GitHub 星标
- 75k
- 排名
- #2969
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。