-
Notifications
You must be signed in to change notification settings - Fork 0
/
markdoc.config.js
40 lines (39 loc) · 1009 Bytes
/
markdoc.config.js
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
import { defineMarkdocConfig, component, nodes } from "@astrojs/markdoc/config";
import shiki from "@astrojs/markdoc/shiki";
export default defineMarkdocConfig({
nodes: {
heading: {
...nodes.heading,
},
},
tags: {
imageLink: {
render: component("@components/ImagesRender.astro"),
attributes: {
link: { type: String, required: true },
alt: { type: String, required: true },
width: { type: String, required: true },
height: { type: String, required: true },
}
},
blockLatex: {
render: component("@components/BlockLatex.astro"),
attributes: {
formula: { type: String, required: true },
},
},
inlineLatex: {
render: component("@components/InlineLatex.astro"),
attributes: {
formula: { type: String, required: true },
},
},
},
extends: [
shiki({
langs: ["java", "python", "bash", "latex"],
wrap: true,
theme: "github-dark",
}),
],
});