mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 09:19:16 +02:00
fix(v2): make correct Open Graph title for doc page (#2475)
This commit is contained in:
parent
92f2c52034
commit
cffb3f9af5
1 changed files with 3 additions and 5 deletions
|
@ -76,6 +76,7 @@ function DocItem(props) {
|
|||
},
|
||||
} = DocContent;
|
||||
|
||||
const metaTitle = title ? `${title} | ${siteTitle}` : siteTitle;
|
||||
let metaImageUrl = siteUrl + useBaseUrl(metaImage);
|
||||
if (!isInternalUrl(metaImage)) {
|
||||
metaImageUrl = metaImage;
|
||||
|
@ -84,11 +85,8 @@ function DocItem(props) {
|
|||
return (
|
||||
<>
|
||||
<Head>
|
||||
{title && (
|
||||
<title>
|
||||
{title} | {siteTitle}
|
||||
</title>
|
||||
)}
|
||||
<title>{metaTitle}</title>
|
||||
<meta property="og:title" content={metaTitle} />
|
||||
{description && <meta name="description" content={description} />}
|
||||
{description && (
|
||||
<meta property="og:description" content={description} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue