automd icon indicating copy to clipboard operation
automd copied to clipboard

How to used with VitePress ?

Open productdevbook opened this issue 1 year ago • 1 comments

Describe the feature

Is there a structure on how to integrate and use Vitepress? Thank you.

Additional information

  • [ ] Would you be willing to help implement this feature?

productdevbook avatar Feb 25 '24 12:02 productdevbook

Hi. Here it is how i used transform API for undocs: https://github.com/unjs/undocs/blob/main/app/modules/content/runtime/unstorage.mjs#L39

We somehow need to modify markdown before being rendered. I found this docs: https://vitepress.dev/reference/default-theme-search#example-transforming-content-adding-anchors

If had some luck to make it working, feel free to make a PR to the docs 👍🏼 (you might even finally make a vitepress plugin so wish you best!)


Also as a lazy alternative you can run npx automd --input "docs/**/*.md" --watch in another CLI 😆

pi0 avatar Feb 25 '24 12:02 pi0