diff --git a/app/doctor/[slug]/page.js b/app/doctor/[slug]/page.js index bf80b6c..cd38586 100644 --- a/app/doctor/[slug]/page.js +++ b/app/doctor/[slug]/page.js @@ -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}` }, ], } diff --git a/components/blog/head/index.js b/components/blog/head/index.js index a566603..b8cf007 100644 --- a/components/blog/head/index.js +++ b/components/blog/head/index.js @@ -1,3 +1,4 @@ +import Link from "next/link"; import { convertTimestampToJalali } from "@/helper"; function Head({ data }) { @@ -7,9 +8,15 @@ function Head({ data }) { return (
-

- بلاگ {">"} -

+ + بلاگ + + + {">"} + {firstTag && ( <>

diff --git a/components/doctor/index.js b/components/doctor/index.js index fdd6eea..a85adc4 100644 --- a/components/doctor/index.js +++ b/components/doctor/index.js @@ -1,3 +1,4 @@ +import Link from "next/link"; import AppointmentList from "./appointmentList"; import DetailDoctor from "./detailDoctor"; import Share from "./detailDoctor/Share"; @@ -9,11 +10,20 @@ function DoctorPage({ doctor, comments, rateAggregate, slug }) {

-

- {doctor?.specialties?.map( - (item, idx) => - `${item.name} ${doctor.specialties.length === idx + 1 ? ">" : "|"} ` - )} +

+ {doctor?.specialties?.map((item, idx) => ( + + + {item.name} + + + {doctor.specialties.length === idx + 1 ? ">" : "|"} + + + ))}

{doctor?.name}