eratic / sites / blog / astro.config.mjs
168 words
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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,
	},
});

static mirror of HEAD · about · clone: git clone https://git.makefuture.ro/eratic.git