feat(v2): @docusaurus/init package (#1655)

* feat(v2): separate v2 docusaurus/init package

* nits

* docs

* rm unwanted

* readme
This commit is contained in:
Endi 2019-07-14 01:06:23 +07:00 committed by GitHub
parent 22ce04d3fb
commit d61cc01217
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 217 additions and 7957 deletions

View file

@ -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}`} />
)}