forked from civitai/civitai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next-sitemap.config.js
47 lines (44 loc) · 1.04 KB
/
next-sitemap.config.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
const exclude = [
'/*/create',
'/api/*',
'/discord/*',
'/dmca/*',
'/intent/*',
'/models/train',
'/moderator/*',
'/payment/*',
'/redirect',
'/search/*',
'/testing/*',
'/user/account',
'/user/downloads',
'/user/notifications',
'/user/transactions',
'/user/buzz-dashboard',
];
const disallow = exclude.filter((path) => !path.includes('sitemap.xml'));
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: process.env.NEXTAUTH_URL || 'http://localhost:3000',
generateRobotsTxt: true,
sitemapSize: 5000,
changefreq: null,
priority: null,
exclude,
robotsTxtOptions: {
policies: [
{
userAgent: '*',
[process.env.NODE_ENV === 'prod' ? 'allow' : 'disallow']: '/',
disallow,
allow: ['/api/trpc/*']
},
],
additionalSitemaps: [
// Add additional sitemaps here
`${process.env.NEXTAUTH_URL}/sitemap-articles.xml`,
`${process.env.NEXTAUTH_URL}/sitemap-models.xml`,
`${process.env.NEXTAUTH_URL}/sitemap-questions.xml`,
],
},
};