feat: add canonical URL handling and entity quality checks
- Implemented canonical URL strategies for city-specific domains and entities. - Added helper functions for domain and city resolution. - Created tests for canonical URL generation and domain resolution. - Introduced entity quality checks for doctors and clinics to ensure meaningful content. - Developed unique introductory texts for listing pages to avoid duplicate content. - Established robots.txt policies for listing pages to manage indexing based on user filters. - Enhanced specialty content with dynamic introductions and FAQs to improve SEO.
This commit is contained in:
@@ -4,8 +4,16 @@ import ClaimProfileSection from "./claim";
|
||||
import DetailDoctor from "./detailDoctor";
|
||||
import Share from "./detailDoctor/Share";
|
||||
import CustomLoading from "@/app/component/loading/Custom";
|
||||
import Faq from "@/components/specialties/detail/Faq";
|
||||
import specialtiesData from "@/data/specialties.json";
|
||||
|
||||
function DoctorPage({ doctor, comments, rateAggregate, addresses, bookableAddressUuids = [], bookingLocations = [], slug }) {
|
||||
// مقصد تمیز صفحهٔ فرود تخصص؛ اگر تخصص slug نداشت، لیست پزشکان با کوئری قدیمی.
|
||||
const specialtyHref = (name) => {
|
||||
const slug = specialtiesData.find((s) => s.name === name && s.status === 1)?.slug;
|
||||
return slug ? `/specialties/${slug}` : `/doctors?specialty=${encodeURIComponent(name)}`;
|
||||
};
|
||||
|
||||
function DoctorPage({ doctor, comments, rateAggregate, addresses, bookableAddressUuids = [], bookingLocations = [], slug, faq = [] }) {
|
||||
return (
|
||||
<div className="pt-[92px] sm:pt-[120px] mt:pt-[148px] lg:pt-[176px] mt-[px] padding-responsive">
|
||||
<div className="flex items-center justify-between">
|
||||
@@ -14,10 +22,7 @@ function DoctorPage({ doctor, comments, rateAggregate, addresses, bookableAddres
|
||||
<h2 className="text-[#9B9B9B] text-nowrap flex items-center">
|
||||
{doctor?.specialties?.map((item, idx) => (
|
||||
<span key={item.id ?? item.name} className="flex items-center">
|
||||
<Link
|
||||
href={`/doctors?specialty=${encodeURIComponent(item.name)}`}
|
||||
className="hover:text-[#525252]"
|
||||
>
|
||||
<Link href={specialtyHref(item.name)} className="hover:text-[#525252]">
|
||||
{item.name}
|
||||
</Link>
|
||||
<span className="mx-1">
|
||||
@@ -44,6 +49,7 @@ function DoctorPage({ doctor, comments, rateAggregate, addresses, bookableAddres
|
||||
<AppointmentList doctor={doctor} doctorSlug={slug} bookingLocations={bookingLocations} />
|
||||
</div>
|
||||
<ClaimProfileSection doctor={doctor} />
|
||||
<Faq items={faq} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user