跳到正文
Skillpedia
社交媒体75k · #2960

og-tags

它能做什么

这个技能检查页面 head 部分中的社交分享标签,并补上缺失的标签。它面向希望分享链接看起来清晰、吸引人的网站所有者。

适用场景

  • ✓你请智能体检查页面是否有正确社交分享标签的时候。
  • ✓社交平台上分享的链接显示的是猜测的标题或错误的图片的时候。
  • ✓你发布新页面,并希望它带有完整标签、可以直接分享的时候。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请帮我检查页面的社交分享标签,并补上缺失的标签吗?”

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

工作原理

智能体会在页面 head 中查找 og:title、og:description、og:image、og:url 和 og:type。它会用非空的值补上缺失的标签,并为图片和网址使用绝对的 HTTPS 地址。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Open Graph Tags

Open Graph tags control how your pages appear when shared on Facebook, LinkedIn, Slack, and other platforms—missing or incorrect tags result in unappealing link previews that reduce click-through rates.

Quick Reference

  • Include og:title, og:description, og:image, and og:url on every page
  • Use absolute URLs for og:image and og:url
  • og:image should be at least 1200×630 px for optimal display
  • og:type defaults to 'website' if omitted, but setting it explicitly is best practice

Check

Check the <head> for Open Graph meta tags: og:title, og:description, og:image, og:url, and og:type. Verify all values are non-empty and og:image/og:url use absolute HTTPS URLs.

Fix

Add the four required Open Graph meta tags to the <head>: og:title (≤95 chars), og:description (≤200 chars), og:image (absolute HTTPS URL, 1200×630), og:url (canonical absolute URL). Add og:type='website' for standard pages.

Explain

Open Graph tags control how this page is displayed when shared on social platforms like Facebook, LinkedIn, and Slack. Without them, platforms fall back to guessing the title, description, and image, often with poor results.

Code Review

Check the rendered <head> for all five core OG properties: og:title, og:description, og:image, og:url, og:type. Verify og:image and og:url values start with 'https://'. Flag any empty content attributes. Compare og:url against the canonical tag — they must match exactly.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/seo/og-tags

常见问题

哪些标签是必需的?

这个技能把 og:title、og:description、og:image 和 og:url 列为每个页面的核心标签,并建议同时添加 og:type。

为什么网址必须是绝对地址?

社交平台需要完整地址,才能可靠地抓取图片和页面。

没有这些标签会怎样?

平台会自行猜测标题、描述和图片,结果往往不理想。

详情

作者的原始描述

Use when auditing a web page's social sharing metadata. Applies to any page users might share on social networks or messaging apps.

repo: thedaviddias/Front-End-Checklist

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能