We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 885d019 commit a661ca9Copy full SHA for a661ca9
src/components/docs-layout.jsx
@@ -42,13 +42,8 @@ export default function DocumentPage({
42
query: { slug = [] },
43
} = useRouter();
44
45
- // Build the path from slug
46
- const canonicalPath =
47
- Array.isArray(slug) && slug.length > 0
48
- ? `/docs/${slug.join("/")}/`
49
- : "/docs/";
50
-
51
- const canonicalUrl = `${canonicalPath}`;
+ // Build the canonical path from slug
+ const canonicalUrl = ["/docs", ...slug].join("/") + "/";
52
53
return (
54
<>
0 commit comments