-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext-sitemap.js
79 lines (75 loc) · 2.5 KB
/
next-sitemap.js
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: 'https://prototypr.io',
generateRobotsTxt: true, // (optional)
sitemapSize: 5000,
exclude: ['/server-sitemap-index.xml', '/sitemap-tools.xml',
'/account', '/account/*','/onboard','/sponsor','/payment-success','/payment-failure',
'/posts/sitemap.xml', '/posts/sitemap/*',
'/toolbox/sitemap.xml', '/toolbox/sitemap/*',
'/newsletter/sitemap.xml', '/newsletter/sitemap/*',
'/news/sitemap.xml', '/news/sitemap/*',
'/blog/sitemap.xml', '/blog/sitemap/*',
'/inspiration/sitemap.xml', '/inspiration/sitemap/*',
], // <= exclude here
robotsTxtOptions: {
additionalSitemaps: [
'https://prototypr.io/posts/sitemap.xml', // <==== Add here,
'https://prototypr.io/toolbox/sitemap.xml', // <==== Add here,
'https://prototypr.io/newsletter/sitemap.xml', // <==== Add here,
'https://prototypr.io/news/sitemap.xml', // <==== Add here,
'https://prototypr.io/blog/sitemap.xml', // <==== Add here,
'https://prototypr.io/inspiration/sitemap.xml', // <==== Add here,
],
},
additionalPaths: async (config) => {
const result = []
// all possible values
result.push({
loc: '/toolbox',
changefreq: 'weekly',
priority: 0.7,
lastmod: new Date().toISOString(),
})
result.push({
loc: '/toolbox/augmented-reality-tools',
changefreq: 'weekly',
priority: 0.7,
lastmod: new Date().toISOString(),
})
result.push({
loc: '/toolbox/conversational-design-tools',
changefreq: 'weekly',
priority: 0.7,
lastmod: new Date().toISOString(),
})
result.push({
loc: '/toolbox/ux-tools',
changefreq: 'weekly',
priority: 0.7,
lastmod: new Date().toISOString(),
})
result.push({
loc: '/prototyping',
changefreq: 'weekly',
priority: 0.7,
lastmod: new Date().toISOString(),
})
result.push({
loc: '/newsletter',
changefreq: 'weekly',
priority: 0.7,
lastmod: new Date().toISOString(),
})
result.push({
loc: '/posts',
changefreq: 'weekly',
priority: 0.7,
lastmod: new Date().toISOString(),
})
// using transformation from the current configuration
// result.push(await config.transform(config, '/additional-page-3'))
return result
},
// ...other options
}