Interpolate variables in the MDX
See original GitHub issueThank you all for Docusaurus, it’s really easy and understandable 🙌
💥 Proposal
Following the https://github.com/facebook/docusaurus/issues/395#issuecomment-925703543 we are really need ability to interpolate variables in MDX markup of *.md files.
For example:
const data = "azaza";
// we wish this:
'''jsx
const data = "{data}";
'''
// to become:
'''jsx
const data = "azaza";
'''
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
MDX: Markdown for the component era
MDX allows you to use JSX in your markdown content. You can import components, such as interactive charts or alerts, and embed them...
Read more >mdx-variables - npm
A package for reading variables from .mdx files. ... Start using mdx-variables in your project by running `npm i mdx-variables`.
Read more >MDX and React - Docusaurus
Within the MDX page, the following variables are available as globals: frontMatter : the front matter as a record of string keys and...
Read more >Execution Context of a Query and Interpolation Strings
There are situations where you may need to replace an interpolation variable with the value provided in the query only if this value...
Read more >ASAM MDX - Wiki
Aggregates exactly one <SW-SYSTEM>, which is used to describe the software inside of an ECU. <SW-INTERFACE-MAPPINGS>. Map interface variables or software ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@slorber thanks a lot, you save my day!
No official example I actually tried to share but I guess this could be an example: https://github.com/angeloashmore/gatsby-remark-find-replace/blob/master/src/index.js
(just found this with Google)