-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmarkdoc.config.js
44 lines (43 loc) · 1.12 KB
/
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
41
42
43
44
import { defineMarkdocConfig, component, nodes } from "@astrojs/markdoc/config";
import shiki from "@astrojs/markdoc/shiki";
import prism from "@astrojs/markdoc/prism";
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 },
},
},
youtube: {
render: component('@components/Youtube.astro'),
attributes: {
v: { type: String, required: true },
alt: { type: String, required: true },
},
},
},
extends: [
prism(),
],
});