website: precompress static files instead of relying on fastify compress

- no need to generate the compressed files at runtime
- this prevents an issue with fastify compressing pagefind files
This commit is contained in:
Emmanuel Pelletier
2024-05-13 14:36:23 +02:00
parent 32a70597f9
commit 0593bbad15
4 changed files with 11 additions and 201 deletions

View File

@@ -4,6 +4,7 @@ import starlight from "@astrojs/starlight"
import { rehypeHeadingIds } from "@astrojs/markdown-remark"
import rehypeAutolinkHeadings from "rehype-autolink-headings"
import remarkTextr from "remark-textr"
import compressor from "astro-compressor"
// https://astro.build/config
export default defineConfig({
@@ -75,6 +76,7 @@ export default defineConfig({
themes: ["github-dark", "github-light"],
},
}),
compressor(),
],
})