feat: add privacy hub and application privacy subpages
This commit is contained in:
+36
-1
@@ -48,6 +48,18 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
|
||||
changeFrequency: 'monthly',
|
||||
priority: 0.8,
|
||||
},
|
||||
{
|
||||
url: `${baseUrl}/en/privacy`,
|
||||
lastModified: new Date(),
|
||||
changeFrequency: 'monthly',
|
||||
priority: 0.7,
|
||||
},
|
||||
{
|
||||
url: `${baseUrl}/tr/privacy`,
|
||||
lastModified: new Date(),
|
||||
changeFrequency: 'monthly',
|
||||
priority: 0.7,
|
||||
},
|
||||
];
|
||||
|
||||
try {
|
||||
@@ -111,7 +123,30 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
|
||||
// Ignore if blog fetching fails
|
||||
}
|
||||
|
||||
return [...staticUrls, ...expertiseUrls, ...workUrls, ...blogUrls];
|
||||
// Privacy App Pages
|
||||
let privacyUrls: MetadataRoute.Sitemap = [];
|
||||
try {
|
||||
const { getAllPrivacyApps } = await import('@/data/privacy');
|
||||
const privacyApps = getAllPrivacyApps();
|
||||
privacyUrls = privacyApps.flatMap((app) => [
|
||||
{
|
||||
url: `${baseUrl}/en/privacy/${app.slug}`,
|
||||
lastModified: new Date(),
|
||||
changeFrequency: 'monthly',
|
||||
priority: 0.6,
|
||||
},
|
||||
{
|
||||
url: `${baseUrl}/tr/privacy/${app.slug}`,
|
||||
lastModified: new Date(),
|
||||
changeFrequency: 'monthly',
|
||||
priority: 0.6,
|
||||
},
|
||||
]);
|
||||
} catch (err) {
|
||||
// Ignore if privacy fetching fails
|
||||
}
|
||||
|
||||
return [...staticUrls, ...expertiseUrls, ...workUrls, ...blogUrls, ...privacyUrls];
|
||||
} catch(e) {
|
||||
return staticUrls;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user