-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.mjs
More file actions
49 lines (45 loc) · 1.42 KB
/
astro.config.mjs
File metadata and controls
49 lines (45 loc) · 1.42 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
import { defineConfig } from 'astro/config';
import sitemap from '@astrojs/sitemap';
export default defineConfig({
site: 'https://memopad.luigiandreamoretti.com',
integrations: [
sitemap({
changefreq: 'weekly',
priority: 0.7,
lastmod: new Date(),
// Optional: Custom priorities per page type
serialize(item) {
// Homepage gets highest priority
if (item.url === 'https://memopad.luigiandreamoretti.com/') {
item.priority = 1.0;
item.changefreq = 'weekly';
}
// Main pages
else if (
item.url.includes('/research/') ||
item.url.includes('/achievements/') ||
item.url.includes('/project-story/')
) {
item.priority = 0.9;
item.changefreq = 'monthly';
}
// Newsletter archive
else if (item.url === 'https://memopad.luigiandreamoretti.com/newsletter/') {
item.priority = 0.8;
item.changefreq = 'monthly';
}
// Individual newsletters
else if (item.url.includes('/newsletter/')) {
item.priority = 0.6;
item.changefreq = 'never'; // Old posts don't change
}
// Privacy/contact
else if (item.url.includes('/privacy/') || item.url.includes('/contact/')) {
item.priority = 0.4;
item.changefreq = 'yearly';
}
return item;
}
})
]
});