\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,"Sidenav Components / Skip title update","2025-03-20T12:17:14Z","https://github.com/vuejs/vitepress/issues/4637",0.71738297,{"description":2885,"labels":2886,"number":2891,"owner":2869,"repository":2870,"state":2871,"title":2892,"updated_at":2893,"url":2894,"score":2895},"Hello, VitePress team! Thank you for this awesome project 😄 \n\nI'm trying VP for the first time. The following part of the **[Getting Started](https://vitepress.dev/guide/getting-started)** page is a bit confusing to me:\n\n> VitePress can be used on its own, or be installed into an existing project. In both cases, you can install it with:\n>\n> `npm add -D vitepress`\n\n**What's unclear?**\n\n- My first reaction was: _what_ am I adding this package to? I'm not currently in an npm-managed project. Did they mean `npm add -g vitepress` — maybe it's a scaffolding tool?\n- If the learning flow for new users is to add VP as a dev dependency to a new npm-managed project, I would recommend making those setup steps explicit (e.g. first `mkdir hello-vitepress`, cd `hello-vitepress`, `npm init`, and then `npm add -D vitepress`).\n- What does it mean to use VP \"on its own\"? What would this separate it from?\n\nThe **Setup Wizard** section is clear and helpful. My suggestion might be to make the Setup Wizard the recommended way to get started with VP, rather than presenting multiple learning paths (i.e. create your own project vs. let us scaffold it for you). I'd be happy to make a PR to make this a bit more more self-explanatory to newcomers!\n\n\n",[2887,2890],{"name":2888,"color":2889},"docs","0075ca",{"name":2866,"color":2867},4549,"[docs] \"Getting Started\" is a bit confusing","2025-03-22T14:04:14Z","https://github.com/vuejs/vitepress/issues/4549",0.72073615,{"description":2897,"labels":2898,"number":2900,"owner":2869,"repository":2870,"state":2871,"title":2901,"updated_at":2902,"url":2903,"score":2904},"### 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.",[2899],{"name":2866,"color":2867},4253,"[Feature request] use vue render highlight section","2024-12-03T17:27:43Z","https://github.com/vuejs/vitepress/issues/4253",0.73354286,{"description":2906,"labels":2907,"number":2911,"owner":2869,"repository":2870,"state":2912,"title":2913,"updated_at":2914,"url":2915,"score":2916},"### Is your feature request related to a problem? Please describe.\n\nThe default page layout is 'doc', which is hard coded. It will easier the user's life to be able to provide an aletrnative layout so that he doesn't need to write a whole theme.\n\n### Describe the solution you'd like\n\nUse dynamic component in VPContent, and add a config option in the themeConfig.\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.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.",[2908],{"name":2909,"color":2910},"need more info","bdbefc",1376,"closed","Customize default page layout","2023-01-21T14:23:05Z","https://github.com/vuejs/vitepress/issues/1376",0.69380426,{"description":2918,"labels":2919,"number":2921,"owner":2869,"repository":2870,"state":2912,"title":2922,"updated_at":2923,"url":2924,"score":2925},"### Is your feature request related to a problem? Please describe.\n\nWhen we want add a common footer section for every page, we have to add other code with \"Content component\". \r\nFor example:\r\n\r\n``` vue\r\n\u003Cdiv class='doc-content-wrapper'>\r\n \u003Cdiv class='doc-content-container'>\r\n \u003CContent\r\n ref='content'\r\n class='doc-content'\r\n @vnode-mounted='updateLink'\r\n @vnode-updated='updateLink'\r\n />\r\n \u003Cdiv class='doc-content'>\r\n \u003CVPComponentCssVar v-if='componentName'\r\n :component-name='componentName'>\u003C/VPComponentCssVar>\r\n \u003C/div>\r\n \u003CVPPageFooter />\r\n \u003CVPPageNav />\r\n \u003C/div>\r\n \u003C/div>\r\n```\n\n### Describe the solution you'd like\n\nAdd a footer and header slot to Content component.\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/coc)\n- [X] Read the [docs](https://vitepress.vuejs.org/).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/master/.github/contributing.md).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2920],{"name":2909,"color":2910},543,"Please add slots for Content component.","2023-01-21T16:04:18Z","https://github.com/vuejs/vitepress/issues/543",0.7074898,{"description":2927,"labels":2928,"number":2929,"owner":2869,"repository":2870,"state":2912,"title":2930,"updated_at":2931,"url":2932,"score":2933},"### Is your feature request related to a problem? Please describe.\n\nI'm using Vue components that generate headers dynamically, and (of course) the headers I create in Vue components don't appear in the outline.\n\n### Describe the solution you'd like\n\nI'd like to be able to add headers to `page.headers` in my component.\n\n### Describe alternatives you've considered\n\nI tried manipulating `page.headers` in my component from `useData()`, but the headers are read-only at that point.\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.",[],1145,"Dynamic Outline","2023-01-21T14:26:54Z","https://github.com/vuejs/vitepress/issues/1145",0.71138513,{"description":2935,"labels":2936,"number":2937,"owner":2869,"repository":2870,"state":2912,"title":2938,"updated_at":2939,"url":2940,"score":2941},"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,"want more flexibility in the customization part","2023-01-21T16:20:20Z","https://github.com/vuejs/vitepress/issues/58",0.715862,{"description":2943,"labels":2944,"number":2945,"owner":2869,"repository":2870,"state":2912,"title":2946,"updated_at":2947,"url":2948,"score":2949},"### Is your feature request related to a problem? Please describe.\n\nWhen adding Vue components or HTML markup inside a `doc` or `page` markdown file, it's frustrating to have to contend with the global `.vp-doc` styles.\n\n### Describe the solution you'd like\n\nIt would be very nice to have a `.not-vp-doc` class to negate and opt out of the global `.vp-doc` styles (for the element where you apply `.not-vp-doc` and all descendants) similar to the `.prose` and `.not-prose` classes used by [@tailwindcss/typography](https://github.com/tailwindlabs/tailwindcss-typography).\n\n### Describe alternatives you've considered\n\nI started creating my own override `vp-doc.css` stylesheet, but maintaining it and also getting it imported instead of the default one requires too much duplication files of the default theme.\n\nI also considered mechanisms to opt out of the `.vp-doc` styles at the theme level in `Layout.vue` but it really doesn't solve the problem - the opt-out needs to be able to happen on a specific fragment or component when embedded inside an `.md` file that otherwise consists primarily of markdown content.\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.",[],4731,"Default theme: Add class to opt out of .vp-doc styles","2025-05-04T08:39:09Z","https://github.com/vuejs/vitepress/issues/4731",0.7164295,{"description":2951,"labels":2952,"number":2953,"owner":2869,"repository":2870,"state":2912,"title":2954,"updated_at":2955,"url":2956,"score":2957},"### Is your feature request related to a problem? Please describe.\r\n\r\n许多第三方库会在导入时的顶层代码中访问 `window` 或者 `document`\r\n我不可能在第三库的源码中加上条件判断,这是不切实际的。\r\n\r\n假设有一个Vue插件模块名字就叫 \"a-vue-plugin\",并且假设它提供了大量有用的Vue组件或者实用功能。\r\n```typescript\r\nwindow.ABC = 123 // 这个模块在代码顶层就访问里 window\r\n\r\nconst plugin = {\r\n // ...\r\n}\r\n\r\nexport default plugin\r\n```\r\n\r\ndocs/.vitepress/theme/index.ts\r\n```typescript\r\n// ...\r\nimport { plugin } from 'a-vue-plugin''\r\n\r\nexport default define\u003CTheme>({\r\n NotFound,\r\n Layout: VPApp,\r\n enhanceApp: ({ app }) => {\r\n // 这样写显然是无济于事的,因为在执行 import { plugin } from 'a-vue-plugin' 时就已经访问到 window 了 \r\n if (!import.meta.env.SSR) {\r\n app.use(plugin) // 这里需要使用这个插件\r\n }\r\n },\r\n})\r\n```\r\n最终抛出错误\r\n```\r\n⠋ rendering pages...ReferenceError: window is not defined\r\n```\r\n\r\n### Describe the solution you'd like\r\n\r\n目前缺少完全合理的解决方案,请求官方针对此问题提供标准的解决方案或者规避方案。\r\n\r\n### Describe alternatives you've considered\r\n\r\n这是一个可能的解决方案,但需要 enhanceApp 支持异步才行。\r\n```typescript\r\nexport default define\u003CTheme>({\r\n NotFound,\r\n Layout: VPApp,\r\n enhanceApp: async ({ app }) => {\r\n if (!import.meta.env.SSR) {\r\n const plugin = (await import('a-vue-plugin')).default\r\n app.use(plugin)\r\n }\r\n },\r\n})\r\n```\r\n\r\n### Additional context\r\n\r\n类似的问题 [#](https://github.com/vuejs/vitepress/issues/1727#issue-1507239476)\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] 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.",[],1884,"如何针对静态导入跳过SSR?","2023-03-23T00:04:27Z","https://github.com/vuejs/vitepress/issues/1884",0.7194135,["Reactive",2959],{},["Set"],["ShallowReactive",2962],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fFUX0sz2RqAKyZyt1QSNxb1ow36s9Zqz8S7mHwqjYb-8":-1},"/vuejs/vitepress/1091"]