0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/packages/integrations/markdoc/test/fixtures/render-with-components/markdoc.config.ts
Ben Holmes 90cfade88c
feat: automatic Markdoc partial resolution (#10649)
* wip: react counter example

* feat: resolve markdoc partials by file path

* test: components within partials

* test: html within partial

* chore: changeset

* fix: respect user configured partials

* test: basic partials

* chore: lock

* chore: fix lock

* chore: minor -> patch

* fix: use --parallel for dev server timeout error

* refactor: move component tests to separate file

* fix: build indent fixture

* fix: check before addWatchFile

* refactor: rootRelative -> relativePartial

* deps: use workspace react integration

* refactor: split test files by fixture

* refactor: switch to preact to avoid react prod build error

* feat: use vite pluginContext

* fix: handle missing ./

* chore: bump timeout
2024-04-03 16:48:53 -04:00

32 lines
729 B
TypeScript

import { Markdoc, component, defineMarkdocConfig } from '@astrojs/markdoc/config';
export default defineMarkdocConfig({
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'],
errorLevel: 'critical',
},
},
},
counter: {
render: component('./src/components/CounterWrapper.astro'),
},
'deeply-nested': {
render: component('./src/components/DeeplyNested.astro'),
},
},
});