nuxt-community / markdownit-module

Markdownit for Nuxt 2
MIT License
48 stars 11 forks source link

Nuxt 3 Support #67

Open harlan-zw opened 9 months ago

harlan-zw commented 9 months ago

Hey :wave: It looks like this module hasn't been updated for Nuxt 3. In an effort to improve the developer experience of modules, I've updated the module to clarify that it only supports Nuxt 2.

If Nuxt 3 support is added it will be moved to the https://github.com/nuxt-modules organisation.

Alternatives:

@pi0 Is Nuxt 3 support something you have planned? If not, perhaps we can deprecate this module.

Please let us know and thanks for your work!

pi0 commented 9 months ago

I would be happy for you if you like to port it to Nuxt 3. (you might need to also pick on markdownit-loader and port it to an unplugin)

xarthurx commented 9 months ago

There's a solution on Stack Overflow which does not need any additional support from Nuxt 3:

https://stackoverflow.com/questions/75743246/nuxt3-how-to-display-markdown-content-as-html-tags

Sandros94 commented 2 months ago

So, ehm... I only now discover the existance oh this module, months after I started putting together a concept and release for a battery included nuxt markdown-it module (nuxt-markdown-render).

I'm willing to join forces: either migrating here some of the knowledge I built so far or deprecating this one and move the other. My plan is to actively maintain it in the long term regardless.

P.S.: the naming of nuxt-markdown-render was mainly to follow the vue-markdown-render package package name, since that one is the one that inspired me

xarthurx commented 1 month ago

So, ehm... I only now discover the existance oh this module, months after I started putting together a concept and release for a battery included nuxt markdown-it module (nuxt-markdown-render).

I'm willing to join forces: either migrating here some of the knowledge I built so far or deprecating this one and move the other. My plan is to actively maintain it in the long term regardless.

P.S.: the naming of nuxt-markdown-render was mainly to follow the vue-markdown-render package package name, since that one is the one that inspired me

I breifly checked your plugin, indeed a lot of effort. However, IMHO, I don't think it make sense to wrap it again over markdown-it, as the markdownit system is already established and has a lot of plugins.

Correct me if I'm wrong -- your vue-markdown-render work as a wrapper of markdownit, and to use additional plugins for markdownit, we need to learn another set of grammars... if there aren't any essential functionality (I don't see it by quick checking), it will probably make the ecosystem more fragmented.

Personally, I would prefer a port of markdownit to the Nuxt3 framework to sth that wraps it again...

Sandros94 commented 1 month ago

[...] your vue-markdown-render [...]

I imagine you were referring to nuxt-markdown-rendere, since the vue- one isn't my work. It is where I took inspiration from tho.

[...] and to use additional plugins for markdownit, we need to learn another set of grammars.. [...]

I'm not entirely sure if I'm following you here: with the term wrapper I mean that I expose a markdown-it instance with some configuration provided from your nuxt.config.ts and from there you could expand it further via its ecosystem as you normally would.

Although this might not be the correct place to describe it, I would like to do so just to gather some more external opinions. The current nuxt-markdown-render structure is:

Personally, I would prefer a port of markdownit to the Nuxt3 framework to sth that wraps it again...

I see it differently tho: porting a project would require you to be on par with its API and updates, requiring much more time and effort (surely there are uses and advantages in doing so), but for a smaller side project this isn't much suited. While by wrapping (and not hardcoding) it is possible to provide the full functionalities until there are upstream breaking changes that requires to be taken care of.

I breifly checked your plugin, indeed a lot of effort.

Thanks! It started as both a tool for couple of projects I was working on, as well as a learning place for topics I didn't feel strong enough yet.