gpt4 book ai didi

html - 自定义github页面的预览图像

转载 作者:行者123 更新时间:2023-12-03 16:16:26 25 4
gpt4 key购买 nike

将链接发布到github页面时,是否可以自定义显示为预览的图像?
我觉得他们特别解决了github存储库here的问题,但我不知道如何为github页面执行此操作。具体来说,当我的github页面显示在LinkedIn的“我的特色”部分时,我不希望我的github页面仅显示不显示任何内容的灰度图像:
enter image description here

最佳答案

该预览图取自meta tags网站。专用于LinkedIn足以使用:

<meta property="og:image" content="preview_image.jpg" />
来自 my LinkedIn的示例:
enter image description here
前两个特色项目是我的 personal website页面,每个页面都有单独的meta标签。它托管在GitHub Pages上,但托管位置无关紧要。这是可以完成的方法:
<head>
{/* all socials */}
<meta property="og:image" content={previewImageSrc} />
{/* twitter */}
<meta name="twitter:image" content={previewImageSrc} />
</head>

full example (gatsby + react-helmet)

关于html - 自定义github页面的预览图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62743304/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com