build: add astro-compress
This commit is contained in:
parent
7d0f687a80
commit
349beee8dc
3 changed files with 529 additions and 26 deletions
|
@ -3,28 +3,24 @@ import alpinejs from "@astrojs/alpinejs";
|
|||
import tailwind from "@astrojs/tailwind";
|
||||
import mdx from "@astrojs/mdx";
|
||||
|
||||
// https://astro.build/config
|
||||
import sitemap from "@astrojs/sitemap";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [
|
||||
alpinejs(),
|
||||
mdx(),
|
||||
sitemap({
|
||||
serialize(item) {
|
||||
// To prevent crawling errors, remove the trailing slash from the URL
|
||||
// otherwise it will be a link to a redirect URL and not the content.
|
||||
item.url = item.url.replace(/\/$/, "");
|
||||
import compress from "astro-compress";
|
||||
|
||||
return item;
|
||||
},
|
||||
}),
|
||||
tailwind({
|
||||
config: {
|
||||
applyBaseStyles: false,
|
||||
},
|
||||
}),
|
||||
],
|
||||
site: "https://www.oliverdavies.uk",
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [alpinejs(), mdx(), sitemap({
|
||||
serialize(item) {
|
||||
// To prevent crawling errors, remove the trailing slash from the URL
|
||||
// otherwise it will be a link to a redirect URL and not the content.
|
||||
item.url = item.url.replace(/\/$/, "");
|
||||
return item;
|
||||
}
|
||||
}), tailwind({
|
||||
config: {
|
||||
applyBaseStyles: false
|
||||
}
|
||||
}), compress()],
|
||||
site: "https://www.oliverdavies.uk"
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue