How to auto import Components in Source Content folder? #1473
Unanswered
ManasMadrecha
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, we can use
components/contentfolder to write components that will be used in markdown files.But, that's not an optimum workflow especially when adding some component, which will be only used in a particular markdown file. It can be similar to Vitepress or Vuepress, but instead of writing javascript in md file, write it in nearby component, and just use it in md file.
So, it would be better to write such components alongside the markdown file itself (both in same folder inside
contentfolder), and then directly use that component inside the markdown file.So, how to auto import such component inside
contentfolder?I tried this in
nuxt.config.ts: (It doesn't work)It still gives this warning (if
md-hellocomponent (which is insidecontentfolder) is used anywhere in any markdown file)Beta Was this translation helpful? Give feedback.
All reactions