We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f66744e + c49bbf8 commit 986da22Copy full SHA for 986da22
1 file changed
src/theme/DocItem/Metadata/index.tsx
@@ -28,14 +28,10 @@ export default function MetadataWrapper(props: Props): ReactNode {
28
29
// Strip trailing slash from base URL to avoid double slashes
30
const baseUrl = (siteConfig.url as string).replace(/\/$/, "");
31
- let canonicalUrl = isDocumentationPage
+ const canonicalUrl = isDocumentationPage
32
? `${baseUrl}/${siteConfig.customFields.latestVersion}${metadata.slug}`
33
: `${baseUrl}${permalink}`;
34
35
- if (!canonicalUrl.endsWith("/")) {
36
- canonicalUrl = canonicalUrl.concat("/");
37
- }
38
-
39
const isHomepage = metadata.slug === "/";
40
const description = metadata.description || frontMatter.description || "";
41
const title = metadata.title || "";
0 commit comments