From 3a50cc3590c159525f3feef219c5565f3d2b8fae Mon Sep 17 00:00:00 2001 From: Dongjoon Lee Date: Mon, 24 Oct 2022 22:09:07 +0900 Subject: [PATCH] Add Solid to JSX section in Getting Started guide Closes GH-2159. Reviewed-by: Titus Wormer --- docs/docs/getting-started.server.mdx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/docs/getting-started.server.mdx b/docs/docs/getting-started.server.mdx index 4138eee21..24d4ed5d3 100644 --- a/docs/docs/getting-started.server.mdx +++ b/docs/docs/getting-started.server.mdx @@ -124,6 +124,10 @@ your JSX runtime. * If you’re using **Theme UI**, install and configure [`@mdx-js/react`][mdx-react]. Then wrap your MDX content in a `` +* If you’re using **Solid**, + install [`solid-jsx`][solid-jsx]. + Set [`options.jsxImportSource`][options-jsximportsource] to + `'solid-jsx'`. Other JSX runtimes are supported by setting [`options.jsxImportSource`][options-jsximportsource]. @@ -134,6 +138,7 @@ For more info on the aforementioned tools, please see their dedicated sections: [¶ Emotion][emotion], [¶ Preact][preact], [¶ React][react], +[¶ Solid][solid], [¶ Svelte][svelte], [¶ Theme UI][themeui], or [¶ Vue][vue]. @@ -857,6 +862,24 @@ for context based component passing. See also [¶ Vite][vite] and [¶ Vue CLI][vue-cli], which you might be using, for more info. +#### Solid + +
+ Expand example + + ```js path="example.js" + import {compile} from '@mdx-js/mdx' + + const js = String(await compile('# hi', {jsxImportSource: 'solid-jsx', /* otherOptions… */})) + ``` +
+ +Solid is supported when [`options.jsxImportSource`][options-jsximportsource] is +set to `'solid-jsx'`. + +See also [¶ Vite][vite] and [¶ Rollup][rollup] which you might be using, for +more info. + ### JavaScript engines #### Node.js @@ -875,6 +898,8 @@ See their readmes on how to configure them. [@next/mdx]: https://github.com/vercel/next.js/tree/canary/packages/next-mdx +[solid-jsx]: https://github.com/high1/solid-jsx + [svelte-jsx]: https://github.com/kenoxa/svelte-jsx [jsx]: #jsx @@ -941,6 +966,8 @@ See their readmes on how to configure them. [snowpack]: #snowpack +[solid]: #solid + [svelte]: #svelte [themeui]: #theme-ui