-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathastro.config.mjs
More file actions
36 lines (34 loc) · 1.11 KB
/
astro.config.mjs
File metadata and controls
36 lines (34 loc) · 1.11 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
// --- File: astro.config.mjs ---
import { astroImageTools } from 'astro-imagetools'
import compress from 'astro-compress'
import compressor from 'astro-compressor'
import { defineConfig } from 'astro/config'
import purgecss from 'astro-purgecss'
import sitemap from '@astrojs/sitemap'
import vue from '@astrojs/vue'
import remarkMath from 'remark-math'
import rehypeKatex from 'rehype-katex'
import mdx from '@astrojs/mdx'
// https://astro.build/config
export default defineConfig({
integrations: [
vue(),
astroImageTools,
sitemap(),
// --- MODIFIED ---
// We are adding 'is-open' to the safelist. This tells PurgeCSS to NEVER remove
// this class, which is essential because it's added dynamically by our JavaScript
// to show the submenus. Without this, PurgeCSS removes the CSS for it.
purgecss({
safelist: [/^navbar/, 'is-active', 'has-dropdown', 'is-hoverable', 'is-boxed', 'burger', 'is-open']
}),
compress(),
compressor(),
mdx({
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex],
}),
],
site: 'https://uais.dev',
output: 'static',
});