-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathnext-sitemap.config.js
More file actions
40 lines (40 loc) · 897 Bytes
/
next-sitemap.config.js
File metadata and controls
40 lines (40 loc) · 897 Bytes
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
34
35
36
37
38
39
40
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: 'https://happy.engineering',
generateRobotsTxt: true,
generateIndexSitemap: false,
outDir: './out',
// Exclude paths that shouldn't be indexed
exclude: [
'/404',
'/500',
'/_app',
'/_document',
'/_error',
'/api/*',
],
robotsTxtOptions: {
policies: [
{
userAgent: '*',
allow: '/',
},
],
additionalSitemaps: [
// Add any additional sitemaps if needed in the future
],
},
// Transform function to customize URLs if needed
transform: async (config, path) => {
return {
loc: path,
changefreq: config.changefreq,
priority: config.priority,
lastmod: config.autoLastmod ? new Date().toISOString() : undefined,
}
},
// Additional options
changefreq: 'weekly',
priority: 0.7,
autoLastmod: true,
}