`)\r\n\r\nI'm currently working on migrating and documenting the excellent Spectre CSS docs and am using Vitepress.\r\n\r\nI'm developing an ejected and modified default theme which has already come some way to solving this problem:\r\n\r\n- [original](https://picturepan2.github.io/spectre/components/menu.html) (custom app)\r\n- [migrated](https://spectre-org.github.io/spectre-docs/docs/components/menu.html) (VitePress with modified default theme)\r\n - note the `vp-doc` formatting which is all Spectre CSS\r\n - some fixed, and some not-yet fixed clashes of general class names\r\n\r\nFor reference to the use case (documenting a 3rd-party framework) here is the raw markdown page:\r\n\r\n- https://raw.githubusercontent.com/spectre-org/spectre-docs/main/docs/components/menu.md\r\n\r\nNote that:\r\n\r\n- Spectre CSS (or any other 3rd-party CSS framework) is now able to be simply \"dropped in\"\r\n- there is no pollution between VitePress and the 3rd-party framework\r\n- VitePress' default components remain fully-styled and work as they were before\r\n- `vp-doc` content can be safely used to demo any 3rd party HTML elements and classes\r\n\r\nI think I know enough to fix the problems in my modified theme and either:\r\n\r\n- publish a new \"neutral\" theme\r\n- port the changes to the default theme (ideal outcome)\r\n\r\nThere's actually not that much work; it's:\r\n\r\n- renaming the general component classes\r\n- moving some `vp-doc` classes to other locations\r\n- creating an additional unstyled entrypoint such as `without-formatting`\r\n\r\n### Describe alternatives you've considered\r\n\r\nPublishing the modified theme standalone, but then of course it would not benefit from ongoing updates.\r\n\r\n### Additional context\r\n\r\nI am proposing a PR in the coming weeks to integrate these updates.\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.dev).\r\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[2867],{"name":2868,"color":2869},"stale","ededed",3021,"vuejs","vitepress","open","Make the default theme compatible with 3rd-party CSS frameworks","2023-11-06T14:43:58Z","https://github.com/vuejs/vitepress/issues/3021",0.70460546,{"description":2879,"labels":2880,"number":2881,"owner":2871,"repository":2872,"state":2882,"title":2883,"updated_at":2884,"url":2885,"score":2886},"i want use vitepress become a ui component display website. so i import my sfc in enhanceApp. But at meantime i must config my own `Layout.vue` and `notfound.vue` component. That is not what i want. i liked defaulte theme (vuepress old player) very mush. \r\n\r\n```js\r\nimport Layout from '/@theme/Layout.vue';\r\nimport Helloworld from \"../components/index\"\r\n\r\nexport default {\r\n Layout,\r\n // NotFound,\r\n enhanceApp({ app, router, siteData }) {\r\n app.use(Helloworld) \r\n }\r\n}\r\n```\r\n\r\ni think `@theme/index` should not config default layout and enhanceApp at same time or in the same file. or at least it must follow `Convention over configuration` rule.\r\n\r\nif follow [vuepress default theme file system](https://github.com/vuejs/vuepress/tree/master/packages/%40vuepress/theme-default) and `Convention over configuration`, it will be better\r\n\r\nmaybe use `@theme/layouts/`, `@theme/components/`\r\n\r\nand here is a bug, when a create emptyfile `theme` in `.vitepress` .it will crash",[],58,"closed","want more flexibility in the customization part","2023-01-21T16:20:20Z","https://github.com/vuejs/vitepress/issues/58",0.66846687,{"description":2888,"labels":2889,"number":2893,"owner":2871,"repository":2872,"state":2882,"title":2894,"updated_at":2895,"url":2896,"score":2897},"\u003C!--\r\nNOTE:\r\nVitePress is still WIP, and it is not compatible with VuePress.\r\nPlease do not open issue about default theme missing features or something doesn't work like VuePress.\r\n-->\r\n\r\n**Describe the bug**\r\nThe SideBar.js and NavBar.js components still reference `__DEV__` and should be replaced with `import.meta.env.DEV` to work with 0.4.0\r\n\r\n**To Reproduce**\r\nUse the default theme with 0.4.0\r\n\r\n**Expected behavior**\r\nNavBar and SideBar should not throw __DEV__ not defined errors\r\n\r\n**System Info**\r\n- vitepress version: 0.4.0\r\n- vite version: v1.0.0-beta.2\r\n- Node version:\r\n- OS version:\r\n\r\n**Additional context**\r\nAdd any other context about the problem here.\r\n",[2890],{"name":2891,"color":2892},"bug: pending triage","e99695",28,"Sidebar Navbar break on 0.4.0","2023-01-21T16:25:39Z","https://github.com/vuejs/vitepress/issues/28",0.67570686,{"description":2899,"labels":2900,"number":2901,"owner":2871,"repository":2872,"state":2882,"title":2902,"updated_at":2903,"url":2904,"score":2905},"\u003C!--\r\nNOTE:\r\nVitePress is still WIP, and it is not compatible with VuePress.\r\nPlease do not open issue about default theme missing features or something doesn't work like VuePress.\r\n-->\r\n\r\n**Describe the bug**\r\nWhen using a custom theme, importing composables like `useRoute` from `\"vitepress\"` in the Layout component also imports the styles for the default theme.\r\n\r\n**To Reproduce**\r\n\r\n1. Follow the [Getting Started guide](https://vitepress.vuejs.org/guide/getting-started.html) to create a new site\r\n2. Create `docs/.vitepress/theme/Layout.vue` with the following contents:\r\n\r\n```vue\r\n\u003Ctemplate>\r\n \u003CContent />\r\n\u003C/template>\r\n\r\n\u003Cscript setup>\r\n// import { useRoute } from \"vitepress\";\r\n// const route = useRoute();\r\n\u003C/script>\r\n```\r\n\r\n3. Create `docs/.vitepress/theme/index.js` with the following contents:\r\n\r\n```js\r\nimport Layout from \"./Layout.vue\";\r\n\r\nexport default {\r\n Layout,\r\n};\r\n```\r\n\r\n4. Run `yarn docs:dev` and open http://localhost:3000. Note the heading doesn't have any styles applied to it:\r\n\r\n\r\n\r\n5. Uncomment the lines in the `\u003Cscript setup>` section in `docs/.vitepress/theme/Layout.vue`. Note the heading now has the default styles applied to it, even though we only imported `useRoute`:\r\n\r\n\r\n\r\n**Expected behavior**\r\nThe heading should remain unstyled since we aren't explicitly importing any styles.\r\n\r\n**System Info**\r\n- vitepress version: v0.9.2\r\n- vite version: v1.0.0-rc.13\r\n- Node version: v12.20.0\r\n- OS version: macOS Catalina 10.15.7\r\n\r\n**Additional context**\r\nI had a quick look at the Vitepress code and it looks like the problem might be to do with this line: https://github.com/vuejs/vitepress/blob/309aa7a8d0e7ab08c1c9db258c74709a66b295cb/src/client/app/exports.ts#L29\r\n\r\nAdding the following to `docs/.vitepress/config.js`:\r\n\r\n```javascript\r\nmodule.exports = {\r\n alias: {\r\n \"/@default-theme/index\": \"/@theme/empty.js\",\r\n },\r\n};\r\n```\r\n\r\n...and creating an empty file `docs/.vitepress/theme/empty.js` prevents the default styles being applied.\r\n",[],182,"Importing default composables also imports default theme's styles","2023-01-21T16:23:59Z","https://github.com/vuejs/vitepress/issues/182",0.68059444,{"description":2907,"labels":2908,"number":2909,"owner":2871,"repository":2872,"state":2882,"title":2910,"updated_at":2911,"url":2912,"score":2913},"### Is your feature request related to a problem? Please describe.\r\n\r\nRight now (unless I'm not understanding the correct method) it seems difficult to override core theme componentry. Say I want to edit the NavBar template; I have to either write a completely new implementation from scratch (sacrificing a lot of features built in to the framework like the hamburger menu, and the configurable data expressed to navbar links, logo image, site title, etc. This seems to be because those components are part of the core library and not exported anywhere to be reused, so there's a big block of reused components like\r\n```\r\n\u003CVPNavBarSearch class=\"search\" />\r\n\u003CVPNavBarMenu class=\"menu\" />\r\n\u003CVPNavBarTranslations class=\"translations\" />\r\n\u003CVPNavBarAppearance class=\"appearance\" />\r\n\u003CVPNavBarSocialLinks class=\"social-links\" />\r\n\u003CVPNavBarExtra class=\"extra\" />\r\n\u003Cslot name=\"nav-bar-content-after\" />\r\n\u003CVPNavBarHamburger class=\"hamburger\" :active=\"isScreenOpen\" @click=\"$emit('toggle-screen')\" />\r\n```\r\nand those would either have to be copied and/or reimplemented inside my project if all I wanted to do, for example, was put the site title/logo in the middle of the navbar instead of the left side.\r\n\r\n### Describe the solution you'd like\r\n\r\nI'm still learning Vue, but it seems like if these core theme components could be exported from the vitepress library, they could be imported instead of reimplemented if all I wanted to do was copy the NavBar template and edit it a bit.\r\n\r\n### Describe alternatives you've considered\r\n\r\nThe alternative right now seems to be either copying all these theme files into my project, reimplementing them, or not using them and sacrificing their utility.\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.dev).\r\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],2976,"Easier Overriding of Internal Components","2023-10-03T00:04:19Z","https://github.com/vuejs/vitepress/issues/2976",0.6833806,{"description":2915,"labels":2916,"number":2917,"owner":2871,"repository":2872,"state":2882,"title":2918,"updated_at":2919,"url":2920,"score":2921},"**Is your feature request related to a problem? Please describe.**\r\nCurrently there seems to be no way to extend the Vite config used by vitepress (or at least it's not clear how to do it).\r\nIt would be great to have that ability to specify aliases that are used inside of components that are not part of VitePress.\r\n\r\nIn our case we have a component library in `src`, and the docs in `docs`, but components imported in VitePress use `#components/button` imports (for example) and VitePress can't resolve those as there's no way to set up aliases for it.\r\n\r\n**Describe the solution you'd like**\r\nA way to extend vite config and/or specify aliases.\r\n\r\n**Describe alternatives you've considered**\r\nI tried creating a vite config in the root, but that prevents TS based SFC's from compiling properly (I think it overwrites the internal config).\r\n\r\n**Additional context**\r\nA quick screenshot of our setup:\r\n\r\n\r\n`docs/.vitepress` hosts VitePress, but the root is Vite itself (library mode).",[],241,"Ability to extend vite config","2023-01-21T14:20:28Z","https://github.com/vuejs/vitepress/issues/241",0.6855704,{"description":2923,"labels":2924,"number":2925,"owner":2871,"repository":2872,"state":2882,"title":2926,"updated_at":2927,"url":2928,"score":2929},"Is Vitepress's config.js the same as Vuepress's? How do I configure nav and sidebar for vitepress",[],213,"About the config. Js !","2023-01-21T16:24:02Z","https://github.com/vuejs/vitepress/issues/213",0.68681085,{"description":2931,"labels":2932,"number":2933,"owner":2871,"repository":2872,"state":2882,"title":2934,"updated_at":2935,"url":2936,"score":2937},"How to do theme inheritance like VuePress in VitePress\r\n\r\nVuePress docs: https://vuepress.vuejs.org/theme/inheritance.html\r\n\r\nI would like to inherit the theme-default and change some component.\r\n\r\nThanks.",[],2102,"How to inherit theme","2023-03-17T13:23:25Z","https://github.com/vuejs/vitepress/issues/2102",0.69379693,{"description":2939,"labels":2940,"number":2942,"owner":2871,"repository":2872,"state":2882,"title":2943,"updated_at":2944,"url":2945,"score":2946},"### Is your feature request related to a problem? Please describe.\r\n\r\nI’m trying to customize a blog theme to display a 'tags' page\r\n\r\n### Describe the solution you'd like\r\n\r\nhoping the route can be shown as something like 'https://a.com/tags/', and I want to achieve this in VitePress without needing to create a markdown file.\r\n\r\n### Describe alternatives you've considered\r\n\r\n\r\nI once considered using onBeforePageLoad to modify data in the router, such as title, frontmatter, component, and isNotFound, but I thought it might not be the best solution.\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.dev).\r\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[2941],{"name":2868,"color":2869},4080,"Questions about routing hops in custom topics","2025-05-05T10:54:52Z","https://github.com/vuejs/vitepress/issues/4080",0.6945454,{"description":2948,"labels":2949,"number":2950,"owner":2871,"repository":2872,"state":2882,"title":2951,"updated_at":2952,"url":2953,"score":2954},"### Is your feature request related to a problem? Please describe.\n\nI'm working on a vitepress site that uses a custom theme. Some time ago, another contributor added local search to the site.\r\nHe did this by enabling search in the config and then importing the `VPNavBarSearch` from `vitepress/dist/client/theme-default/components/VPNavBarSearch.vue`\r\n\r\nThis works. However, I don't believe it's best practice. The thing that is particularly annoying is that it generates a bunch of typescript errors and I'm hoping to get my docs build to be typescript clean and enforce that. The typescript team seems adamantly against enabling the kind of error supression that would enable this scenario and reinforces the concept that they don't believe importing *.ts files (presumably this includes *.vue files with script = \"ts\") in this issue: https://github.com/microsoft/TypeScript/issues/40426\n\n### Describe the solution you'd like\n\nOne possible solution is for VitePress to export `VPNavBarSearch` and possibly other related components.\r\nI monkey patched vitepress to export the component `VPNavBarSearch` and then added it to the normal imports from vitepress e.g. `import { ..., VPNavBarSearch, ...} from 'vitepress'` to prove to myself that this works, including getting rid of the typescript error.\n\n### Describe alternatives you've considered\n\nThe other alternative I briefly explored was moving to use the default theme with customizations, but the default Layout doesn't do everything that I'd like, even with liberal use of the slots.\r\n\r\n(Most) of the reason the typescript is complaining is that I have noexplicit any set and it looks like vitepress doesn't, so it might be possible to make the vitepress components comply with stricter typescript config and have the direct import work, but I think this is a less desireable solution, since as noted above the typescript team doesn't believe this kind of import is best practice.\n\n### Additional context\n\nI've pasted the errors I'm seeing below. If you want to reproduce them:\r\n\r\nCreate a vitepress site with a custom theme and Layout.vue file\r\nAdd the line `import VPNavBarSearch from 'vitepress/dist/client/theme-default/components/VPNavBarSearch.vue`\r\n\r\n```\r\nnode_modules/vitepress/dist/client/theme-default/components/VPAlgoliaSearchBox.vue:6:25 - error TS7016: Could not find a declaration file for module '../composables/data'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/theme-default/composables/data.js' implicitly has an 'any' type.\r\n\r\n6 import { useData } from '../composables/data'\r\n ~~~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:2:30 - error TS2307: Cannot find module '@localSearchIndex' or its corresponding type declarations.\r\n\r\n2 import localSearchIndex from '@localSearchIndex'\r\n ~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:13:18 - error TS7016: Could not find a declaration file for module 'mark.js/src/vanilla.js'. 'C:/Projects/bootstrap-vue-next/node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/vanilla.js' implicitly has an 'any' type.\r\n Try `npm i --save-dev @types/mark.js` if it exists or add a new declaration (.d.ts) file containing `declare module 'mark.js/src/vanilla.js';`\r\n\r\n13 import Mark from 'mark.js/src/vanilla.js'\r\n ~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:30:28 - error TS7016: Could not find a declaration file for module '../../app/utils'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/app/utils.js' implicitly has an 'any' type.\r\n\r\n30 import { pathToFile } from '../../app/utils'\r\n ~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:31:30 - error TS7016: Could not find a declaration file for module '../../shared'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/shared.js' implicitly has an 'any' type.\r\n\r\n31 import { escapeRegExp } from '../../shared'\r\n ~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:32:25 - error TS7016: Could not find a declaration file for module '../composables/data'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/theme-default/composables/data.js' implicitly has an 'any' type.\r\n\r\n32 import { useData } from '../composables/data'\r\n ~~~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:33:26 - error TS7016: Could not find a declaration file for module '../support/lru'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/theme-default/support/lru.js' implicitly has an 'any' type.\r\n\r\n33 import { LRUCache } from '../support/lru'\r\n ~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:34:39 - error TS7016: Could not find a declaration file for module '../support/translation'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/theme-default/support/translation.js' implicitly has an 'any' type.\r\n\r\n34 import { createSearchTranslate } from '../support/translation'\r\n ~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:48:17 - error TS2339: Property 'hot' does not exist on type 'ImportMeta'.\r\n\r\n48 if (import.meta.hot) {\r\n ~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:49:15 - error TS2339: Property 'hot' does not exist on type 'ImportMeta'.\r\n\r\n49 import.meta.hot.accept('/@localSearchIndex', (m) => {\r\n ~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:49:49 - error TS7006: Parameter 'm' implicitly has an 'any' type.\r\n\r\n49 import.meta.hot.accept('/@localSearchIndex', (m) => {\r\n ~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:10:35 - error TS7016: Could not find a declaration file for module '../../shared'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/shared.js' implicitly has an 'any' type.\r\n\r\n10 import type { DefaultTheme } from '../../shared'\r\n ~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:11:25 - error TS7016: Could not find a declaration file for module '../composables/data'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/theme-default/composables/data.js' implicitly has an 'any' type.\r\n\r\n11 import { useData } from '../composables/data'\r\n ~~~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:14:26 - error TS2304: Cannot find name '__VP_LOCAL_SEARCH__'.\r\n\r\n14 const VPLocalSearchBox = __VP_LOCAL_SEARCH__\r\n ~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:18:28 - error TS2304: Cannot find name '__ALGOLIA__'. \r\n\r\n18 const VPAlgoliaSearchBox = __ALGOLIA__\r\n ~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:48:8 - error TS2304: Cannot find name '__ALGOLIA__'. \r\n\r\n48 if (!__ALGOLIA__) {\r\n ~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:113:5 - error TS2304: Cannot find name '__VP_LOCAL_SEARCH__'.\r\n\r\n113 if (__VP_LOCAL_SEARCH__) {\r\n ~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:129:18 - error TS2304: Cannot find name '__ALGOLIA__'. \r\n\r\n129 const provider = __ALGOLIA__ ? 'algolia' : __VP_LOCAL_SEARCH__ ? 'local' : ''\r\n ~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:129:44 - error TS2304: Cannot find name '__VP_LOCAL_SEARCH__'.\r\n\r\n129 const provider = __ALGOLIA__ ? 'algolia' : __VP_LOCAL_SEARCH__ ? 'local' : ''\r\n ~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearchButton.vue:3:39 - error TS7016: Could not find a declaration file for module '../support/translation'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/theme-default/support/translation.js' implicitly has an 'any' type.\r\n\r\n3 import { createSearchTranslate } from '../support/translation'\r\n\r\n```\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],4476,"Enable use of search components in custom layouts","2025-01-17T04:43:47Z","https://github.com/vuejs/vitepress/issues/4476",0.6999038,["Reactive",2956],{},["Set"],["ShallowReactive",2959],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fjCJgSfNNd8LmiDlNzehI67iyWDLGPCzyaRIC8svePY8":-1},"/vuejs/vitepress/235"]