-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathastro.config.mjs
More file actions
74 lines (74 loc) · 2.3 KB
/
astro.config.mjs
File metadata and controls
74 lines (74 loc) · 2.3 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
73
74
import { defineConfig } from 'astro/config';
import tailwindcss from 'tailwindcss';
import autoprefixer from 'autoprefixer';
import icon from 'astro-icon';
import sitemap from '@astrojs/sitemap';
// https://astro.build/config
export default defineConfig({
site: 'https://logtide.dev',
trailingSlash: 'always',
integrations: [
icon(),
sitemap({
filter: (page) =>
!page.includes('/login') &&
!page.includes('/register') &&
!page.includes('/dashboard'),
changefreq: 'weekly',
priority: 0.7,
lastmod: new Date(),
serialize(item) {
// Higher priority for important pages
if (item.url === 'https://logtide.dev/') {
item.priority = 1.0;
item.changefreq = 'daily';
} else if (item.url.includes('/docs/getting-started/')) {
item.priority = 0.9;
item.changefreq = 'weekly';
} else if (item.url.includes('/docs/sdks/') || item.url.includes('/docs/api/')) {
item.priority = 0.8;
item.changefreq = 'weekly';
} else if (item.url.includes('/integrations/') && !item.url.endsWith('/integrations/')) {
// Individual integration guides - high priority for SEO
item.priority = 0.85;
item.changefreq = 'weekly';
} else if (item.url.endsWith('/integrations/')) {
// Integrations index page
item.priority = 0.8;
item.changefreq = 'weekly';
} else if (item.url.includes('/use-cases/') && !item.url.endsWith('/use-cases/')) {
// Individual use case pages - high priority for SEO
item.priority = 0.8;
item.changefreq = 'weekly';
} else if (item.url.endsWith('/use-cases/')) {
// Use cases index page
item.priority = 0.75;
item.changefreq = 'weekly';
} else if (item.url.includes('/legal/')) {
// Legal pages - low priority, rarely change
item.priority = 0.3;
item.changefreq = 'yearly';
}
return item;
},
}),
],
markdown: {
shikiConfig: {
themes: {
light: 'github-light',
dark: 'one-dark-pro',
},
},
},
vite: {
css: {
postcss: {
plugins: [tailwindcss(), autoprefixer()],
},
},
ssr: {
noExternal: ['shiki'],
},
},
});