-
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathastro.config.mjs
More file actions
92 lines (90 loc) · 2.4 KB
/
astro.config.mjs
File metadata and controls
92 lines (90 loc) · 2.4 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import { defineConfig, fontProviders } from 'astro/config';
import db from '@astrojs/db';
import preact from '@astrojs/preact';
import sitemap from '@astrojs/sitemap';
import tailwindcss from '@tailwindcss/vite';
import vercel from '@astrojs/vercel';
// Shared base configuration (without db)
export const baseConfig = {
output: 'static',
adapter: vercel({
imageService: true,
imagesConfig: {
formats: ['image/avif'],
minimumCacheTTL: 3600,
remotePatterns: [
{
protocol: 'https'
},
{
protocol: 'http'
}
],
sizes: [160, 320, 640, 1280]
},
webAnalytics: {
enabled: true
}
}),
build: {
inlineStylesheets: 'always'
},
experimental: {
clientPrerender: true,
fonts: [
{
provider: fontProviders.google({
experimental: { variableAxis: { Inter: { opsz: ['14..32'] } } }
}),
name: 'Inter',
cssVariable: '--astro-font-inter',
weights: ['300 900'],
styles: ['normal'],
subsets: ['latin']
}
]
},
image: {
remotePatterns: [
{
protocol: 'https'
},
{
protocol: 'http'
}
]
},
prefetch: {
prefetchAll: true,
defaultStrategy: 'viewport'
},
site: 'https://whiskey.fm',
trailingSlash: 'never',
integrations: [
preact(),
sitemap({
filter: (page) => {
const pathname = new URL(page).pathname;
// Exclude episode number pages and only include slug pages.
return !/^\/\d+\/?$/.test(pathname);
}
})
],
// These were specific redirects we needed for our podcast, if you do not have any routes to redirect, you can safely remove this.
redirects: {
'/hot-takes-tan-stack-and-open-source-with-tanner-linsley':
'/hot-takes-tanstack-and-open-source-with-tanner-linsley',
'/creating-code-pen-tackling-tailwind-and-keeping-it-simple-with-chris-coyier':
'creating-codepen-tackling-tailwind-and-keeping-it-simple-with-chris-coyier',
'/coding-languages-ai-and-the-evolution-of-game-development-with-phillip-winston':
'/coding-languages-ai-and-the-evolution-of-game-development-with-philip-winston'
},
vite: {
plugins: [tailwindcss()]
}
};
// https://astro.build/config - Default configuration with astro:db
export default defineConfig({
...baseConfig,
integrations: [db(), ...baseConfig.integrations]
});