Why is rendered content wrapped with <article>...</article>? #347
-
I notice that Markdoc wraps |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We chose this as the default behavior because we wanted the top-level transform to return a single render tree node. It can easily be changed by overriding the
|
Beta Was this translation helpful? Give feedback.
We chose this as the default behavior because we wanted the top-level transform to return a single render tree node. It can easily be changed by overriding the
document
node in your Markdoc configuration. If you wantMarkdoc.transform
to return an array that isn't wrapped in a tag (which Markdoc's React renderer will turn into aFragment
), you can use the following configuration: