mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 01:09:20 +02:00
fix(v2): keywords frontmatter should work properly (#1840)
* fix(v2): keywords frontmatter should work properly * nits * nits again
This commit is contained in:
parent
bdb129252c
commit
c630e1aab9
6 changed files with 19 additions and 6 deletions
|
@ -42,6 +42,7 @@ function DocItem(props) {
|
|||
editUrl,
|
||||
lastUpdatedAt,
|
||||
lastUpdatedBy,
|
||||
keywords,
|
||||
} = metadata;
|
||||
|
||||
return (
|
||||
|
@ -68,6 +69,9 @@ function DocItem(props) {
|
|||
<meta name="twitter:image:alt" content={`Image for ${title}`} />
|
||||
)}
|
||||
{permalink && <meta property="og:url" content={siteUrl + permalink} />}
|
||||
{keywords && keywords.length && (
|
||||
<meta property="keywords" content={keywords.join(',')} />
|
||||
)}
|
||||
</Head>
|
||||
<div className="padding-vert--lg">
|
||||
<div className="container">
|
||||
|
|
|
@ -48,7 +48,7 @@ function Layout(props) {
|
|||
<meta property="og:description" content={description} />
|
||||
)}
|
||||
{keywords && keywords.length && (
|
||||
<meta property="keywords" content={keywords} />
|
||||
<meta property="keywords" content={keywords.join(',')} />
|
||||
)}
|
||||
{metaImage && (
|
||||
<meta
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue