Plugin: mdx-subset
A subset of functionality from the MDX project.
Status
🚧 Not implemented 🚧
Defining variables
export const x = 123
Referencing variables
## Lorem ipsum et {x}
Components
import { SomeComponent } from "./SomeComponent.tsx"
…
<SomeComponent … />
Plugin config
| runtime | null (default) or "preact 10.19.3" |
Example 1
import { SomeComponent } from "./SomeComponent.tsx"
export const fooval = 123
## Example
Here's an example where `foo` is {fooval}:
<SomeComponent foo={fooval} />
The result, without any client-side JS
…
Here's an example where <code>foo</code> is 123:
…the resulting HTML from evaluating SomeComponent with foo=123…
...with any required CSS being inlined in a style tag in the head, or included in an asset.
The result, with client-side Preact
…
Here's an example where <code>foo</code> is 123:
<div id="…"></div>
…
<script>
…
render(
SomeComponent({foo: 123}),
document.getElementById("…")
);
</script>