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
-
Currently, we can use
components/content
folder 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
content
folder), and then directly use that component inside the markdown file.So, how to auto import such component inside
content
folder?I tried this in
nuxt.config.ts
: (It doesn't work)It still gives this warning (if
md-hello
component (which is insidecontent
folder) is used anywhere in any markdown file)Beta Was this translation helpful? Give feedback.
All reactions