-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding compilation from HTML #101
Conversation
I just realized it might help if I added options for rehype-parse. I can add that in if desired! If you feel that this pull doesn't fit into the scope of this project, please feel free to close it. Thank you :D |
Huh... Well, my first thought is indeed that it doesn’t match this project: this feature is not about markdown and JSX 🤔 |
Input: HTML string My use case is I wanted to compile jupyter notebooks so I could use them as a blogging format for my statically generated website. Essentially, I'd iterate through the cells and generate the html using other unified pipeline stuff and then end up with a big HTML string. This is because Jupyter notebook cells all have different formats so I cant just pass it through one unified pipeline. With this full html string, I compile it with xdm into jsx which next js can render as a component. No worries if it doesn't fit in! :D just thought I'd try to contribute if you felt it was useful. Maybe a better option is to just turn this into a new project that is more focused around html compilation to jsx that just follows this project closely? |
Assuming you trust the content, why not use I’d be open to the idea but I think it’s a case that few people care about, whereas it’ll hurt many users. |
That makes sense! I agree with your concern with the bundle size of rehype-parse, probably not worth adding it in for people who don't need this functionality. I failed to mention earlier that I am actually using the components passing and the layout function of XDM which is one of the main motivations for using this in this way, and why I'm not just using Thank you! |
It’s a pretty interested idea though. You might want to publish it. You could also maybe use xdm as a dependency as use the plugins from here instead of a hard fork? They’re not exposed from |
That's a great idea! I'll go ahead and do that! I can import what I need as you mentioned and publish it separately. Thanks for the help and suggestions! 👍🏼 Also, thanks for all of your work on unified! |
Hi there!
Thank you for making this package! It has been extremely useful 😄
Not sure if this fits into the scope of this package, but my use case required an HTML string to be compiled and not just MDX. I haven't really found another package that would do that, so after looking through the source of this one -- it felt like a natural fit since I only really needed to edit the unified pipeline and it worked perfectly.