diff --git a/packages/nextra-theme/src/index.tsx b/packages/nextra-theme/src/index.tsx index 6b01598dedd5..e89657f09fe0 100644 --- a/packages/nextra-theme/src/index.tsx +++ b/packages/nextra-theme/src/index.tsx @@ -134,7 +134,7 @@ export default function NextraLayout({ children, pageOpts, pageProps }: NextraTh title, images: frontMatter.socialImage ? [{ url: frontMatter.socialImage }] - : [{ url: `https://thegraph-docs-opengraph-image.the-guild.dev?title=${title}` }], + : [{ url: `https://thegraph-docs-opengraph-image.the-guild.dev?title=${encodeURI(title)}` }], }, } if (frontMatter.seo) {