mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-08 22:03:01 +02:00
feat(v2): better twitter preview meta tag (#1676)
* fix(v2): remove unwanted scale zoom due to initial-scale meta tag * use summary meta
This commit is contained in:
parent
52e67a1c35
commit
381dd75105
3 changed files with 3 additions and 6 deletions
|
@ -66,10 +66,7 @@ function Layout(props) {
|
||||||
<meta name="twitter:image:alt" content={`Image for ${metaTitle}`} />
|
<meta name="twitter:image:alt" content={`Image for ${metaTitle}`} />
|
||||||
)}
|
)}
|
||||||
{permalink && <meta property="og:url" content={siteUrl + permalink} />}
|
{permalink && <meta property="og:url" content={siteUrl + permalink} />}
|
||||||
<meta
|
<meta name="twitter:card" content="summary" />
|
||||||
name="twitter:card"
|
|
||||||
content={image || favicon ? 'summary_large_image' : 'summary'}
|
|
||||||
/>
|
|
||||||
</Head>
|
</Head>
|
||||||
<Navbar />
|
<Navbar />
|
||||||
{children}
|
{children}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
<meta name="viewport" content="width=device-width">
|
||||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -10,7 +10,7 @@ module.exports = `
|
||||||
<html <%= htmlAttributes %>>
|
<html <%= htmlAttributes %>>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width">
|
||||||
<%- chunkManifestScript %>
|
<%- chunkManifestScript %>
|
||||||
<% metaAttributes.forEach((metaAttribute) => { %>
|
<% metaAttributes.forEach((metaAttribute) => { %>
|
||||||
<%- metaAttribute %>
|
<%- metaAttribute %>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue