- 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.
75 lines
2.9 KiB
JavaScript
75 lines
2.9 KiB
JavaScript
import Link from "next/link";
|
|
import { convertTimestampToJalali } from "@/helper";
|
|
|
|
function Head({ data, cityName }) {
|
|
const firstTag = data?.tag?.[0];
|
|
const createdDate = data?.created ? convertTimestampToJalali(data.created) : "";
|
|
|
|
return (
|
|
<div>
|
|
<div className="flex items-center justify-start gap-1">
|
|
<Link
|
|
href="/blogs"
|
|
className="text-[#9B9B9B] text-[11px] sm:text-[13px] md:text-[15px] lg:text-[16px] font-normal hover:text-[#525252]"
|
|
>
|
|
بلاگ
|
|
</Link>
|
|
<span className="text-[#9B9B9B] text-[11px] sm:text-[13px] md:text-[15px] lg:text-[16px] font-normal">
|
|
{">"}
|
|
</span>
|
|
{firstTag && (
|
|
<>
|
|
<p className="text-[#9B9B9B] text-[11px] sm:text-[13px] md:text-[15px] lg:text-[16px] font-normal">
|
|
{firstTag.name} {">"}
|
|
</p>
|
|
</>
|
|
)}
|
|
<p className="text-[#525252] text-[11px] sm:text-[13px] md:text-[15px] lg:text-[16px] font-normal">
|
|
{data?.title}
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<h1 className="text-[#3B3B3B] mt-[24px] sm:mt-[29px] md:mt-[35px] lg:mt-[40px] text-[14px] sm:text-[17px] md:text-[20px] lg:text-[24px] font-bold">
|
|
{data?.title}
|
|
</h1>
|
|
</div>
|
|
<div className="flex mt-[16px] sm:mt-[18px] md:mt-[21px] lg:mt-[24px] items-center justify-start gap-[35px]">
|
|
{/* شهر پست در HTML قابلمشاهده — نه فقط در متادیتا. برچسب با همان
|
|
تایپوگرافی «نویسنده/تاریخ» تا با بقیهٔ سربرگ همخانواده بماند. */}
|
|
{cityName && (
|
|
<div className="flex items-center justify-start gap-1">
|
|
<p className="text-[#9B9B9B] text-[11px] md:text-[13px] lg:text-[14px] font-normal">
|
|
مخصوص شهر:
|
|
</p>
|
|
<p className="text-[#9B9B9B] text-[11px] md:text-[14px] lg:text-[16px] font-medium">
|
|
{cityName}
|
|
</p>
|
|
</div>
|
|
)}
|
|
{data?.author && (
|
|
<div className="flex items-center justify-start gap-1">
|
|
<p className="text-[#9B9B9B] text-[11px] md:text-[13px] lg:text-[14px] font-normal">
|
|
نویسنده:
|
|
</p>
|
|
<p className="text-[#9B9B9B] text-[11px] md:text-[14px] lg:text-[16px] font-medium">
|
|
{data.author}
|
|
</p>
|
|
</div>
|
|
)}
|
|
{createdDate && (
|
|
<div className="flex items-center justify-start gap-1">
|
|
<p className="text-[#9B9B9B] text-[11px] md:text-[13px] lg:text-[14px] font-normal">
|
|
تاریخ انتشار:
|
|
</p>
|
|
<p className="text-[#9B9B9B] text-[11px] md:text-[14px] lg:text-[16px] font-medium">
|
|
{createdDate}
|
|
</p>
|
|
</div>
|
|
)}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default Head;
|