feat(sitemap): refactor sitemap generation to include doctors, clinics, and blogs with improved URL handling
This commit is contained in:
@@ -47,7 +47,7 @@ export async function generateMetadata({ params }) {
|
||||
const description =
|
||||
doctor.detail ||
|
||||
`رزرو نوبت آنلاین دکتر ${doctor.name}${specialtyNames ? " متخصص " + specialtyNames : ""}${doctor.address ? " | " + doctor.address : ""}`.trim();
|
||||
const image = imageUrl(doctor.img) || FALLBACK_IMG;
|
||||
const image = imageUrl(doctor.img?.[0]?.url) || FALLBACK_IMG;
|
||||
|
||||
return {
|
||||
title,
|
||||
@@ -103,10 +103,10 @@ async function Doctor({ params }) {
|
||||
name: `دکتر ${doctor.name}`,
|
||||
url: `https://www.nobat724.com/doctor/${doctor.uuid}`,
|
||||
...(specialtyNames && { medicalSpecialty: specialtyNames }),
|
||||
...(doctor.img && {
|
||||
...(doctor.img?.[0]?.url && {
|
||||
image: {
|
||||
"@type": "ImageObject",
|
||||
url: imageUrl(doctor.img),
|
||||
url: imageUrl(doctor.img[0].url),
|
||||
},
|
||||
}),
|
||||
...(Number(doctor.point) > 0 && {
|
||||
|
||||
Reference in New Issue
Block a user