-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathastro.config.mjs
71 lines (66 loc) · 1.86 KB
/
astro.config.mjs
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
import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import compress from "astro-compress";
import vue from "@astrojs/vue";
import search from "./src/search/astro";
import { filenamesPlugin } from './src/plugins/filenames.mjs';
import { repoDatesPlugin } from "./src/plugins/repodates.mjs";
import { defaultLayoutPlugin } from './src/plugins/defaultlayout.mjs';
import remarkGemoji from 'remark-gemoji';
import remarkMath from 'remark-math';
import { remarkKroki } from 'remark-kroki';
import remarkPluginOembed from "remark-plugin-oembed";
import rehypeKatex from 'rehype-katex';
import { rehypeAccessibleEmojis } from 'rehype-accessible-emojis';
import rehypeRaw from "rehype-raw";
import rehypeRewrite from "rehype-rewrite";
import { rewriteKroki } from './src/utils/rewriteKroki.mjs';
export default defineConfig({
site: 'https://jordemort.dev',
integrations: [
vue(),
mdx(),
sitemap(),
compress({ html: {
collapseWhitespace: true,
collapseInlineTagWhitespace: false,
conservativeCollapse: true,
minifyCSS: true,
minifyJS: true,
minifyURLs: true,
sortAttributes: true,
sortClassName: true,
removeComments: true
}}),
search()
],
markdown: {
extendDefaultPlugins: true,
remarkPlugins: [
filenamesPlugin,
repoDatesPlugin,
defaultLayoutPlugin,
remarkGemoji,
remarkMath,
remarkPluginOembed,
[remarkKroki, {
server: "http://kroki:8000",
alias: ["graphviz", "mermaid", "plantuml", "svgbob"],
output: "object-base64",
}]
],
rehypePlugins: [
rehypeKatex,
rehypeAccessibleEmojis,
rehypeRaw,
[rehypeRewrite, {
selector: ".kroki svg",
rewrite: rewriteKroki
}]
],
shikiConfig: {
theme: "dark-plus"
}
}
});