forked from dodopayments/billingsdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext-sitemap.config.js
More file actions
37 lines (36 loc) · 979 Bytes
/
next-sitemap.config.js
File metadata and controls
37 lines (36 loc) · 979 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
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: process.env.SITE_URL || "https://billingsdk.com",
generateRobotsTxt: true,
changefreq: "weekly",
priority: 0.6,
sitemapSize: 7000,
// Custom transformation function to set different priorities for different pages
transform: async (config, path) => {
// Set higher priority for home page
if (path === "/") {
return {
loc: path,
changefreq: config.changefreq,
priority: 0.8,
lastmod: config.autoLastmod ? new Date().toISOString() : undefined,
};
}
return {
loc: path,
changefreq: config.changefreq,
priority: config.priority,
lastmod: config.autoLastmod ? new Date().toISOString() : undefined,
};
},
// Exclude certain paths if needed
exclude: ["/api/*", "/_next/*", "/404", "/500"],
robotsTxtOptions: {
policies: [
{
userAgent: "*",
allow: "/",
},
],
},
};