Maj smtp, reset password, et ajout afroshine
All checks were successful
Build and Push App / build (push) Successful in 10m29s
All checks were successful
Build and Push App / build (push) Successful in 10m29s
This commit is contained in:
@@ -72,7 +72,19 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
|
||||
priority: 0.7,
|
||||
}));
|
||||
|
||||
return [...staticRoutes, ...businessRoutes, ...blogRoutes];
|
||||
// 4. Fetch all Afro Life (Interviews)
|
||||
const interviews = await prisma.interview.findMany({
|
||||
select: { id: true, slug: true, updatedAt: true },
|
||||
});
|
||||
|
||||
const afroLifeRoutes = interviews.map((interview) => ({
|
||||
url: `${baseUrl}/afrolife/${interview.slug || interview.id}`,
|
||||
lastModified: interview.updatedAt,
|
||||
changeFrequency: 'monthly' as const,
|
||||
priority: 0.7,
|
||||
}));
|
||||
|
||||
return [...staticRoutes, ...businessRoutes, ...blogRoutes, ...afroLifeRoutes];
|
||||
} catch (error) {
|
||||
console.error("Error generating sitemap:", error);
|
||||
// Fallback to only static routes if DB connection fails
|
||||
|
||||
Reference in New Issue
Block a user