feat(doctor): enhance doctor page with specialty links and dynamic breadcrumb

This commit is contained in:
hamed
2026-06-21 11:55:36 +03:30
parent 704a514542
commit 7462e69641
3 changed files with 32 additions and 9 deletions
+7 -1
View File
@@ -96,13 +96,19 @@ async function Doctor({ params }) {
}
: null;
const specialtyLabel = doctor?.specialties?.[0]?.name || "پزشکان";
const breadcrumbJsonLd = doctor
? {
"@context": "https://schema.org",
"@type": "BreadcrumbList",
itemListElement: [
{ "@type": "ListItem", position: 1, name: "خانه", item: "https://www.nobat724.com" },
{ "@type": "ListItem", position: 2, name: "پزشکان", item: "https://www.nobat724.com/doctors" },
{
"@type": "ListItem",
position: 2,
name: specialtyLabel,
item: `https://www.nobat724.com/doctors?specialty=${encodeURIComponent(specialtyLabel)}`,
},
{ "@type": "ListItem", position: 3, name: `دکتر ${doctor.name}` },
],
}