-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmarkdoc.config.mjs
67 lines (66 loc) · 1.47 KB
/
markdoc.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
import { defineMarkdocConfig, nodes, component } from "@astrojs/markdoc/config";
import shiki from "@astrojs/markdoc/shiki";
export default defineMarkdocConfig({
nodes: {
heading: {
...nodes.heading, // Apply defaults for other options
render: component("./src/components/Heading.astro"),
},
document: {
...nodes.document, // Apply defaults for other options
render: null, // default 'article'
},
image: {
...nodes.image,
render: component("./src/components/NveImage.astro"),
},
},
tags: {
section: {
render: component("./src/components/Section.astro"),
attributes: {
classname: { type: String },
},
},
spacer: {
render: component("./src/components/Spacer.astro"),
attributes: {
size: { type: Number },
},
},
diagram: {
render: component("./src/components/NveDiagram.astro"),
attributes: {
light: { type: String },
dark: { type: String },
alt: { type: String },
},
},
},
extends: [
shiki({
themes: {
dark: "material-theme-darker",
light: "light-plus",
},
langs: [
"astro",
"typescript",
"javascript",
"razor",
"csharp",
"json",
"yaml",
"css",
"scss",
"html",
"xml",
"markdown",
"bash",
"shell",
"powershell",
"plaintext",
],
}),
],
});