nolebase / integrations

✍️ A collection of diverse documentation engineering tools. Better reading experience, inline link preview, highlight targeted title, enhanced <mark> element, state-of-the-art SEO and <meta> generation, og image, thumbhash & blurhash images and more!
https://nolebase-integrations.ayaka.io
MIT License
143 stars 26 forks source link

Feature request: hope there is a toolkit that can be used in one click #309

Open litingyes opened 1 month ago

litingyes commented 1 month ago

Currently, if want to use multiple plugins, need to configure them one by one. It would be better if a plugin package was provided and multiple plugins could be inherited by default as long as it was installed.

nekomeowww commented 1 month ago

Thank you for the suggestion.

Actually I created one special package for such purpose under https://github.com/nolebase/integrations/tree/main/packages/unconfig-vitepress, however it wasn't released and still kept as private package for internal usage only just because I failed to think of a design to fit the use cases (such as allowing users to define vue, vite, markdown and VitePress configurations).

Perhaps, this is worth to become a dedicated project, that be able to handle various of different configurations of documentation SSG (for example both for Obsidian and VitePress)

litingyes commented 4 weeks ago

From the perspective of plugins, there are currently only three cases: vite/vue/md. Perhaps a similar form can be compromised, similar to but not like unplugin:

const {vitePlugin, vuePlugin, mdPlugin} = createNolebasePlugins({ ... })

Then just reference these three plugins in the corresponding places.

nekomeowww commented 4 weeks ago

Oh... right, what an amazing API you just made and designed!

Guess my thought was like dropped into a hole of local optimal hahaha, I was always thinking about wrapping the VitePress within Nolebase tools & configurations, and cannot find the best balance of them, over design!!!!

I think it's more clear, thanks to the ideas you just made. Would you like to implement it? (if you have the bandwidth) or I can make it happen during the weekend.

litingyes commented 4 weeks ago

You can implement it yourself, haha