我试图将指向我的投资组合的链接发布到linkedin,它总是显示“使用react app创建的网站”作为描述,这绝对不会让它看起来很专业。它部署在我的域中,但有什么方法可以摆脱域链接上的所有 create-react-app 默认内容?
如何从链接中删除“使用 create-react-app 创建”?
IT技术
javascript
reactjs
react-native
create-react-app
2021-05-25 13:20:05
3个回答
更改公共文件夹中 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>
嗨,我最近今晚遇到了这个。
您需要将这些元标记添加到 index.html 的标题中,并且图像大小应至少为 1200x627(根据linkedin文档)
<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 末尾添加一个随机参数。
因此,如果您的网站网址是:https : //www.example.com
尝试使用空参数再次添加链接:https : //www.example.com?1
这应该会强制linkedin 拉出新的头部数据。
您需要更改公共文件夹中的 index.htm 文件,标题和元标记将包含此默认标题。