mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-29 06:29:03 +02:00
feat(v2): @docusaurus/init package (#1655)
* feat(v2): separate v2 docusaurus/init package * nits * docs * rm unwanted * readme
This commit is contained in:
parent
22ce04d3fb
commit
d61cc01217
36 changed files with 217 additions and 7957 deletions
|
@ -33,7 +33,7 @@ function Layout(props) {
|
|||
permalink,
|
||||
} = props;
|
||||
const metaTitle = title || `${defaultTitle} · ${tagline}`;
|
||||
const metaImage = `${siteUrl}${withBaseUrl(image || defaultImage)}`;
|
||||
const metaImage = image || defaultImage;
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Head>
|
||||
|
@ -50,8 +50,18 @@ function Layout(props) {
|
|||
{keywords && keywords.length && (
|
||||
<meta property="keywords" content={keywords} />
|
||||
)}
|
||||
{metaImage && <meta property="og:image" content={metaImage} />}
|
||||
{metaImage && <meta property="twitter:image" content={metaImage} />}
|
||||
{metaImage && (
|
||||
<meta
|
||||
property="og:image"
|
||||
content={siteUrl + withBaseUrl(metaImage)}
|
||||
/>
|
||||
)}
|
||||
{metaImage && (
|
||||
<meta
|
||||
property="twitter:image"
|
||||
content={siteUrl + withBaseUrl(metaImage)}
|
||||
/>
|
||||
)}
|
||||
{metaImage && (
|
||||
<meta name="twitter:image:alt" content={`Image for ${metaTitle}`} />
|
||||
)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue