Open hunterliu1003 opened 2 years ago
What about having:
:code-block{src="~/components/content/MyComponent.vue"}
?
Sounds nice to me!😍
I think merely importing the text of any file (incl. components) can be done via already existing remark plugins.
I'm also interested in doing something with a snippet based approach.
Is it possible to extend the content query to add other "content types" - I'd really like to be able to query my code in a similar fashion.
A :code-block{file=abc.java,language=java}
would also be much appreciated.
You can check this module I've created, ideas came from https://vitepress.dev/guide/markdown#import-code-snippets
@phojie Lovely. Kindly ensure that the module even considers the fact that the files imported in markdown may reside not just in local PC. So, the module should modify the source to import the files from Nuxt cache.
@phojie Lovely. Kindly ensure that the module even considers the fact that the files imported in markdown may reside not just in local PC. So, the module should modify the source to import the files from Nuxt cache.
I'm not sure what you mean, please feel free to contribute or submit an issue to the repo thanks 😸
I have a component library that using nuxt content as the documentation. The documentaion has a lot of examples using
code-group
. Is that any way to avoid to copy entire file into the markdown?I wish nuxt content can provide similar markdown syntax to Import code snippets in Vitepress.
for example: