Skip to content

🎥 Make videos programmatically with React

fix nested helmet

Jonny Burger3a25867ee5d1
diff --git a/packages/docs/src/components/Seo.tsx b/packages/docs/src/components/Seo.tsx
index ef20498f79..b81dbcb8be 100644
--- a/packages/docs/src/components/Seo.tsx
+++ b/packages/docs/src/components/Seo.tsx
@@ -1,27 +1,24 @@
-import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import React from "react";
export const Seo = {
- Title: ({ children }: { children: string }) => {
+ renderTitle: (title: string) => {
return (
<>
- <title>{children}</title>
- <meta property="og:title" content={children} />
+ <title>{title}</title>
+ <meta property="og:title" content={title} />
</>
);
},
- Description: ({ children }: { children: string }) => {
+ renderDescription: (title: string) => {
return (
<>
- <meta name="description" content={children} />
- <meta property="og:description" content={children} />
+ <meta name="description" content={title} />
+ <meta property="og:description" content={title} />
</>
);
},
- Image: ({ children }: { children: string }) => {
- const context = useDocusaurusContext();
-
- const imgSrc = new URL(children, context.siteConfig.url).href;
+ renderImage: (title: string, domain: string) => {
+ const imgSrc = new URL(title, domain).href;
return (
<>
diff --git a/packages/docs/src/pages/experts/index.tsx b/packages/docs/src/pages/experts/index.tsx
index 93762c1181..ab20d653c7 100644
--- a/packages/docs/src/pages/experts/index.tsx
+++ b/packages/docs/src/pages/experts/index.tsx
@@ -1,5 +1,6 @@
import Head from "@docusaurus/Head";
import Link from "@docusaurus/Link";
+import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import Layout from "@theme/Layout";
import React, { useMemo } from "react";
import { random } from "remotion";
@@ -45,15 +46,19 @@ const Experts: React.FC = () => {
);
}, []);
+ const context = useDocusaurusContext();
+
return (
<Layout>
<Head>
- <Seo.Title>Remotion experts | Hire Remotion freelancers</Seo.Title>
- <Seo.Description>
- Find Remotion freelancers and hire them to create, progress or unblock
- your Remotion project.
- </Seo.Description>
- <Seo.Image>{"/img/remotion-experts-og-image.png"}</Seo.Image>
+ {Seo.renderTitle("Remotion experts | Hire Remotion freelancers")}
+ {Seo.renderDescription(
+ "Find Remotion freelancers and hire them to create, progress or unblock your Remotion project."
+ )}
+ {Seo.renderImage(
+ "/img/remotion-experts-og-image.png",
+ context.siteConfig.url
+ )}
</Head>
<div className={styles.container}>
<div className={styles.background} />