-
Notifications
You must be signed in to change notification settings - Fork 0
/
Renderer.astro
45 lines (41 loc) · 938 Bytes
/
Renderer.astro
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
---
import { MarkdocRenderer } from 'astro-markdoc-renderer'
import type { Content } from 'astro-markdoc-renderer'
import YouTubeEmbed from './YouTubeEmbed.astro'
import TweetEmbed from './TweetEmbed.astro'
import CodePenEmbed from './CodePenEmbed.astro'
import GitHubGistEmbed from './GitHubGistEmbed.astro'
import CodeBlock from './CodeBlock.astro'
import Heading from './Heading.astro'
type Props = {
content: Content
}
const { content } = Astro.props
const components = {
Heading: {
Component: Heading,
props: {},
},
CodeBlock: {
Component: CodeBlock,
props: {},
},
YouTubeEmbed: {
Component: YouTubeEmbed,
props: {},
},
TweetEmbed: {
Component: TweetEmbed,
props: {},
},
CodePenEmbed: {
Component: CodePenEmbed,
props: {},
},
GitHubGistEmbed: {
Component: GitHubGistEmbed,
props: {},
},
}
---
<MarkdocRenderer content={content} components={components} />