\n\n\u003Cimg width=\"308\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/0e1beb6b-d06b-436c-b106-c924fead87ab\" />\n\n\u003Cimg width=\"931\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/aef6f71a-fa28-4b7c-b512-e6386e18159a\" />\n\n### Describe the solution you'd like\n\nIn my [pull request](https://github.com/vuejs/vitepress/pull/4630), I've introduced custom components that can be overridden in the `enhanceApp` function. In these custom components, I can add custom logic for rendering text, such as using the Vue compile function. \n\nAdditionally, I added a flag to skip the title update, allowing for custom logic implementation. \n\nPlease also see my PR: [https://github.com/vuejs/vitepress/pull/4630](https://github.com/vuejs/vitepress/pull/4630).\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.",[],4637,"vuejs","vitepress","open","Sidenav Components / Skip title update","2025-03-20T12:17:14Z","https://github.com/vuejs/vitepress/issues/4637",0.7041517,{"description":2876,"labels":2877,"number":2884,"owner":2868,"repository":2869,"state":2870,"title":2885,"updated_at":2886,"url":2887,"score":2888},"similar to vuepress",[2878,2881],{"name":2879,"color":2880},"build","377ba8",{"name":2882,"color":2883},"stale","ededed",3861,"i18n with markdown containers","2025-03-02T18:09:10Z","https://github.com/vuejs/vitepress/issues/3861",0.71191335,{"description":2890,"labels":2891,"number":2893,"owner":2868,"repository":2869,"state":2870,"title":2894,"updated_at":2895,"url":2896,"score":2897},"### Is your feature request related to a problem? Please describe.\n\n1. sometimes need use vue dynamic render highlight content like json list or some thing . if can provide component or function to do that, that will be great.\r\n2. tryed use the vue dynamic component it's not woking , can we use it ? how.\r\n1.有时候需要动态输出 markdown ,能不能加一个从vue 动态输出的功能 。 2. 动态组件用不了,怎么才能用vue 的动态组件\n\n### Describe the solution you'd like\n\n1. sometimes need use vue dynamic render highlight content like json list or some thing . if can provide component or function to do that, that will be great.\r\n2. tryed use the vue dynamic component it's not woking , can we use it ? how.\r\n1.有时候需要动态输出 markdown ,能不能加一个从vue 动态输出的功能 。 2. 动态组件用不了,怎么才能用vue 的动态组件\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.",[2892],{"name":2882,"color":2883},4253,"[Feature request] use vue render highlight section","2024-12-03T17:27:43Z","https://github.com/vuejs/vitepress/issues/4253",0.72676,{"description":2899,"labels":2900,"number":2904,"owner":2868,"repository":2869,"state":2905,"title":2906,"updated_at":2907,"url":2908,"score":2909},"### Describe the bug\r\n\r\nSome of the code markdown extensions do not work when the language is `vue`.\r\n\r\nIn particular, `[!code ++]`, `[!code --]`, `[!code warning]`, `[!code error]` and `[!code focus]` just show the comments at the end of the line.\r\n\r\nChanging the language to something else fixes this, e.g. `htmx` or `ts`.\r\n\r\nThis only seems to happen in the template tags of a `vue` code block. The highlighting works absolutely fine in the script part. Please see reproduction for code examples, I can't figure out how to escape the triple backtick code blocks here! ☹️ \r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/vite-arupmh?file=docs%2Fexample.md\r\n\r\n### Expected behavior\r\n\r\nThe markdown extensions should work correctly and highlight the lines as per [the docs](https://vitepress.dev/guide/markdown#focus-in-code-blocks).\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: macOS 14.1.2\r\n CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\r\n Memory: 488.47 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\nBinaries:\r\n Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node\r\n Yarn: 1.22.10 - /usr/local/bin/yarn\r\n npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm\r\nBrowsers:\r\n Chrome: 120.0.6099.234\r\n Firefox: 112.0.2\r\n Firefox Developer Edition: 107.0\r\n Safari: 17.1.2\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.",[2901],{"name":2902,"color":2903},"upstream","BF29ED",3503,"closed","Markdown code extensions don't work in some situations","2025-02-01T04:42:47Z","https://github.com/vuejs/vitepress/issues/3503",0.6953354,{"description":2911,"labels":2912,"number":2913,"owner":2868,"repository":2869,"state":2905,"title":2914,"updated_at":2915,"url":2916,"score":2917},"### Describe the bug\n\n\r\n\r\n\n\n### Reproduction\n\n引入外部资源\n\n### Expected behavior\n\n起作用\n\n### System Info\n\n```shell\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/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.",[],667,"md 文件引入vue失败","2023-01-21T14:35:40Z","https://github.com/vuejs/vitepress/issues/667",0.7058867,{"description":2919,"labels":2920,"number":2924,"owner":2868,"repository":2869,"state":2905,"title":2925,"updated_at":2926,"url":2927,"score":2928},"**Describe the bug**\r\n\r\nWhen using vitepress with vue v3.1, we are now running into a compilation error as some vitepress components are using `\u003Ctemplate functional>`\r\n\r\nThe related change in vue-next is https://github.com/vuejs/vue-next/commit/467076361a730b7925c88c572793c78637e05ca7\r\n\r\n**To Reproduce**\r\n\r\nSee [this PR in VTU](https://github.com/vuejs/vue-test-utils-next/pull/654) (that uses vitepress for the docs) that fails because of vitepress and vue 3.1 \r\n\r\nIt can easily be reproduced in the current codebase by bumping vue to v3.1 and run `yarn docs-build`:\r\n\r\n```\r\nSyntaxError: \u003Ctemplate functional> is no longer supported in Vue 3, since functional components no longer have significant performance difference from stateful ones. Just use a normal \u003Ctemplate> instead.\r\n at /Users/ced-pro/Code/vue/vitepress/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:196:37\r\n at Array.forEach (\u003Canonymous>)\r\n at parse (/Users/ced-pro/Code/vue/vitepress/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:182:18)\r\n at createDescriptor (/Users/ced-pro/Code/vue/vitepress/node_modules/@vitejs/plugin-vue/dist/index.js:4048:62)\r\n at transformMain (/Users/ced-pro/Code/vue/vitepress/node_modules/@vitejs/plugin-vue/dist/index.js:4344:32)\r\n at Object.transform (/Users/ced-pro/Code/vue/vitepress/node_modules/@vitejs/plugin-vue/dist/index.js:4665:16)\r\n at /Users/ced-pro/Code/vue/vitepress/node_modules/rollup/dist/shared/rollup.js:19875:25 {\r\n loc: {\r\n start: { column: 11, line: 1, offset: 10 },\r\n end: { column: 21, line: 1, offset: 20 },\r\n source: 'functional'\r\n },\r\n id: '/Users/ced-pro/Code/vue/vitepress/dist/client/theme-default/com\r\n```\r\n\r\n**Expected behavior**\r\nvitepress should properly compile with Vue v3.1\r\n\r\n**System Info**\r\n- vitepress version: 0.14\r\n- vite version: 2.3.4\r\n- Node version: 14.17\r\n- OS version: macOS\r\n",[2921],{"name":2922,"color":2923},"bug: pending triage","e99695",311,"Functional templates errors with vue v3.1","2023-01-21T16:22:22Z","https://github.com/vuejs/vitepress/issues/311",0.7089111,{"description":2930,"labels":2931,"number":2933,"owner":2868,"repository":2869,"state":2905,"title":2934,"updated_at":2935,"url":2936,"score":2937},"### Describe the bug\n\nI get errors inside VS Code inside a simple vue component:\r\n\r\n\u003Cimg width=\"887\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/10713751/50437808-5667-4930-9aa8-d5eba16e2d29\">\r\n\r\nWhen using the component inside a markdown file, it works as expected.\n\n### Reproduction\n\nCreate a new VitePress project using the guide. Create a new component vue somewhere.\n\n### Expected behavior\n\nNo errors reported.\n\n### System Info\n\n```Text\nSystem:\r\n OS: macOS 14.3.1\r\n CPU: (11) arm64 Apple M3 Pro\r\n Memory: 89.45 MB / 18.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.11.0 - ~/.nvm/versions/node/v18.11.0/bin/node\r\n npm: 8.19.2 - ~/.nvm/versions/node/v18.11.0/bin/npm\r\n pnpm: 8.11.0 - ~/.nvm/versions/node/v18.11.0/bin/pnpm\r\n bun: 1.0.29 - ~/.bun/bin/bun\r\n Browsers:\r\n Chrome: 122.0.6261.112\r\n Safari: 17.3.1\r\n npmPackages:\r\n vitepress: ^1.0.0-rc.44 => 1.0.0-rc.44\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.",[2932],{"name":2922,"color":2923},3645,"TypeScript in VS Code reports error in vue component","2024-03-16T00:04:08Z","https://github.com/vuejs/vitepress/issues/3645",0.7118371,{"description":2939,"labels":2940,"number":2942,"owner":2868,"repository":2869,"state":2905,"title":2943,"updated_at":2944,"url":2945,"score":2946},"### Describe the bug\r\n\r\nI am trying to use vue inside the markup but it seems like I cannot use typescript\r\n\r\n### Reproduction\r\n\r\nIf I add the following line in my markup file I get the error:\r\n\r\n```md\r\n\u003Cscript setup lang=\"ts\">\r\n```\r\n\r\n\r\n### Expected behavior\r\n\r\nWould like to use typescript in the markdown if possible. \r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: Windows 10 10.0.22000\r\n CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz\r\n Memory: 7.01 GB / 15.85 GB\r\n Binaries:\r\n Node: 14.17.5 - C:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.5 - C:\\Program Files (x86)\\Yarn\\bin\\yarn.CMD\r\n npm: 7.20.6 - ~\\AppData\\Roaming\\npm\\npm.CMD\r\n Browsers:\r\n Chrome: 99.0.4844.51\r\n Edge: Spartan (44.22000.120.0), Chromium (99.0.1150.30)\r\n Internet Explorer: 11.0.22000.120\r\n npmPackages:\r\n vitepress: ^0.22.3 => 0.22.3\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] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.vuejs.org).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2941],{"name":2922,"color":2923},575,"Internal server error: [@vue/compiler-sfc] \u003Cscript> and \u003Cscript setup> must have the same language type.","2023-01-21T16:04:31Z","https://github.com/vuejs/vitepress/issues/575",0.7145702,{"description":2948,"labels":2949,"number":2951,"owner":2868,"repository":2869,"state":2905,"title":2952,"updated_at":2953,"url":2954,"score":2955},"### Describe the bug\n\nI want to use the vue component in vitepress. I have read the documentation on the official website, but when I do it, I encounter an error like this.\r\n```bash\r\n[plugin:vite:vue] Tags with side effect (\u003Cscript> and \u003Cstyle>) are ignored in client component templates.\r\n```\r\n\r\nI don't understand what I'm encountering, I just want to achieve the effect here in this vue document\r\n\r\n> https://cn.vuejs.org/guide/reusability/composables.html#vs-react-hooks\r\n\r\n\r\n\r\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/vite-dn63jg?file=docs%2Fhooks%2FuseMouse.js,docs%2Fexample.md\n\n### Expected behavior\n\nThe documentation on the official website makes me understand the difficulty or the need for a better demo?\n\n### System Info\n\n```Text\nSystem:\r\n OS: Windows 11 10.0.22631\r\n CPU: (20) x64 13th Gen Intel(R) CoreT i7-13800H\r\n Memory: 17.07 GB / 31.74 GB\r\n Binaries:\r\n Node: 20.11.0 - ~\\AppData\\Local\\pnpm\\node.EXE\r\n npm: 10.2.4 - ~\\AppData\\Local\\pnpm\\npm.CMD\r\n pnpm: 8.14.1 - ~\\AppData\\Local\\pnpm\\pnpm.EXE\r\n Browsers:\r\n Edge: Chromium (120.0.2210.133)\r\n Internet Explorer: 11.0.22621.1\r\n npmPackages:\r\n vitepress: 1.0.0-rc.39 => 1.0.0-rc.39\n```\n\n\n### Additional context\n\nPlease tell me the correct way to write it, thank you\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.",[2950],{"name":2922,"color":2923},3485,"Using vue to report errors in markdown","2024-01-29T00:04:28Z","https://github.com/vuejs/vitepress/issues/3485",0.71509683,{"description":2957,"labels":2958,"number":2960,"owner":2868,"repository":2869,"state":2905,"title":2961,"updated_at":2962,"url":2963,"score":2964},"### Describe the bug\r\n\r\n```\r\nUncaught ReferenceError: can't access lexical declaration 'K' before initialization\r\n vi https://preview-extend-template.gander-pl.pages.dev/assets/chunks/framework.v9o0AzEe.js:13\r\n \u003Canonymous> https://preview-extend-template.gander-pl.pages.dev/assets/chunks/theme.DDSRElNe.js:1\r\nframework.v9o0AzEe.js:13:10217\r\n```\r\n\r\n### Reproduction\r\n\r\n+ https://github.com/gander/gander.pl/tree/preview/extend-template\r\n+ https://github.com/gander/gander.pl/tree/preview/extend-template-inherit\r\n\r\n`.vitepress/theme/index.js`\r\n```js\r\nimport { h } from 'vue'\r\nimport DefaultTheme from 'vitepress/theme'\r\nimport Footer from \"./Footer.vue\";\r\n\r\nexport default {\r\n extends: DefaultTheme,\r\n Layout() {\r\n return h(DefaultTheme.Layout, null, {\r\n 'layout-bottom': () => h(Footer)\r\n })\r\n }\r\n}\r\n```\r\n\r\n`.vitepress/theme/Footer.vue`\r\n```vue\r\n\u003Cscript setup>\r\nconst telemetryImg = import.meta.env.VITE_TELEMETRY_IMG;\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003Cdiv class=\"telemetry\" v-if=\"telemetryImg\">\r\n \u003Cimg :src=\"telemetryImg\" alt=\"\">\r\n \u003C/div>\r\n\u003C/template>\r\n\r\n\u003Cstyle scoped>\r\n.telemetry {\r\n text-align: center;\r\n}\r\n.telemetry img {\r\n display: inline-block;\r\n max-width: 66px;\r\n}\r\n\u003C/style>\r\n```\r\n\r\n### Expected behavior\r\n\r\nDisplay image in footer\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: Linux 6.5 Linux Mint 21.3 (Virginia)\r\n Browsers:\r\n Chrome: 123.0.6312.86\r\n Cloudflare:\r\n Node: 20.5.1\r\n bun: 1.0.35\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nhttps://preview-extend-template.gander-pl.pages.dev/\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.",[2959],{"name":2922,"color":2923},3717,"Uncaught ReferenceError: can't access lexical declaration 'K' before initialization","2024-04-28T12:25:20Z","https://github.com/vuejs/vitepress/issues/3717",0.7164887,["Reactive",2966],{},["Set"],["ShallowReactive",2969],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$foR81S7SnMKzc7usZyGG0Ij_kTdilP743bwgLn96h0Zw":-1},"/vuejs/vitepress/4396"]