Skip to content

[Feature] Rax and Mdx #2276

@citrus327

Description

@citrus327

Mdx is a way to write React(or jsx) code in markdown, it can be used with remark/rehype plugins, which is a huge ecosystem.

I've checked some source code of our component document demo implementation, which separate each coding blocks using Regex, then compile them and combine the raw markdown part(using marked). This approach is a bit hacky.

I think embracing unified ecosystem is such a nice move in the future.

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like

  1. Provide 'rax/jsx-runtime' exactly like React did in the new jsx transforming. For speed and for bundle size.
    MDX support custom jsx runtime: https://v2.mdxjs.com/packages/mdx/#optionsjsxruntime
  2. Provide more remark/rehype plugins to fit the need.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions