-
Notifications
You must be signed in to change notification settings - Fork 5
/
markdoc.config.js
49 lines (48 loc) · 1.35 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
45
46
47
48
49
import { component, defineMarkdocConfig, nodes } from "@astrojs/markdoc/config";
export default defineMarkdocConfig({
nodes: {
fence: {
attributes: { ...nodes.fence.attributes, title: { type: String, render: "title" } },
render: component("./src/components/content/Code.astro"),
},
blockquote: {
attributes: { ...nodes.blockquote.attributes, title: { type: String, render: "title" } },
render: component("./src/components/content/Blocknote.astro"),
},
link: {
attributes: nodes.link.attributes,
render: component("./src/components/ExternalLink.astro"),
},
list: {
attributes: nodes.list.attributes,
render: component("./src/components/content/List.astro"),
},
},
tags: {
blockquote: {
attributes: {
title: { type: String, render: "title" },
block: { type: Boolean, default: true },
},
render: component("./src/components/content/Blocknote.astro"),
},
image: {
attributes: {
...nodes.image.attributes,
src: { type: String },
figureProps: { type: Object },
},
children: ["text"],
render: component("./src/components/content/Image.astro"),
},
dinkus: {
render: component("./src/components/content/Dinkus.astro"),
},
sidenote: {
attributes: {
direction: { type: String, default: "right" },
},
render: component("./src/components/content/Sidenote.astro"),
},
},
});