import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import { sharedVite } from '@eratic/core/astro';
// blog.eratic.ro — essays and photographs in one feed.
export default defineConfig({
// Keeps fonts out of data: URIs — see packages/core/astro.mjs
vite: sharedVite,
site: 'https://blog.eratic.ro',
// Every URL ends in a slash. Caddy is configured to match, so there is
// exactly one canonical form of every address and no redirect chains.
trailingSlash: 'always',
build: {
format: 'directory',
},
integrations: [
mdx(),
sitemap({
// Drafts and future-dated entries never reach dist/, so anything the
// sitemap can see is genuinely published.
filter: (page) => !page.includes('/draft'),
}),
],
image: {
// Everything is re-encoded through sharp: modern formats, several widths,
// and — the reason it matters here — all EXIF stripped from the output.
responsiveStyles: true,
layout: 'constrained',
},
markdown: {
syntaxHighlight: {
type: 'shiki',
excludeLangs: ['mermaid'],
},
shikiConfig: {
themes: { light: 'github-light', dark: 'github-dark-dimmed' },
wrap: false,
},
},
devToolbar: {
enabled: false,
},
});