-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext-sitemap.config.js
More file actions
33 lines (31 loc) · 1.06 KB
/
next-sitemap.config.js
File metadata and controls
33 lines (31 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: process.env.NEXT_PUBLIC_SITE_URL || 'https://kodegas.com',
generateRobotsTxt: false, // We already have a custom robots.txt
generateIndexSitemap: false,
exclude: ['/api/*', '/admin/*'],
transform: async (config, path) => {
// Custom priority and changefreq for different page types
const customPriorities = {
'/': { priority: 1.0, changefreq: 'daily' },
'/about': { priority: 0.8, changefreq: 'weekly' },
'/services': { priority: 0.9, changefreq: 'weekly' },
'/projects': { priority: 0.7, changefreq: 'monthly' },
'/contact': { priority: 0.6, changefreq: 'monthly' },
};
const customConfig = customPriorities[path] || {
priority: 0.5,
changefreq: 'monthly',
};
return {
loc: path,
changefreq: customConfig.changefreq,
priority: customConfig.priority,
lastmod: new Date().toISOString(),
};
},
additionalPaths: async (config) => {
// Add any additional dynamic paths if needed
return [];
},
};