-
Notifications
You must be signed in to change notification settings - Fork 18
/
next-sitemap.config.js
47 lines (44 loc) · 1.15 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
/** @type {import('next-sitemap').IConfig} */
// for more config options;
// https://www.npmjs.com/package/next-sitemap#configuration-options
const config = require('./src/data/config.json')
module.exports = {
// ========================
// sitemap.xml
// ========================
siteUrl: config.websiteUrl || 'https://something-is-wrong-if-you-see-this.com',
changefreq: 'daily', // always hourly daily weekly monthly yearly never
priority: 0.7, // between 0 and 1
sitemapSize: 5000,
exclude: [
'/unsupported'
// '/page-0'
// '/page-*'
// '/private/*'
],
alternateRefs: [
// multi-language support
// {
// href: 'https://example.com/fr',
// hreflang: 'fr'
// }
],
// transform: async (config, path) => {},
// additionalPaths: async (config) => {},
outDir: 'out',
autoLastmod: true,
generateIndexSitemap: false,
// ========================
// robots.txt
// ========================
generateRobotsTxt: true,
robotsTxtOptions: {
policies: [
{
userAgent: '*',
allow: '/',
disallow: ['/_next', '/404', '/500', '/unsupported', '/favicons']
}
]
}
}