You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following up the extraction of the MDX parser into a dedicated generator that converts the plain Markdown into an MDX template, we should compile it into React.
This effectively introduces the react and mdx dependencies into the project. Proper ESLint and Prettier configuration for React and JSX should be added. This can be done by importing compatible rules from the Node.js Website repository.
This generator should pretty much receive the content transformed into an MDX template from the mdx generator; the MDX generator returns a VFile, with the caveat that the main content is now replaced with the MDX template, but both the metadata and file metadata remain in the VFile.
Hence, this generator's output is again a VFile containing the source content and the generated JSX function within the data attribute.
Note that the generated React is simply the content of the page, not the whole page (navigation, header, etc.). Think of this as the inner content of a blog post.
The text was updated successfully, but these errors were encountered:
Following up the extraction of the MDX parser into a dedicated generator that converts the plain Markdown into an MDX template, we should compile it into React.
This effectively introduces the
react
andmdx
dependencies into the project. Proper ESLint and Prettier configuration for React and JSX should be added. This can be done by importing compatible rules from the Node.js Website repository.This generator should pretty much receive the content transformed into an MDX template from the
mdx
generator; the MDX generator returns a VFile, with the caveat that the main content is now replaced with the MDX template, but both the metadata and file metadata remain in the VFile.Then the
mdx-react
receives that VFile and pretty much compiles the MDX and evaluates it into JSX by running it with MDX https://mdxjs.com/packages/mdx/#evaluatefile-optionsHence, this generator's output is again a VFile containing the source content and the generated JSX function within the data attribute.
Note that the generated React is simply the content of the page, not the whole page (navigation, header, etc.). Think of this as the inner content of a blog post.
The text was updated successfully, but these errors were encountered: