Skip to content

Commit

Permalink
fix: add canonical to document meta
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgoff committed Oct 24, 2024
1 parent 481880b commit 5528811
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/[locale]/[...uriSegments]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export async function generateMetadata(
openGraph: {
images: featuredImage || previousImages,
},
alternates: { canonical: "./" },
};
}

Expand Down
2 changes: 1 addition & 1 deletion app/[locale]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function generateMetadata({
entry: { title, description },
} = await getHomepageMetadata(locale, previewToken);

return { title, description };
return { title, description, alternates: { canonical: "./" } };
}

const RootPage: FunctionComponent<LocaleProps> = async ({
Expand Down

0 comments on commit 5528811

Please sign in to comment.