-
Notifications
You must be signed in to change notification settings - Fork 1
/
markdoc.config.ts
73 lines (72 loc) · 1.93 KB
/
markdoc.config.ts
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
import { defineMarkdocConfig, component } from "@astrojs/markdoc/config";
// 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
export default defineMarkdocConfig({
tags: {
video: {
render: component("./src/components/rich-text/video.astro"),
attributes: {
platform: { type: String, default: "youtube" },
id: { type: String },
},
},
callout: {
render: component("./src/components/rich-text/callout.astro"),
attributes: {
content: { type: String },
type: { type: String, default: "default" },
},
},
accordion: {
render: component("./src/components/rich-text/richtext-accordion.astro"),
attributes: {
items: {
type: Array,
},
type: { type: String, default: "default" },
},
},
stepper: {
render: component("./src/components/rich-text/stepper/stepper.astro"),
attributes: {
steps: {
type: Array,
},
orientation: {
type: String,
default: "vertical",
required: true,
matches: ["vertical", "horizontal"],
},
},
},
spoiler: {
render: component("./src/components/rich-text/spoiler.astro"),
attributes: {
content: { type: String },
},
},
relationshipCard: {
render: component("./src/components/rich-text/relationship-card.astro"),
attributes: {
card: {
type: Object,
// default: "none",
// required: true,
// matches: ["location", "doc", "none"],
},
},
},
clue: {
render: component("./src/components/rich-text/clue.astro"),
attributes: {
steps: {
type: Array,
},
},
},
},
});