summaryrefslogtreecommitdiff
path: root/packages/integrations/markdoc/test/fixtures/render-with-extends-components/markdoc.config.ts
blob: 8daba3746d0a249b8c93a0909a30e7a02e1870e8 (plain) (blame)
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
import { component, defineMarkdocConfig } from '@astrojs/markdoc/config';

export default defineMarkdocConfig({
	extends: [preset()],
});

function preset() {
	return {
		nodes: {
			fence: {
				render: component('./src/components/Code.astro'),
				attributes: {
					language: { type: String },
					content: { type: String },
				},
			},
		},
		tags: {
			'marquee-element': {
				render: component('./src/components/CustomMarquee.astro'),
				attributes: {
					direction: {
						type: String,
						default: 'left',
						matches: ['left', 'right', 'up', 'down'],
					},
				},
			},
		},
	}
}