vitejs / vite-plugin-react-pages

A vite framework for building react app. Especially suitable for document site and demos/playgrounds of react components.
https://vitejs.github.io/vite-plugin-react-pages/
MIT License
453 stars 70 forks source link

Can the default theme adopt vitepress? #147

Open duxphp opened 1 year ago

duxphp commented 1 year ago

vitepress nextjs are the same theme, support dark mode, want to customize the theme of vite-pages, but found that it is not as easy as the documentation says, too much logic associated with the request can use the theme by default

csr632 commented 1 year ago

too much logic associated with the request can use the theme by default

Do you mean some of the vite-pages feature can only used by the official theme? That is not true because vite-pages core doesn't provide any feature that is "official-theme-only". vite-plugin-react-pages doesn't know anything about vite-pages-theme-doc, it just provide some features and the official theme use them. You can checkout how the official theme render MDX and providing Demo and TsInfo features: https://github.com/vitejs/vite-plugin-react-pages/blob/596ccf3985a119195e56e073a7da30e7c45f57d3/packages/theme-doc/src/index.tsx#L79 . Other themes can do that too!

Nevertheless, I admit that it is difficult to build another complex theme like the default theme. Because it means building a fully extensible website framwork!

Currently I am focusing on making the official theme (and core use cases) better. Could you tell me what kind of feature do you want from vitepress? For example, dark mode? We can bring that to the official theme too :)