Docs theme with additional Plugins | Adding MermaidJs to NuxtJs [Solved]
See original GitHub issueHello, i want to implement a vue-mermaid plugin inside my nuxt-docs app. Since the nuxt.config.js got exported I cant import plugins like
import theme from '@nuxt/content-theme-docs'
export default theme({
plugins: [
// https://yarnpkg.com/package/vue-mermaid#readme
'~/plugins/vue-mermaid.js'
],
})
The App tries then to open a plugin folder relative to the node_modules nuxt-docs-theme package…
Plugin not found: myApp\node_modules@nuxt\content-theme-docs\plugins\vue-mermaid.js
How to implement Plugins with this new architecture?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Adding additional Plugins to Docs Theme in Nuxt (forked)
TemplateAdding additional Plugins to Docs Tjeme in Nuxt; Environmentnuxt. Files. content. plugins. static .editorconfig .gitignore. README.md.
Read more >Mermaid JS Plugin - Discourse Meta
See the Mermaid JS site for documentation and more examples. ... requires you to add Mermaid JS to the <head> section of your...
Read more >How to create a global custom plugin in Nuxt.js
Cover two different options for building a custom global plugin for a Nuxt.js app, using both Vue and JavaScript.
Read more >Add Support for Rendering of Mermaid.js in Markdown Preview
Rest of my team uses VSCode and mermaid diagrams within markdown documents and I always had to copy them to a scratch file...
Read more >Release Notes - FastAPI
Add Portuguese translation for docs/pt/docs/deployment/docker.md . ... mkdocs for languages as a subprocess to fix/enable MkDocs Material search plugin.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I got it to work. Firstly we need MermaidJs npm i mermaid or yarn add mermaid
Secondly create a new Component in components>global
mermaid.vue
After that you can use it in your markdown
hint: between those <mermaid> tags should no empty lines!
In the end, it look like this
No plugin or nuxt.config.js configuration needed
Awesome! I will see to implement it into Docus 😃