-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext-sitemap.config.js
More file actions
72 lines (70 loc) · 1.8 KB
/
next-sitemap.config.js
File metadata and controls
72 lines (70 loc) · 1.8 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: process.env.SITE_URL || 'https://www.alexwelcing.com',
generateRobotsTxt: false, // We have a manual robots.txt in public/
generateIndexSitemap: true,
changefreq: 'daily',
priority: 0.7,
sitemapSize: 7000,
exclude: [
'/api/*',
'/404',
],
transform: async (config, path) => {
// Custom priority for important pages based on SEO strategy
let priority = 0.7
let changefreq = 'daily'
// Core pages - highest priority
if (path === '/') {
priority = 1.0
changefreq = 'daily'
}
// Hub pages - high priority (PageRank concentrators)
else if (
path === '/speculative-ai' ||
path === '/agent-futures' ||
path === '/emergent-intelligence'
) {
priority = 0.95
changefreq = 'weekly'
}
// About page
else if (path === '/about') {
priority = 0.9
changefreq = 'monthly'
}
// Articles index
else if (path === '/articles') {
priority = 0.85
changefreq = 'daily'
}
// Individual articles
else if (path.startsWith('/articles/')) {
priority = 0.8
changefreq = 'weekly'
}
return {
loc: path,
changefreq,
priority,
lastmod: config.autoLastmod ? new Date().toISOString() : undefined,
}
},
additionalSitemaps: [
`${process.env.SITE_URL || 'https://www.alexwelcing.com'}/video-sitemap.xml`,
],
robotsTxtOptions: {
policies: [
{
userAgent: '*',
allow: '/',
disallow: ['/api/', '/drafts/', '/experiments/', '/_next/'],
},
],
additionalSitemaps: [
'https://www.alexwelcing.com/sitemap-core.xml',
'https://www.alexwelcing.com/sitemap-articles.xml',
'https://www.alexwelcing.com/video-sitemap.xml',
],
},
}