mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-07 21:32:38 +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}`} />
|
||||
)}
|
||||
{permalink && <meta property="og:url" content={siteUrl + permalink} />}
|
||||
<meta
|
||||
name="twitter:card"
|
||||
content={image || favicon ? 'summary_large_image' : 'summary'}
|
||||
/>
|
||||
<meta name="twitter:card" content="summary" />
|
||||
</Head>
|
||||
<Navbar />
|
||||
{children}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<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>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -10,7 +10,7 @@ module.exports = `
|
|||
<html <%= htmlAttributes %>>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<%- chunkManifestScript %>
|
||||
<% metaAttributes.forEach((metaAttribute) => { %>
|
||||
<%- metaAttribute %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue