Use when auditing paginated content (blog archives, product category pages, search results). Applies to any site with lists or grids of content split across mul
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-pagination-715dd749a098 ,按照其中的说明把「pagination」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
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.
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.
Update canonical tags so each paginated page self-references. For /category?page=2, set . 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.
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.
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/en/rules/seo/pagination