-
Notifications
You must be signed in to change notification settings - Fork 6
/
astro.config.mjs
37 lines (35 loc) · 924 Bytes
/
astro.config.mjs
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
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import compress from 'astro-compress';
import serviceWorker from 'astrojs-service-worker';
import { defineConfig } from 'astro/config';
import { SITE_URL, SITE_BASE } from './src/config';
import { remarkReadingTime } from './src/lib/remark-reading-time';
const swIntegrationOptions = {
workbox: {
skipWaiting: true,
manifestTransforms: [
(orignalManifest) => {
const manifest = orignalManifest.map((entity) => ({
...entity,
url: entity.url.replace(/\/index\.html$/, '/'),
}));
return { manifest };
},
],
},
};
export default defineConfig({
site: SITE_URL,
base: SITE_BASE,
integrations: [
mdx(),
sitemap(),
serviceWorker(swIntegrationOptions),
compress(),
],
markdown: {
remarkPlugins: [remarkReadingTime],
extendDefaultPlugins: true,
},
});