我试着在linkedin上发布我的作品集的链接,但它总是显示“使用react app创建的网站”作为描述,这绝对不会让它看起来很专业。它部署在我的域上,但是有没有办法在我的域链接上摆脱所有create-react-app默认的东西呢?
发布于 2020-09-17 05:50:00
更改公共文件夹中index.html文件的描述和标题,然后重新构建应用程序
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link href="https://fonts.googleapis.com/css?family=Muli:300,400,600,700" rel="stylesheet">
<title>React App</title>
发布于 2021-02-16 12:58:38
嗨,我最近在今晚遇到了这个问题。
你需要将这些元标签添加到你的index.html的标题中,图像大小也应该是最小的1200x627 (根据linkedin的documentation)
<head>
<meta property="og:title" content="*TITLE*" />
<meta property="og:image" content="%PUBLIC_URL%/linkedin.png" />
<meta property="og:description" content="*DESCRIPTION*" />
</head>
如果LinkedIn在识别新的头文件时仍然有问题,请再次插入url,但在url的末尾添加一个随机参数。
因此,如果您的站点url是:https://www.example.com
尝试使用空参数重新添加链接:https://www.example.com?1
这应该会迫使linkedin提取新的头部数据。
发布于 2020-09-17 05:53:06
您需要更改公用文件夹中的index.htm文件,标题和元标记将包含此默认标题。
https://stackoverflow.com/questions/63927882
复制相似问题