Skip to content
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

Nuxt 3 Support #67

Open
harlan-zw opened this issue Sep 11, 2023 · 5 comments
Open

Nuxt 3 Support #67

harlan-zw opened this issue Sep 11, 2023 · 5 comments
Assignees

Comments

@harlan-zw
Copy link
Contributor

harlan-zw commented Sep 11, 2023

Hey 👋 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!

@harlan-zw harlan-zw pinned this issue Sep 11, 2023
@pi0
Copy link
Member

pi0 commented Sep 11, 2023

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
Copy link

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
Copy link

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
Copy link

xarthurx commented May 14, 2024

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
Copy link

[...] 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:

  • nuxt-plugin: the main, single, markdown-it globally available instance. There is still room for improvement, in particular for loading the set of what I defined as the default plugins (if you don't need them you could simply disable each one in your nuxt.config).
  • composable: this one, although by default it uses the above plugin, it can be used to create a blank markdown-it instance without any of the default plugins. Useful for those projects that could require a mixed use of markdown-it-mdc and non.
  • component(s): currently there is only one component, the default one that does everything in one go and only accept simple markdown-it plugins. I'm in the process of adding a renderer component for those use cases where you need markdown-it plugins with options.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants