\r\n```\r\nAnd here is a video of how it would render in Vitepress:\r\n\r\nhttps://user-images.githubusercontent.com/3253920/140631280-adae2d0b-47d9-4172-b105-f6f4ee5f41f4.mp4\r\n\r\n(I have styled this a little bit to fit my docs style, but of course the styling can be way more bare-bones and we can overwrite the styling with CSS.)\r\n\r\n\r\n\r\n### Describe alternatives you've considered\r\n\r\nI actually already finished this feature for VitePress. I created my custom solution.\r\n\r\nUnder the hood I'm using a combination of these import methods:\r\n```js\r\nimport(`../docs/${filename}.vue`) // for the component\r\n// and\r\nimport(`../docs/${filename}.vue?raw`) // for the source code\r\n```\r\n\r\n~~Everything works when I'm using the VitePress development server. However, as soon as I build and deploy my code to a hosting service, all the Code Blocks break.~~\r\n\r\n~~I searched a lot for solutions, but this is not my strongest point. This past week I tried a bunch of things but still haven't found out how to make it work.~~\r\n\r\n(See next comment, where I explain how I fixed it)\r\n\r\n### Additional context\r\n\r\nI would love to request for an official solution for what I'm trying to do.\r\n\r\nI believe a lot of developers who want to share a Vue component and whip up a quick VitePress documentation about their component, would love this feature.\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/coc)\r\n- [X] Read the [docs](https://vitepress.vuejs.org/).\r\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/master/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[],437,"FR: Code Block that renders Vue file component and source code","2023-01-29T00:04:23Z","https://github.com/vuejs/vitepress/issues/437",0.64890933,{"description":2887,"labels":2888,"number":2890,"owner":2871,"repository":2872,"state":2873,"title":2891,"updated_at":2892,"url":2893,"score":2894},"### Describe the bug\n\n\r\n\r\nhttps://github.com/vuejs/vitepress/blob/9004a801305fa0c21a0064253da95fbad38148fe/src/client/app/utils.ts#L38\r\n\r\nby \r\n\r\nhttps://github.com/vuejs/vitepress/blob/89cc718649b9be547c6ec08d2dc3d10a67f2a3ac/src/client/app/utils.ts#L38-L39\r\n\r\nshould fix this.\r\n\r\n_Originally posted by @brc-dd in https://github.com/vuejs/vitepress/issues/412#issuecomment-1149704365_\r\n \r\n\r\nI still have this problem\r\n\r\nvitepress version:1.0.0-alpha.26 or npm:@brc-dd/vitepress@1.0.0-dev.50d1202\r\n\r\nI try to configure `cleanUrls: 'with-subfolders'` or `cleanUrls:' without-subfolders'` or delete the cleanUrls configuration item makes no difference or is still reporting an error\r\n\r\nI will temporarily open my [repo](https://github.com/you-hengh/myblog_vitepress) to find bugs.\n\n### Reproduction\n\npackage.json\r\n```json\r\n{\r\n \"name\": \"vitepress\",\r\n \"version\": \"1.0.0\",\r\n \"description\": \"\",\r\n \"main\": \"index.js\",\r\n \"scripts\": {\r\n \"dev\": \"vitepress dev docs\",\r\n \"build\": \"vitepress build docs\",\r\n \"serve\": \"vitepress serve docs\"\r\n },\r\n \"keywords\": [],\r\n \"author\": \"\",\r\n \"license\": \"ISC\",\r\n \"devDependencies\": {\r\n \"@algolia/client-search\": \"^4.14.2\",\r\n \"vitepress\": \"npm:@brc-dd/vitepress@1.0.0-dev.50d1202\"\r\n }\r\n}\r\n```\r\n\r\n1. pnpm build\r\n\r\n ```bash\r\n > vitepress build docs\r\n\r\n vitepress v1.0.0-dev.50d1202\r\n ✓ building client + server bundles...\r\n ⠋ rendering pages...[Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n [Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n [Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n [Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n [Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n [Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n [Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n [Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n ✓ rendering pages...\r\n build complete in 3.35s.\r\n ```\r\n\r\n2. pnpm serve\r\n\r\n ```bash\r\n > vitepress@1.0.0 serve /Users/bddxg/Documents/网站/vitepress 站点\r\n > vitepress serve docs\r\n\r\n vitepress v1.0.0-dev.50d1202\r\n Built site served at http://localhost:4173/\r\n ```\r\n\r\n\n\n### Expected behavior\n\nfix bug or tell me the solution.\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 13.0\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 5.11 GB / 32.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.17.1 - ~/Library/pnpm/node\r\n npm: 8.15.0 - ~/Library/pnpm/npm\r\n Browsers:\r\n Chrome: 106.0.5249.119\r\n Safari: 16.1\r\n npmPackages:\r\n @brc-dd/vitepress: 1.0.0-dev.50d1202\n```\n\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.vuejs.org).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2889],{"name":2868,"color":2869},1578,"vitepress serve tries to load an md.undefined.js file","2023-01-21T14:20:50Z","https://github.com/vuejs/vitepress/issues/1578",0.65231067,{"description":2896,"labels":2897,"number":2901,"owner":2871,"repository":2872,"state":2873,"title":2902,"updated_at":2903,"url":2904,"score":2905},"### Describe the bug\n\nI referenced a globally registered component in the markdown document of vitepress. When I used it, the error was reported as follows:\r\n**[vitepress] Internal server error: At least one \u003Ctemplate> or \u003Cscript> is required in a single file component.**\r\n\r\n\r\n\n\n### Reproduction\n\nCreate vite.config.js in the vitepress root directory, the content is as follows:\r\n\r\n```\r\nimport { defineConfig } from \"vite\";\r\nimport vueJsx from \"@vitejs/plugin-vue-jsx\";\r\nimport vue from \"@vitejs/plugin-vue\"\r\nexport default defineConfig({\r\n plugins: [\r\n vue(),\r\n vueJsx(),\r\n ],\r\n});\r\n```\n\n### Expected behavior\n\nRender component content correctly\n\n### System Info\n\n```shell\nnode 16\n```\n\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] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2898],{"name":2899,"color":2900},"need more info","bdbefc",2095,"vitepress not support jsx file?","2023-03-29T00:04:14Z","https://github.com/vuejs/vitepress/issues/2095",0.65480644,{"description":2907,"labels":2908,"number":2910,"owner":2871,"repository":2872,"state":2873,"title":2911,"updated_at":2912,"url":2913,"score":2914},"### Describe the bug\n\nI registered a global component named `user`, and used it as `layout`, \r\nbut I didn't contain a `\u003CContent />` component because I don't intend to render markdown.\r\n\r\nthen, I write a markdown `user.md`, like this:\r\n```\r\n---\r\nlayout: user\r\n---\r\n```\r\n\r\nbut, when I navigate from another page(layout: doc) to `user.md`, the aside content isn't updated. \r\nsee:\r\nfind\n\n### Reproduction\n\nsee: [https://stackblitz.com/edit/vite-omxrm4](https://stackblitz.com/edit/vite-omxrm4?file=docs%2Findex.md)\n\n### Expected behavior\n\nWhen Navigating to another layout, the aside content can be updated in the `\u003CNav>` component, even if it doesn't contain the `\u003CContent>` component\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.",[2909],{"name":2868,"color":2869},3251,"In the default theme, `\u003CNav>` component doesn't update the aside content very well","2023-12-03T00:04:49Z","https://github.com/vuejs/vitepress/issues/3251",0.66489744,{"description":2916,"labels":2917,"number":2918,"owner":2871,"repository":2872,"state":2873,"title":2919,"updated_at":2920,"url":2921,"score":2922},"### Is your feature request related to a problem? Please describe.\n\nI'm using VitePress to document our coding standards and our design system. I want to show examples of the code we would use (HTML and Vue components) *and* how that code would render.\r\n\r\nI can import and use Vue components in the markdown (and HTML) without issue. But to show both the \"live\" and \"source\" views of that code, I have to copy my live code into a separate markdown code block, which means now I have *two* blocks of code to manage and synchronize for each example.\n\n### Describe the solution you'd like\n\nI'd like a new directive for \"```\" code blocks that, when viewed in VitePress, shows up as a tabbed interface with two tabs: (1) the rendered version of that code (using the normal rendering done by VitePress, supporting Vue and HTML), and (2) the normal way the code block would be otherwise rendered.\r\n\r\nI *believe* this would simply require detecting this directive, duplicating the code within the block as non-fenced code, and wrapping the pair in a simple tabbed Vue component.\r\n\r\nObviously for more complex examples, the VitePress version of the live code will differ from what needs to be shown to the user, so that is a challenge (the Vue docs themselves have this challenge). But for simple examples of using Vue components and HTML with no additional script involved, it would really help.\r\n\r\nMy suggestion would be something like \"```html:live\", where the \":live\" bit either comes before or after any row number highlights (I don't think it would matter).\n\n### Describe alternatives you've considered\n\nCopying and pasting between markdown code blocks to markdown live code, keeping them synchronized as the code is updated.\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.vuejs.org).\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.",[],554,"\"Live\" Code Blocks","2023-01-21T14:20:27Z","https://github.com/vuejs/vitepress/issues/554",0.6669419,{"description":2924,"labels":2925,"number":2927,"owner":2871,"repository":2872,"state":2873,"title":2928,"updated_at":2929,"url":2930,"score":2931},"\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",[2926],{"name":2868,"color":2869},28,"Sidebar Navbar break on 0.4.0","2023-01-21T16:25:39Z","https://github.com/vuejs/vitepress/issues/28",0.6671727,{"description":2933,"labels":2934,"number":2935,"owner":2871,"repository":2872,"state":2873,"title":2936,"updated_at":2937,"url":2938,"score":2939},"### Describe the bug\n\n\r\n\r\n我的组件库是基于element ui 二次封装 正常打包 且在项目内可以使用\r\n在使用vitepress 开发文档时 运行无任何问题,能正常显示组件\r\n可是打包一堆问题\r\n\n\n### Reproduction\n\n使用element 封装 打包 嵌入vitepress\r\n\n\n### Expected behavior\n\n预期打包成功\n\n### System Info\n\n```shell\nTypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension \".css\" for /Users/allen/Desktop/ode/turborepo/node_modules/.pnpm/registry.npmmirror.com+element-plus@2.2.17_vue@3.2.40/node_modules/element-plus/theme-chalk/el-cascader.css\n```\n\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.vuejs.org).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[],1465,"vitepress 打包错误","2023-01-21T14:23:01Z","https://github.com/vuejs/vitepress/issues/1465",0.66969657,{"description":2941,"labels":2942,"number":2944,"owner":2871,"repository":2872,"state":2873,"title":2945,"updated_at":2946,"url":2947,"score":2948},"\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\nsetting base path will make the sidebar blank.\r\n\r\n**To Reproduce**\r\nin .vitepress/config.js:\r\nadd base path setting\r\n\r\n**Expected behavior**\r\nnormal display\r\n\r\n**System Info**\r\n- vitepress version: 0.12.0\r\n- vite version: 2.0.0-beta.50\r\n- Node version: v15.2.1\r\n- OS version: macOS 11.2\r\n\r\n**Additional context**\r\nyou can see there: https://assone.github.io/Note/programing/\r\n",[2943],{"name":2868,"color":2869},242,"setting base path will make the sidebar blank","2023-01-21T16:22:30Z","https://github.com/vuejs/vitepress/issues/242",0.6710236,{"description":2950,"labels":2951,"number":2953,"owner":2871,"repository":2872,"state":2873,"title":2954,"updated_at":2955,"url":2956,"score":2957},"### Describe the bug\n\nHello, awesome effort, looking forward to how this project grows.\r\n\r\nContext: adding documentation with Vitepress to a vue3 library that uses aliases inside `/@`. \r\n\r\nAdded `resolve.alias` using a `vite.config.ts` based on this https://github.com/vuejs/vitepress/issues/241 \r\n\r\nIt worked, but suddenly ignored completely the config on `docs/.vitepress/config.ts` (title, sidebar, nav, etc)\r\n\r\n```js\r\n// docs/.vitepress/config.ts\r\n\r\nmodule.exports = {\r\n title: 'Vue Dynamic Forms',\r\n description,\r\n themeConfig: {\r\n repo: 'asigloo/vue-dynamic-forms',\r\n logo: '/logo.svg',\r\n nav: [\r\n {\r\n text: 'Migration Guide',\r\n link: '/v3/guide/migration-guide',\r\n },\r\n ],\r\n sidebar: {\r\n '/': [\r\n {\r\n text: 'Guide',\r\n children: [\r\n {\r\n text: 'Introduction',\r\n link: '/guide/',\r\n },\r\n {\r\n text: 'Getting Started',\r\n link: '/guide/getting-started',\r\n },\r\n {\r\n text: 'Usage',\r\n link: '/guide/usage',\r\n },\r\n ],\r\n },\r\n ],\r\n },\r\n },\r\n}\r\n\r\n```\r\n\r\n\r\n\n\n### Reproduction\n\n- Add a `vite.config.ts` inside `docs` root \r\n- Add a `title`, also add `themeConfig`, `nav` or `sidebar` on `docs/.vitepress/config.ts` \r\n- Run `vitepress dev docs` \n\n### Expected behavior\n\n`vite.config.ts` `docs/.vitepress/config.ts` configs can live together \r\n\r\nor\r\n\r\nAn option to add `alias` to `docs/.vitepress/config.ts` \n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 11.4\r\n CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz\r\n Memory: 544.29 MB / 16.00 GB\r\n Shell: 5.8 - /bin/zsh\r\n Binaries:\r\n Node: 16.3.0 - ~/.nvm/versions/node/v16.3.0/bin/node\r\n Yarn: 1.22.10 - /usr/local/bin/yarn\r\n npm: 7.19.1 - ~/Projects/github/vue-dynamic-forms/node_modules/.bin/npm\r\n Browsers:\r\n Chrome: 92.0.4515.159\r\n Firefox: 89.0.1\r\n Safari: 14.1.1\r\n npmPackages:\r\n vitepress: ^0.16.1 => 0.15.6 \r\n```\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/coc)\n- [X] Read the [docs](https://vitepress.vuejs.org/).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2952],{"name":2868,"color":2869},373,"ThemeConfig is ignored when using vite.config.ts inside docs","2023-01-21T14:32:46Z","https://github.com/vuejs/vitepress/issues/373",0.6720444,["Reactive",2959],{},["Set"],["ShallowReactive",2962],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fmYO_1GG6btl1jaUs19J55YA_fE1tW7dyhiLdUg65Pyw":-1},"/vuejs/vitepress/2157"]