-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnext-sitemap.config.js
More file actions
42 lines (38 loc) · 994 Bytes
/
next-sitemap.config.js
File metadata and controls
42 lines (38 loc) · 994 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
41
42
// /next-sitemap.config.js
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: process.env.NEXT_PUBLIC_BASE_URL,
generateRobotsTxt: true,
sitemapSize: 500,
generateIndexSitemap: true,
exclude: ['/dashboard/*'],
robotsTxtOptions: {
policies: [
{
userAgent: '*',
allow: '/',
disallow: [
'/dashboard',
'/dashboard/admin',
'/dashboard/create-listings',
'/dashboard/favorites',
'/dashboard/moderator',
'/dashboard/profile',
'/dashboard/update-password',
'/dashboard/user',
],
},
],
additionalSitemaps: [
`${process.env.NEXT_PUBLIC_BASE_URL}/sitemap/index.xml`,
],
},
transform: async (config, path) => {
return {
loc: path,
changefreq: 'daily',
priority: 0.7,
lastmod: new Date().toISOString(),
};
},
};