跳到正文
Skillpedia
SEO75k · #3088

website-search

它能做什么

这个技能添加结构化数据,向 Google 说明网站的搜索功能。它面向网站有内部搜索框的网站所有者。

适用场景

  • ✓网站有内部搜索框但没有相应结构化数据的时候。
  • ✓首页应有资格在 Google 中显示站内搜索框的时候。
  • ✓检查为什么品牌词搜索中没有显示搜索框的时候。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/website-search/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/website-search/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的网站有一个搜索框。请帮我告诉 Google,让它可能显示在我的品牌搜索结果中吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会在首页添加一个带有搜索动作的 WebSite JSON-LD 代码块。该动作包含搜索网址模板,并用占位符表示搜索词的位置。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

WebSite Search Schema

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.

Quick Reference

  • Add WebSite schema with SearchAction to signal that your site has search functionality to Google
  • This enables Google to show a Sitelinks Searchbox below your brand's search result for branded queries
  • The Searchbox only appears at Google's discretion — the schema is a signal, not a guarantee
  • The query-input property must follow the format required name=search_term_string

Check

Check 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.

Fix

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

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.

Code Review

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/rules/seo/website-search

常见问题

Google 会一直显示搜索框吗?

不会。这个技能说,是否显示由 Google 决定,因此标记只是一个信号,而不是保证。

搜索网址模板是什么?

它是你搜索结果页的网址,搜索词的位置用占位符表示。

query-input 应该使用什么格式?

这个技能说,它必须遵循要求的格式:required name=search_term_string。

详情

作者的原始描述

Use when applies to sites with internal site search functionality. Use when optimizing branded search result appearance or adding structured data for the first time.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#3088
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能