Skip to content

Commit 4b2bc3b

Browse files
committed
seo
1 parent bd49f17 commit 4b2bc3b

3 files changed

Lines changed: 64 additions & 9 deletions

File tree

SEO_IMPROVEMENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Refactored to support server-side metadata:
5252

5353
- Split into server component (page.tsx) and client component (marketplace-client.tsx)
5454
- Added comprehensive metadata:
55-
- Title: "Weeshr | Send Gifts to Someone Special"
55+
- Title: "Weeshr |Send gifts to Someone Special"
5656
- Description: "Surprise the ones you love — or treat yourself — with a gift."
5757
- Keywords: gifts, send gifts, gift ideas, surprise gifts, etc.
5858
- Open Graph and Twitter Card tags
@@ -141,7 +141,7 @@ When sharing vendor pages on social media:
141141

142142
When sharing marketplace pages:
143143

144-
- **Title:** "Weeshr | Send Gifts to Someone Special"
144+
- **Title:** "Weeshr |Send gifts to Someone Special"
145145
- **Description:** "Surprise the ones you love — or treat yourself — with a gift."
146146
- **Image:** Weeshr default banner
147147

app/m/[vendorSlug]/page.tsx

Lines changed: 61 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,73 @@ export async function generateMetadata({
1212
params: Promise<{ vendorSlug: string }>;
1313
}): Promise<Metadata> {
1414
const { vendorSlug } = await params;
15+
1516
try {
1617
const vendor = await VendorService.getVendorBySlug(vendorSlug);
18+
19+
if (!vendor) {
20+
return {
21+
title: "Vendor Not Found | Weeshr",
22+
description:
23+
"The vendor you're looking for doesn't exist or has been removed.",
24+
};
25+
}
26+
27+
const title = `Find gifts from ${vendor.name} on Weeshr`;
28+
const description = "Weeshr |Send gifts to Someone Special";
29+
const vendorUrl = `https://weeshr.com/m/${vendorSlug}`;
30+
31+
// Use vendor's image or banner, fallback to Weeshr default
32+
const imageUrl =
33+
vendor.image ||
34+
"https://res.cloudinary.com/drykej1am/image/upload/v1727903584/weeshr_website/ThumbnailWeeshr_1_3_oicmbz.png";
35+
1736
return {
18-
title: vendor ? `Gift from ${vendor.name} | Weeshr` : "Vendor Not Found",
19-
description: vendor
20-
? `Browse gifts from ${vendor.name} on Weeshr`
21-
: "Vendor page not found",
37+
title,
38+
description,
39+
keywords: [
40+
vendor.name,
41+
"gifts",
42+
"weeshr",
43+
"gift ideas",
44+
vendor.category,
45+
"surprise gifts",
46+
"send gifts",
47+
"online gifting",
48+
"self-gifting",
49+
"treat yourself",
50+
],
51+
openGraph: {
52+
title,
53+
description,
54+
url: vendorUrl,
55+
siteName: "Weeshr",
56+
images: [
57+
{
58+
url: imageUrl,
59+
width: 1200,
60+
height: 630,
61+
alt: `${vendor.name} on Weeshr`,
62+
},
63+
],
64+
locale: "en_US",
65+
type: "website",
66+
},
67+
twitter: {
68+
card: "summary_large_image",
69+
title,
70+
description,
71+
images: [imageUrl],
72+
},
73+
alternates: {
74+
canonical: vendorUrl,
75+
},
2276
};
2377
} catch (error) {
2478
return {
25-
title: "Vendor Not Found",
26-
description: "Vendor page not found",
79+
title: "Vendor Not Found | Weeshr",
80+
description:
81+
"The vendor you're looking for doesn't exist or has been removed.",
2782
};
2883
}
2984
}

app/m/v/[vendorId]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function generateMetadata({
1919
}
2020

2121
const title = `Find gifts from ${vendor.name} on Weeshr`;
22-
const description = "Weeshr | Send gifts to Someone Special";
22+
const description = "Weeshr |Send gifts to Someone Special";
2323
const vendorUrl = `https://weeshr.com/v/${vendor.slug || vendorId}`;
2424

2525
// Use vendor's image or banner, fallback to Weeshr default

0 commit comments

Comments
 (0)