- 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.
37 lines
1.5 KiB
JavaScript
37 lines
1.5 KiB
JavaScript
import Layout from "@/components/layout/StLayout";
|
|
import SpecialtiesPage from "@/components/specialties";
|
|
import { getStateInfo } from "@/lib/getStateInfo";
|
|
|
|
export async function generateMetadata() {
|
|
const { matchedCity, isRoot } = await getStateInfo();
|
|
const siteName = matchedCity?.site_name || "نوبت 724";
|
|
// روی دامنهٔ ریشه نام رکورد («نوبت 724») برند است نه شهر — نباید در Title بنشیند.
|
|
const cityName = isRoot ? "" : matchedCity?.name || "";
|
|
const title = cityName
|
|
? `تخصصهای پزشکی در ${cityName} | ${siteName}`
|
|
: `تخصصهای پزشکی | ${siteName}`;
|
|
const description = `لیست کامل تخصصهای پزشکی${cityName ? " در " + cityName : ""}. رزرو نوبت از متخصصین مختلف به صورت آنلاین.`;
|
|
const image = "/assets/images/og-image.png";
|
|
return {
|
|
title,
|
|
description,
|
|
openGraph: { title, description, images: [image] },
|
|
twitter: { card: "summary_large_image", title, description, images: [image] },
|
|
};
|
|
}
|
|
|
|
async function Specialties() {
|
|
const { matchedCity, matchedState, isRoot } = await getStateInfo();
|
|
return (
|
|
<Layout name="/specialties">
|
|
<SpecialtiesPage
|
|
cityId={isRoot ? null : (matchedCity?.id ?? null)}
|
|
cityName={isRoot ? null : (matchedCity?.name ?? null)}
|
|
stateName={isRoot ? null : (matchedState?.name ?? null)}
|
|
/>
|
|
</Layout>
|
|
);
|
|
}
|
|
|
|
export default Specialties;
|