mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-26 01:33:02 +00:00
refactor(theme): fix duplicate page metadata usage (#7777)
This commit is contained in:
parent
c48f33800c
commit
9788944df4
|
|
@ -40,37 +40,28 @@ function DocCategoryGeneratedIndexPageContent({
|
|||
}: Props): JSX.Element {
|
||||
const category = useCurrentSidebarCategory();
|
||||
return (
|
||||
<>
|
||||
<PageMetadata
|
||||
title={categoryGeneratedIndex.title}
|
||||
description={categoryGeneratedIndex.description}
|
||||
keywords={categoryGeneratedIndex.keywords}
|
||||
// TODO `require` this?
|
||||
image={useBaseUrl(categoryGeneratedIndex.image)}
|
||||
/>
|
||||
<div className={styles.generatedIndexPage}>
|
||||
<DocVersionBanner />
|
||||
<DocBreadcrumbs />
|
||||
<DocVersionBadge />
|
||||
<header>
|
||||
<Heading as="h1" className={styles.title}>
|
||||
{categoryGeneratedIndex.title}
|
||||
</Heading>
|
||||
{categoryGeneratedIndex.description && (
|
||||
<p>{categoryGeneratedIndex.description}</p>
|
||||
)}
|
||||
</header>
|
||||
<article className="margin-top--lg">
|
||||
<DocCardList items={category.items} className={styles.list} />
|
||||
</article>
|
||||
<footer className="margin-top--lg">
|
||||
<DocPaginator
|
||||
previous={categoryGeneratedIndex.navigation.previous}
|
||||
next={categoryGeneratedIndex.navigation.next}
|
||||
/>
|
||||
</footer>
|
||||
</div>
|
||||
</>
|
||||
<div className={styles.generatedIndexPage}>
|
||||
<DocVersionBanner />
|
||||
<DocBreadcrumbs />
|
||||
<DocVersionBadge />
|
||||
<header>
|
||||
<Heading as="h1" className={styles.title}>
|
||||
{categoryGeneratedIndex.title}
|
||||
</Heading>
|
||||
{categoryGeneratedIndex.description && (
|
||||
<p>{categoryGeneratedIndex.description}</p>
|
||||
)}
|
||||
</header>
|
||||
<article className="margin-top--lg">
|
||||
<DocCardList items={category.items} className={styles.list} />
|
||||
</article>
|
||||
<footer className="margin-top--lg">
|
||||
<DocPaginator
|
||||
previous={categoryGeneratedIndex.navigation.previous}
|
||||
next={categoryGeneratedIndex.navigation.next}
|
||||
/>
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue