forked from klalicki/portfolio-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
markdoc.config.mjs
131 lines (127 loc) · 3.86 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
import { defineMarkdocConfig, component, nodes } from "@astrojs/markdoc/config";
export default defineMarkdocConfig({
nodes: {
document: {
render: null, // default 'article'
},
strong: {
...nodes.strong,
render: component("./src/components/basicTags/bold.astro"),
},
em: {
...nodes.em,
render: component("./src/components/basicTags/italic.astro"),
},
s: {
...nodes.s,
render: component("./src/components/basicTags/strikethrough.astro"),
},
image: {
...nodes.image,
render: component(
"./src/components/pagebuilder/MarkdocImageReplace.astro"
),
},
},
tags: {
underline: {
render: component("./src/components/basicTags/underline.astro"),
},
CustomCSSWrapper: {
render: component("./src/components/pagebuilder/CustomCSSWrapper.astro"),
attributes: {
customCSS: { type: String },
customClass: { type: String },
},
},
FileLink: {
...nodes.link,
render: component("./src/components/pagebuilder/FileLink.astro"),
attributes: {
text: { type: String },
cssClass: { type: String },
filePath: { type: String },
},
},
Column: {
render: component("./src/components/pagebuilder/Column.astro"),
attributes: {
targetWidth: { type: String },
flexGrow: { type: Boolean },
customClass: { type: String },
},
},
HeroSection: {
render: component("./src/components/pagebuilder/HeroSection.astro"),
attributes: {
image: { type: String },
width: { type: String },
// panelWidth: { type: String },
showPanel: { type: Object },
height: { type: String },
parallax: { type: Boolean },
customClass: { type: String },
// panelColor: { type: String },
// textColor: { type: String }, customClass: { type: String },
},
},
ImageGallery: {
render: component("./src/components/pagebuilder/ImageGallery.astro"),
attributes: {
items: { type: Array },
options: { type: Object },
customClass: { type: String },
},
},
ImagePopout: {
render: component("./src/components/pagebuilder/ImagePopout.astro"),
attributes: {
image: { type: String },
altText: { type: String },
caption: { type: String },
customClass: { type: String },
},
},
CodeEmbed: {
render: component("./src/components/pagebuilder/CodeEmbed.astro"),
attributes: { content: { type: String } },
customClass: { type: String },
},
MultiColumn: {
render: component("./src/components/pagebuilder/MultiColumn.astro"),
attributes: {
justifyContent: { type: String },
flexDirection: { type: String },
alignItems: { type: String },
gap: { type: String },
customClass: { type: String },
},
},
SimpleMultiCol: {
render: component("./src/components/pagebuilder/SimpleMultiCol.astro"),
attributes: { customClass: { type: String } },
},
SimpleCol: {
render: component("./src/components/pagebuilder/SimpleCol.astro"),
attributes: { width: { type: Number }, customClass: { type: String } },
},
CustomWidth: {
render: component("./src/components/pagebuilder/CustomWidth.astro"),
attributes: {
width: { type: String },
customClass: { type: String },
},
},
aside: {
render: component("./src/components/Aside.astro"),
attributes: {
// Markdoc requires type defs for each attribute.
// These should mirror the `Props` type of the component
// you are rendering.
// See Markdoc's documentation on defining attributes
// https://markdoc.dev/docs/attributes#defining-attributes
type: { type: String },
},
},
},
});