A Link in Markdown automatically has a rel="nofollow noopener noreferrer"
Environment
- Operating System:
Darwin - Node Version:
v14.15.0 - Nuxt Version:
2.15.8 - Nitro Version:
- - Package Manager:
[email protected] - Builder:
webpack - User Config:
target,generate,head,css,plugins,components,buildModules,modules,cookies,content,build,sitemap,publicRuntimeConfig - Runtime Modules:
@nuxt/[email protected],~/modules/nuxt-cookie-control-master,@nuxtjs/[email protected] - Build Modules:
-
Reproduction
n.a.
Describe the bug
A Link in Markdown automatically has a rel="nofollow noopener noreferrer". However I expect that all links are "follow links" and only are "nofollow noopener noreferrer links" when I state this in the markdown.
Used markdown:
[Link Text](https://yourwebsite.com/)
Additional context
No response
Logs
No response
You can update the ProseA component if you want to update behavior!
The first paragraph describes how you override content components
~~Here is the source of ProseA~~
<NuxtLink> defaults to "noopener noreferrer" for external links
I think this behavior should be changed to not alter rel by default - people could easily customize it via ProseA.
Okay, apparently this comes from the 'rehype-external-links' plugin which is enabled by default. It can be disabled via config:
content: {
markdown: {
rehypePlugins: {
'rehype-external-links': false,
}
},
},
Okay, apparently this comes from the
'rehype-external-links'plugin which is enabled by default. It can be disabled via config:content: { markdown: { rehypePlugins: { 'rehype-external-links': false, } }, },
Is it still working? It is not for me.
This worked for me:
mdc: {
// removing rel="nofollow" from links
rehypePlugins: {
"rehype-external-links": {
options: {
rel: ["external"]
}
}
},
}
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity.