oliverdavies.uk/astro.config.mjs
Oliver Davies 2e633d3a96 refactor: use YAML for products
Added YAML support as per https://docs.astro.build/en/recipes/add-yaml-support
and converted products.json to products.yaml.
2023-11-06 21:30:17 +00:00

30 lines
732 B
JavaScript

import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import yaml from "@rollup/plugin-yaml";
import { defineConfig } from "astro/config";
// https://astro.build/config
export default defineConfig({
integrations: [
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
}
}),
],
site: "https://www.oliverdavies.uk",
vite: {
plugins: [yaml()],
},
});