Spaces:
Running
Running
File size: 2,337 Bytes
400357a fee9c1e 9a962ce b9e7b9b 542395c fee9c1e 0390c56 a4b9560 4f3bb9d a4b9560 4f3bb9d e329457 400357a a4b9560 72cfb5a 400357a d8d4124 542395c 9a962ce e1c7423 542395c e329457 fee9c1e fef84f3 b9e7b9b e0ad823 b9e7b9b e0ad823 fef84f3 fee9c1e a4b9560 fee9c1e 4f3bb9d fee9c1e 6b70860 fee9c1e e0e09d3 6b70860 72cfb5a a4b9560 0390c56 4f3bb9d a4b9560 fee9c1e 400357a |
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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import svelte from '@astrojs/svelte';
import mermaid from 'astro-mermaid';
import compressor from 'astro-compressor';
import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
import remarkFootnotes from 'remark-footnotes';
import rehypeSlug from 'rehype-slug';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeCitation from 'rehype-citation';
import rehypeCodeCopy from './plugins/rehype/code-copy.mjs';
import rehypeReferencesAndFootnotes from './plugins/rehype/post-citation.mjs';
import remarkIgnoreCitationsInCode from './plugins/remark/ignore-citations-in-code.mjs';
import remarkDirective from 'remark-directive';
import remarkOutputContainer from './plugins/remark/output-container.mjs';
import rehypeRestoreAtInCode from './plugins/rehype/restore-at-in-code.mjs';
import rehypeWrapTables from './plugins/rehype/wrap-tables.mjs';
import rehypeWrapOutput from './plugins/rehype/wrap-outputs.mjs';
// Built-in Shiki (dual themes) — no rehype-pretty-code
// Plugins moved to app/plugins/*
export default defineConfig({
output: 'static',
integrations: [
mermaid({ theme: 'forest', autoTheme: true }),
mdx(),
svelte(),
// Precompress output with Gzip only (Brotli disabled due to server module mismatch)
compressor({ brotli: false, gzip: true })
],
devToolbar: {
enabled: false
},
markdown: {
shikiConfig: {
themes: {
light: 'github-light',
dark: 'github-dark'
},
defaultColor: false,
wrap: false,
langAlias: {
// Map MDX fences to TSX for better JSX tokenization
mdx: 'tsx'
}
},
remarkPlugins: [
remarkIgnoreCitationsInCode,
remarkMath,
[remarkFootnotes, { inlineNotes: true }],
remarkDirective,
remarkOutputContainer
],
rehypePlugins: [
rehypeSlug,
[rehypeAutolinkHeadings, { behavior: 'wrap' }],
[rehypeKatex, {
trust: true,
}],
[rehypeCitation, {
bibliography: 'src/content/bibliography.bib',
linkCitations: true,
csl: "apa",
}],
rehypeReferencesAndFootnotes,
rehypeRestoreAtInCode,
rehypeCodeCopy,
rehypeWrapOutput,
rehypeWrapTables
]
}
});
|