简体   繁体   English

如何从链接中删除“使用 create-react-app 创建”?

[英]How to delete "created using create-react-app" from links?

I am trying to post the link to my portfolio onto linkedin and it always shows up with "Web site created using react app" as the description, which definitely doesn't make it look professional.我试图将我的投资组合的链接发布到linkedin,它总是显示“使用react app创建的网站”作为描述,这绝对不会让它看起来很专业。 It is deployed on my domain but is there any way I can get rid of all the create-react-app default stuff on my domain link?它部署在我的域中,但有什么方法可以摆脱域链接上的所有 create-react-app 默认内容?

change the description and the title from your index.html file in the public folder then Rebuild your app更改公共文件夹中 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>

Hi I've recently encountered this tonight.嗨,我最近今晚遇到了这个。

You'll need to add these meta tags into the header of your index.html Also the image size should be minimum 1200x627 (as per the linkedin documentation )您需要将这些元标记添加到 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>

If you're still having issues with LinkedIn recognising the new headers insert the url again but with a random parameter at the end of the url.如果您在 LinkedIn 识别新标题时仍然遇到问题,请再次插入 url,但在 url 末尾添加一个随机参数。

So if your site url is: https://www.example.com因此,如果您的网站网址是: https : //www.example.com

Try adding the link again with the empty parameter: https://www.example.com?1尝试使用空参数再次添加链接: https : //www.example.com?1

This should force linkedin to pull the new head data.这应该会强制linkedin 拉出新的头部数据。

您需要更改公共文件夹中的 index.htm 文件,标题和元标记将包含此默认标题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何为使用 create-react-app 创建的 react 项目更新 webpack 配置? - How to update webpack config for a react project created using create-react-app? 如何使用 react-google-maps 为使用 create-react-app 创建的 React 应用程序添加 Google Maps API 密钥? - How to add the Google Maps API key for a React app created with create-react-app using react-google-maps? 将使用 create-react-app 创建的 React 应用程序集成到外部应用程序中 - Integrate React app created with create-react-app into an external application 如何在 React 应用程序中更改 static 资产的缓存策略(使用 create-react-app 创建) - How to change cache polilcy for static assets in React app (created with create-react-app) 使用 create-react-app 创建库 - Using create-react-app to create a library 使用 create-react-app 创建的 React 应用程序无故增加模块范围的变量 - React application created using create-react-app increments module-scoped variable without reason 如何使用 index.php 而不是 index.html 在 XAMP 上运行由 create-react-app 创建的 ReactApp? - How to run ReactApp created by create-react-app on XAMP using index.php rather than index.html? 如何在服务器上运行reactjs(使用create-react-app) - How to run reactjs (using create-react-app) on a server 如何将 JSON 数据中的图像导入 create-react-app - How to import images from JSON data into create-react-app 如何从服务器正确提供 create-react-app 索引? - How to properly serve the create-react-app index from the server?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM