Show链接预览。我希望我的链接包含图像,标题描述等

问题描述 投票:0回答:2
我希望它显示我的网站的预览(在Discord上):

https://i.sstatic.net/7vcxn.png

我应该添加什么?也许是元数据? 谢谢!

iT出现堆栈溢出通过以下
html meta-tags
2个回答
4
投票
标签完成了它:

<meta property="og:type" content="website">
<meta property="og:url" content="https://stackoverflow.com/">
<meta property="og:site_name" content="Stack Overflow">
<meta property="og:image" itemprop="image primaryImageOfPage" content="https://cdn.sstatic.net/Sites/stackoverflow/Img/[email protected]?v=73d79a89bded">
<meta name="description" content="Stack Overflow is the largest, most trusted online community for developers to learn, share​ ​their programming ​knowledge, and build their careers.">

og:
象征标签是

op graph

协议的一部分
    
the the the with th带有meta

属性是负责与搜索引擎搜索结果有关的此类SEO信息的标签。

1
投票
description

tag

<head></head>

Edit:

对于搜索结果预览(添加图像

),可以使用这些元标记
<meta name="description" content="A description of the page" />

注意,由于使用的协议或<meta property="og:image" content="https://example.com/ogp.jpg" /> <meta property="og:image:secure_url" content="https://secure.example.com/ogp.jpg" /> <meta property="og:image:type" content="image/jpeg" /> <meta property="og:image:width" content="400" /> <meta property="og:image:height" content="300" /> <meta property="og:image:alt" content="A shiny red apple with a bite taken out" />

不使用适当的标签,因此问题可能正在发生。

有关OPEN图协议的更多信息,请访问 这个链接

希望这对
    

© www.soinside.com 2019 - 2025. All rights reserved.