Skip to content

Commit

Permalink
remove StructuredData component
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Feb 15, 2024
1 parent 20256fa commit 96073e8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
*/

import React from 'react';
import {
useBlogListPageStructuredData,
StructuredData,
} from '@docusaurus/theme-common';
import Head from '@docusaurus/Head';
import {useBlogListPageStructuredData} from '@docusaurus/theme-common';
import type {Props} from '@theme/BlogListPage/StructuredData';

export default function BlogListPageStructuredData(props: Props): JSX.Element {
const structuredData = useBlogListPageStructuredData(props);
return <StructuredData structuredData={structuredData} />;
return (
<Head>
<script type="application/ld+json">
{JSON.stringify(structuredData)}
</script>
</Head>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@
*/

import React from 'react';
import {
useBlogPostStructuredData,
StructuredData,
} from '@docusaurus/theme-common';
import Head from '@docusaurus/Head';
import {useBlogPostStructuredData} from '@docusaurus/theme-common';

export default function BlogPostStructuredData(): JSX.Element {
const structuredData = useBlogPostStructuredData();
return <StructuredData structuredData={structuredData} />;
return (
<Head>
<script type="application/ld+json">
{JSON.stringify(structuredData)}
</script>
</Head>
);
}

This file was deleted.

2 changes: 0 additions & 2 deletions packages/docusaurus-theme-common/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ export {

export {default as ThemedComponent} from './components/ThemedComponent';

export {default as StructuredData} from './components/StructuredData';

export {
createStorageSlot,
useStorageSlot,
Expand Down

0 comments on commit 96073e8

Please sign in to comment.