Skip to content

Commit

Permalink
fix cloaking issue
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-tey committed Jan 13, 2025
1 parent 0c94cb0 commit 5a458af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/web/app/cloaked/[url]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export async function generateMetadata({
const apexDomain = getApexDomain(url);

return constructMetadata({
title: metatags.title,
fullTitle: metatags.title,
description: metatags.description,
image: metatags.image,
icons: `${GOOGLE_FAVICON_URL}${apexDomain}`,
Expand Down
10 changes: 7 additions & 3 deletions packages/utils/src/functions/construct-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { HOME_DOMAIN } from "../constants";

export function constructMetadata({
title,
fullTitle,
description = "Dub.co is the open-source link management platform for modern marketing teams to create marketing campaigns, link sharing features, and referral programs.",
image = "https://assets.dub.co/thumbnail.jpg",
video,
Expand All @@ -29,6 +30,7 @@ export function constructMetadata({
noIndex = false,
}: {
title?: string;
fullTitle?: string;
description?: string;
image?: string | null;
video?: string | null;
Expand All @@ -37,9 +39,11 @@ export function constructMetadata({
noIndex?: boolean;
} = {}): Metadata {
return {
title: title
? `${title} | Dub.co`
: "Dub.co - Link Management for Modern Marketing Teams",
title:
fullTitle ||
(title
? `${title} | Dub.co`
: "Dub.co - Link Management for Modern Marketing Teams"),
description,
openGraph: {
title,
Expand Down

0 comments on commit 5a458af

Please sign in to comment.