-
Notifications
You must be signed in to change notification settings - Fork 92
/
next-sitemap.js
37 lines (35 loc) · 833 Bytes
/
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
module.exports = {
siteUrl: 'https://www.globalforestwatch.org',
generateRobotsTxt: false,
sitemapSize: 50000,
priority: 1.0,
changefreq: 'weekly',
exclude: [
'/404',
'/search',
'/thank-you',
'/terms',
'/my-gfw',
'/privacy-policy',
'/subscribe',
],
transform: (config, url) => {
if (url.includes('/embed')) {
return null;
}
if (url.includes('/map') || url.includes('/dashboards')) {
return {
loc: url,
changefreq: config.changefreq,
priority: config.priority,
lastmod: config.autoLastmod ? new Date().toISOString() : undefined,
};
}
return {
loc: url,
changefreq: config.changefreq,
priority: config.priority,
lastmod: config.autoLastmod ? new Date().toISOString() : undefined,
};
},
};