feat(doctor): enhance doctor page with specialty links and dynamic breadcrumb
This commit is contained in:
@@ -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}` },
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user