simologos / docusaurus-plugin-includes

Include plugin for Docusaurus.
MIT License
11 stars 5 forks source link

import mdx function doesn't work #3

Open kijung-iM opened 1 year ago

kijung-iM commented 1 year ago

Hello,

I am using this plugin just fine. thank you very much.

However, when using this plugin, the native mdx file import function in docusaurus does not work.

import Test from './test.mdx'

<Test />

Code like above is not rendering in html. I need to use that code instead of include. Required when passing a variable.

import Test from './test.mdx'

<Test name='ABCD' />

is it possible to modify?

kijung-iM commented 1 year ago

Hello,

I found a solution.

Thanks.

jlvandenhout commented 4 months ago

@kijung-iM Can you please provide the solution you found? It would really help others like me who have the same issue.

kijung-iM commented 4 months ago

@kijung-iM Can you please provide the solution you found? It would really help others like me who have the same issue.

Hello,

https://www.npmjs.com/package/@whatap-docs/docusaurus-plugin-includes

I forked the repository and modified the code to utilize it. When using this plugin, mdx files starting with '_import_' can be included using the import method.

The best way is to use the latest docusaurus version. https://docusaurus.io/blog/releases/3.2