Flutter Web元标记

pxy2qtax  于 2023-05-19  发布在  Flutter
关注(0)|答案(1)|浏览(217)

我用Flutter创建了一个Web应用程序。我在index.html文件中添加了一些元数据标签,它出现在我的浏览器检查中,但当在电报或等中发送URL时,它不显示我的网站的标题和描述。
我的index.html头标记:

<head>
<base href="$FLUTTER_BASE_HREF">

<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">

<title>Title</title>
<meta name="description" content="Description of site">

<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://some-url/">
<meta property="og:type" content="website">
<meta property="og:title" content="Title">
<meta property="og:description" content="Description of site">
<meta property="og:image" content="./favicon.png">

<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="">
<meta property="twitter:url" content="https://some-url/">
<meta name="twitter:title" content="Title">
<meta name="twitter:description" content="Description of site">
<meta name="twitter:image" content="./favicon.png">

<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon" href="./fav.svg">

<!-- Favicon -->
<link rel="apple-touch-icon" sizes="57x57" href="./fav.svg">
<link rel="apple-touch-icon" sizes="60x60" href="./fav.svg">
<link rel="apple-touch-icon" sizes="72x72" href="./fav.svg">
<link rel="apple-touch-icon" sizes="76x76" href="./fav.svg">
<link rel="apple-touch-icon" sizes="114x114" href="./fav.svg">
<link rel="apple-touch-icon" sizes="120x120" href="./fav.svg">
<link rel="apple-touch-icon" sizes="144x144" href="./fav.svg">
<link rel="apple-touch-icon" sizes="152x152" href="./fav.svg">
<link rel="apple-touch-icon" sizes="180x180" href="./fav.svg">
<link rel="icon" type="image/png" sizes="192x192" href="./fav.svg">
<link rel="icon" type="image/png" sizes="32x32" href="./fav.svg">
<link rel="icon" type="image/png" sizes="96x96" href="./fav.svg">
<link rel="icon" type="image/png" sizes="16x16" href="./fav.svg">
<link rel="manifest" href="./manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="./fav.svg">
<meta name="theme-color" content="#ffffff">
<link rel="manifest" href="./manifest.json">
<link rel="stylesheet" type="text/css" href="styles.css">
</head>

同样,当输入我的URL Here时,它什么也不显示:

如何显示标题和描述扑网页?

3zwtqj6y

3zwtqj6y1#

这是否有助于:

<html prefix="og: https://ogp.me/ns#">
  <head>

  <!-- and so on -->

  </head>
</html

然后打开网页Telegram Bot并粘贴URL以获取新的预览:
https://botostore.com/c/webpagebot/

@WebpageBot

相关问题