Skip to content

Commit a4d0408

Browse files
committed
docs: Encode URI component for og image
1 parent 71b9b8a commit a4d0408

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/theme.config.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ export default {
103103
const pageConfig = useConfig();
104104
const {route} = useRouter();
105105
const isDefault = route === '/' || !pageConfig.title;
106-
const image = `/api/og?title=${
106+
const image = `/api/og?title=${encodeURIComponent(
107107
isDefault ? config.description : pageConfig.title
108-
}`;
108+
)}`;
109109

110110
const description =
111111
pageConfig.frontMatter.description ||

0 commit comments

Comments
 (0)