Use when applies to sites with internal site search functionality. Use when optimizing branded search result appearance or adding structured data for the first
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-website-search-6532a9e26310 ,按照其中的说明把「website-search」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
The Sitelinks Searchbox lets users search your site directly from Google's search results page, reducing friction for brand-aware users and increasing the click-through quality from branded queries.
WebSite schema with SearchAction to signal that your site has search functionality to Googlequery-input property must follow the format required name=search_term_stringCheck the homepage (or primary entry URL) for a <script type='application/ld+json'> block with "@type": "WebSite" and a potentialAction of type SearchAction. Verify target is a valid search URL template and query-input is correctly set.
Add WebSite JSON-LD schema to the homepage <head>. Set url to the canonical-url homepage URL. Set potentialAction with SearchAction, target pointing to your search results URL with {search_term_string} placeholder, and query-input as required name=search_term_string.
Explain how the WebSite SearchAction schema works, what the Sitelinks Searchbox is, why Google may choose not to show it even with valid schema, and how to construct the search URL template.
Review metadata generation, rendered HTML, structured data, and response headers related to WebSite Search Schema. Flag exact routes or templates where search-facing output violates the rule, and describe how to verify the final page output.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/en/rules/seo/website-search