-
Notifications
You must be signed in to change notification settings - Fork 194
Rendering HTML tables from Markdown #403
-
Couldn't find any info on this, but is it possible to generate tables defined inside MDX as Markdown tables? For ex., I have this table in my post and it isn't rendered as the HTML table in the output:
| Name | Type | Description |
| ---- | ---- | ----------- |
| `name` | string | Name of the resource |
| `path` | string | Path to the resource |
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 2 replies
-
Markdown doesn't support table syntax, but you can use remark-gfm to support it.
To be able to use remark/rehype plugins in Contentlayer, you can read it here.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
In the end I created a separate Table React component, which I then use inside the mdx.
Beta Was this translation helpful? Give feedback.
All reactions
-
hi @Clarity-89 can you please share more about your approach?
Beta Was this translation helpful? Give feedback.