-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
Add local remark plugin #1367
Comments
Here is a debug memo. Nuxt Content v2 dynamically content/src/runtime/server/transformers/markdown.ts Lines 25 to 38 in ede65e8
Nuxt Content v1 resolves aliases by resolver: content/packages/content/lib/utils.js Lines 58 to 83 in 776e428
|
@NozomuIkuta How to solve it then? |
@ManasMadrecha My solution is adding the custom Remark plugins as a npm module, you can check this repo for more detail. Refer to this stackoverflow answer. |
In the BlogiNote link you shared, we don't need to actually publish the plugin to npm, right? |
@ManasMadrecha yep, you're right |
@Benbinbin Amazing! BTW, your website's Table of Contents is just next level. It's magical... 😮👍🏻 |
Seems quite inconvenient for one-time, project-specific plugins. Is there not a syntax for importing local plugins? |
@innocenzi maybe the hook |
@Benbinbin But the hook content:file:afterParse works as only |
Are there news about this regression ? |
Environment
Windows_NT
v16.13.1
3.0.0-rc.6
npm@8.1.2
vite
app
,typescript
,modules
,colorMode
,content
@nuxt/content@2.1.0-27639343.b832f24
,@nuxtjs/tailwindcss@5.3.0
,@nuxtjs/color-mode@3.1.4
-
Reproduction
https://github.com/Benbinbin/nuxt-content-local-remark-plugin
Describe the bug
The former documentation show how to use the local remark plugin, like
~/markdownPlugins/remark-plugin.js
but the new documentation delete this part
when I use the same syntax which is mentioned at the old documentation
but then I get an error (see th Logs part 👇 ) it recognizes the local remark plugin file as a package?
maybe the old documentation just suitable for content v1, any new way to add local remark plugin for content v2?
Additional context
some relative issues about plugin:
Logs
The text was updated successfully, but these errors were encountered: