Files
archicratie-edition/astro.config.mjs

34 lines
906 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// @ts-check
import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeParagraphIds from "./src/plugins/rehype-paragraph-ids.js";
export default defineConfig({
output: "static",
trailingSlash: "always",
// URL finale (utilisée pour sitemap + canoniques)
// Astro charge .env.production automatiquement en mode build.
site: process.env.PUBLIC_SITE ?? "http://localhost:4321",
integrations: [
mdx(),
sitemap({
// Évite dindexer les endpoints techniques
filter: (page) => !page.includes("/api/") && !page.endsWith("/robots.txt"),
}),
],
markdown: {
rehypePlugins: [
rehypeSlug,
[rehypeAutolinkHeadings, { behavior: "append" }],
rehypeParagraphIds,
],
},
});