`)\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.",[2865],{"name":2866,"color":2867},"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.74401003,{"description":2877,"labels":2878,"number":2883,"owner":2869,"repository":2870,"state":2871,"title":2884,"updated_at":2885,"url":2886,"score":2887},"### Describe the bug\r\n\r\n当我在使用动态路由的功能的时候,开发状态下是正常运行的,如下方的配置\r\n\r\n\r\n\r\n\r\n`export default {\r\n paths() {\r\n return [\r\n { params: { pkg: '../svgui/important/' }},\r\n { params: { pkg: '../toolkit/important/' }},\r\n ]\r\n }\r\n}`\r\n\r\n我在当前目录的上级中的两个目录中分别用当前的md文件生成了两个文件,开发环境一切正常。\r\n但打包之后,对应目录的文件生成了,但是内容却是404。\r\n\r\n### Reproduction\r\n\r\n无\r\n\r\n### Expected behavior\r\n\r\n希望能改进后,开发环境和生产环境表现一致。\r\n\r\n### System Info\r\n\r\n```Text\r\nnode 18.19 \r\nwindows\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\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] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2879,2882],{"name":2880,"color":2881},"bug: pending triage","e99695",{"name":2866,"color":2867},4200,"动态路由打包后遇到的bug,开发环境正常","2024-10-26T17:17:22Z","https://github.com/vuejs/vitepress/issues/4200",0.7465028,{"description":2889,"labels":2890,"number":2894,"owner":2869,"repository":2870,"state":2895,"title":2896,"updated_at":2897,"url":2898,"score":2899},"Refer https://github.com/vuejs/vitepress/discussions/1123#discussioncomment-3335182.\r\n\r\nWe have some alias in Vite for transforming `vitepress/client` to `vitepress/dist/client`, but types aren't configured for that. Probably need to change some stuff in `package.json` `exports` itself.",[2891],{"name":2892,"color":2893},"types","0075ca",1127,"closed","Fix `vitepress/client` typings","2023-01-21T14:28:34Z","https://github.com/vuejs/vitepress/issues/1127",0.66905254,{"description":2901,"labels":2902,"number":2903,"owner":2869,"repository":2870,"state":2895,"title":2904,"updated_at":2905,"url":2906,"score":2907},"\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.6915945,{"description":2909,"labels":2910,"number":2914,"owner":2869,"repository":2870,"state":2895,"title":2915,"updated_at":2916,"url":2917,"score":2918},"### Is your feature request related to a problem? Please describe.\n\nI want to use `Badge` component in my custom theme. And the `Badge` component not exportd by `vitepress/theme`\r\n\r\nSo I can do this only:\r\n```ts\r\nimport Theme from 'vitepress/theme'\r\n\r\nexport default {\r\n\t...Theme,\r\n\tenhanceApp(ctx) {\r\n\t \tTheme.enhanceApp(ctx)\r\n\t\t// Custom content\r\n\t}\r\n}\r\n```\n\n### Describe the solution you'd like\n\nSo I' d like to import `Badge` from `vitepress/theme` directly\r\n\r\n```ts\r\nimport { Badge } from 'vitepress/theme'\r\n\r\nexport default {\r\n\t...Theme,\r\n\tenhanceApp(ctx) {\r\n\t \tctx.app.component('Badge', VPBadge);\r\n\t\t// Custom content\r\n\t}\r\n}\r\n```\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\n_No response_\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.",[2911],{"name":2912,"color":2913},"contribution welcome","11E4B8",3430,"Export `Badge` component for custom Theme","2024-01-18T00:04:42Z","https://github.com/vuejs/vitepress/issues/3430",0.709304,{"description":2920,"labels":2921,"number":2923,"owner":2869,"repository":2870,"state":2895,"title":2924,"updated_at":2925,"url":2926,"score":2927},"### Describe the bug\n\nI'm using different fonts for the default theme, but the font files (`fonts.css`) are still packaged into the build product.\r\n\r\n\n\n### Reproduction\n\naccording official doc [https://vitepress.dev/guide/extending-default-theme#using-different-fonts](https://vitepress.dev/guide/extending-default-theme#using-different-fonts):\r\n\r\n``` js\r\n// .vitepress/theme/index.js\r\nimport DefaultTheme from 'vitepress/theme-without-fonts'\r\nimport './my-fonts.css'\r\n\r\nexport default DefaultTheme\r\n```\n\n### Expected behavior\n\nWhen using different fonts, the default font will not enter the production environment.\n\n### System Info\n\n```Text\n.\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2922],{"name":2880,"color":2881},3411,"Using different fonts, but **Inter** fonts are still packaged in production","2024-01-13T00:04:50Z","https://github.com/vuejs/vitepress/issues/3411",0.7211567,{"description":2929,"labels":2930,"number":2931,"owner":2869,"repository":2870,"state":2895,"title":2932,"updated_at":2933,"url":2934,"score":2935},"Hi there,\r\n\r\nThe example in the documentation for customizing the theme does not work. It fails as the file/package cannot be found. This is the [specific line](https://github.com/vuejs/vitepress/blob/ea6cb00c3e9099d45fc236bff0f7c42a65d558dc/docs/guide/theming.md?plain=1#L97) that I am referring to, but I believe that the other lines that use this same thing will also fail.\r\n\r\nThe specific import that fails\r\n```javascript\r\nimport DefaultTheme from 'vitepress/theme'\r\n```\r\n\r\nI found an alternative import that works by looking into the downloaded node_module folder directly\r\n```javascript\r\nimport DefaultTheme from \"vitepress/dist/client/theme-default\";\r\n```\r\n\r\nIm not sure if this is the intended use or? If this is an actual issue, I can help with making a PR to update the docs, else if it is something that needs to be fixed with the deployment process so that the `DefaultTheme` can be exported from vitepress/theme then it would probably need help from someone else familiar with the process.\r\n\r\nThanks alot for your time!",[],442,"Example provided in theme documentation does not work","2023-01-21T16:20:15Z","https://github.com/vuejs/vitepress/issues/442",0.72299826,{"description":2937,"labels":2938,"number":2939,"owner":2869,"repository":2870,"state":2895,"title":2940,"updated_at":2941,"url":2942,"score":2943},"**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.72310233,{"description":2945,"labels":2946,"number":2948,"owner":2869,"repository":2870,"state":2895,"title":2949,"updated_at":2950,"url":2951,"score":2952},"### Describe the bug\r\n\r\nWhen following the documentation for extending the default theme; importing the theme and exported the extended theme results in the error `TS2708: Cannot use namespace 'DefaultTheme' as a value.`.\r\n\r\n\r\n### Reproduction\r\n\r\nIn a bare VitePress installation:\r\n\r\n`docs/.vitepress/theme/index.ts`\r\n```ts\r\nimport { DefaultTheme } from \"vitepress/theme\";\r\n\r\nexport default {\r\n extends: DefaultTheme\r\n}\r\n```\r\n\r\n`docs/.vitepress/theme/index.ts:4:11: TS2708: Cannot use namespace 'DefaultTheme' as a value.`\r\n\r\n### Expected behavior\r\n\r\nThe documented code would work.\r\n\r\n### System Info\r\n\r\n```sh\r\n System:\r\n OS: Linux 6.1 Manjaro Linux\r\n CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor\r\n Memory: 17.45 GB / 31.30 GB\r\n Container: Yes\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 16.20.0 - ~/.local/bin/node\r\n Yarn: 1.22.19 - ~/.local/bin/yarn\r\n npm: 9.6.5 - ~/.local/bin/npm\r\n Browsers:\r\n Chromium: 114.0.5735.133\r\n npmPackages:\r\n vitepress: ^1.0.0-beta.3 => 1.0.0-beta.3 \r\n```\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\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] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2947],{"name":2880,"color":2881},2532,"Cannot create theme with TypeScript: TS2708: Cannot use namespace 'DefaultTheme' as a value.","2023-06-28T00:04:53Z","https://github.com/vuejs/vitepress/issues/2532",0.7272502,{"description":2954,"labels":2955,"number":2959,"owner":2869,"repository":2870,"state":2895,"title":2960,"updated_at":2961,"url":2962,"score":2963},"### Discussed in https://github.com/vuejs/vitepress/discussions/527\r\n\r\n\u003Cdiv type='discussions-op-text'>\r\n\r\n\u003Csup>Originally posted by **WebMechanic** February 11, 2022\u003C/sup>\r\nHello,\r\n\r\nI have a fresh install of VitePress to document our new Style Guide and wanted to use the [Import Code Snippets](https://vitepress.vuejs.org/guide/markdown.html#import-code-snippets) feature for .js, .css and .html fragments, but the file(s) are not included. I tried all sorts of pathnames with/without the `base`, relative, absolute, all to no avail.\r\nEverything else works like a charme.\r\n\r\nThe project is a simple Vite Vue project. I then installed VitePress with yarn. \r\nIt resides in `src/_docs/.vitepress`.\r\n\r\nHere's the config file\r\n```js\r\nimport {defineConfig} from 'vitepress'\r\nexport default defineConfig({\r\n base: '/src/_docs/',\r\n title: \"The Style Guide\",\r\n markdown: {\r\n lineNumbers: false,\r\n toc: {includeLevel: [1, 2]},\r\n }\r\n}\r\n```\r\n\u003C/div>\r\n\r\nIt's not clear to me, if this requires some special care for Prism. Configuration seems very different fro what I can find on Lea Verou's site.\r\n",[2956],{"name":2957,"color":2958},"invalid","ffffff",530,"\"Import Code Snippets\" not working","2023-01-21T16:04:03Z","https://github.com/vuejs/vitepress/issues/530",0.7301015,["Reactive",2965],{},["Set"],["ShallowReactive",2968],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fvAbCwvkrm2lte9zWzwrrzNItoO2LFMhNCSTxziPA8zs":-1},"/vuejs/vitepress/192"]