\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.7203451,{"description":2905,"labels":2906,"number":2907,"owner":2872,"repository":2873,"state":2883,"title":2908,"updated_at":2909,"url":2910,"score":2911},"### Is your feature request related to a problem? Please describe.\n\nWe're using Custom Elements to encapsulate styles from our design system, so it'd be great to be able to tell Vitepress to ignore those tags.\r\n\r\nSuper lightweight example:\r\n\r\n```js\r\nclass ButtonExample extends HTMLElement {\r\n connectedCallback() {\r\n const designSystemCSS = '\u003Clink rel=\"stylesheet\" type=\"text/css\" href=\"designSystemURL\" />'\r\n const target = `\u003Cdiv id=\"app\">\u003C/div>`\r\n this.shadow = this.attachShadow({ mode: 'open' })\r\n this.shadow.innerHTML = designSystemCSS + target\r\n createApp(App) // App defined elsewhere ofc\r\n .mount(this.shadow.querySelector('#app'))\r\n }\r\n}\r\n```\n\n### Describe the solution you'd like\n\nProbably just being able to set `compilerOptions.isCustomElement` somewhere would be good enough?\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.",[],735,"Custom element support","2023-01-21T14:34:18Z","https://github.com/vuejs/vitepress/issues/735",0.7204795,{"description":2913,"labels":2914,"number":2916,"owner":2872,"repository":2873,"state":2883,"title":2917,"updated_at":2918,"url":2919,"score":2920},"### Is your feature request related to a problem? Please describe.\n\nThere are situations where information about the build process is required before vitepress finish, which cannot be done from a Vite plugin. For example, adding a PWA including the generated pages in the service worker manifest.\r\n\r\nThe current problem is that we have to include scripts after the vitepress build so that it loads the PWA plugin manually and regenerates the PWA on the distribution folder and it is a very repetitive arduous job.\r\n\n\n### Describe the solution you'd like\n\nAdding a `build-end` hook providing the Vite config and the routes generated by Vitepress.\r\n\r\nFor example, using `Astro` integrations, you can just add a `astro:build:done` hook, `Astro` just call this hook once SSG process finish and before finishing the build process (provides some info about the SSG result like routes and urls):\r\n\r\nhttps://docs.astro.build/en/reference/integrations-reference/#quick-api-reference\r\n\r\nI can make a PR for the build end hook.\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.",[2915],{"name":2866,"color":2867},706,"provide build end hook","2023-01-21T14:32:35Z","https://github.com/vuejs/vitepress/issues/706",0.72051066,{"description":2922,"labels":2923,"number":2924,"owner":2872,"repository":2873,"state":2883,"title":2925,"updated_at":2926,"url":2927,"score":2928},"I have a requirement should append post meta tag and custom H1 tag into vp-doc container, and I used BOM to manipulate this, like below:\r\n```vue\r\n\u003Ctemplate>\r\n \u003Cdiv ref=\"$h1Custom\">\r\n \u003Ch1 :id=\"page.title\" tabindex=\"-1\">\r\n {{ page.title }}\r\n \u003C/h1>\r\n \u003CMetadata :categories=\"frontmatter.categories\" :tags=\"frontmatter.tags\" :published-at=\"frontmatter.date\" />\r\n \u003C/div>\r\n\u003C/template>\r\n\u003Cscript setup lang=\"ts\">\r\nimport { useData } from 'vitepress';\r\nimport Metadata from './HYPostMetadata.vue'\r\nimport { nextTick, onMounted, ref, watch } from 'vue';\r\nconst $h1Custom = ref()\r\nconst { page, frontmatter } = useData()\r\n\r\nwatch(page, (value, oldValue) => {\r\n nextTick(() => {\r\n processH1Element()\r\n })\r\n})\r\n\r\nonMounted(() => {\r\n processH1Element()\r\n})\r\n\r\nfunction processH1Element() {\r\n const docDomContainer = window.document.querySelector('#VPContent')\r\n if (!docDomContainer) return\r\n const vpDoc = docDomContainer.querySelector('main .vp-doc div')\r\n vpDoc?.insertAdjacentElement('afterbegin', $h1Custom.value)\r\n}\r\n\r\n\u003C/script>\r\n```\r\nbut the h1 tag not add anchor because this not render by VitePress default process, how can I inject my template into the process? or which solution should I use ? I search [Build Hooks](https://vitepress.dev/reference/site-config#build-hooks), but seems not meet my need. ",[],3084,"[Query]Which hooks can I use to modifiy HTML or Vue before render process","2023-10-21T00:05:51Z","https://github.com/vuejs/vitepress/issues/3084",0.7211451,{"description":2930,"labels":2931,"number":2940,"owner":2872,"repository":2873,"state":2883,"title":2941,"updated_at":2942,"url":2943,"score":2944},"### Describe the bug\n\nJust like the Vite docs, I use custom styles in the `index.md` file using `\u003Cstyle module>`. I also use custom components in which I use `\u003Cstyle scoped>`.\r\n\r\nSince I updated from version `1.0.0` to the latest one (the one in the StackBlitz), the built page's styles are broken. In the dev preview everything looks like expected.\n\n### Reproduction\n\nOpen the StackBlitz Demo with this [link](https://stackblitz.com/edit/vite-1qtmk8?file=docs%2Findex.md).\r\n\r\nIf it does not run automatically, run `npm install && npm run dev`. It should look something like this:\r\n\r\n\r\n\r\nThen run `npm run docs:build && npm run docs:preview` and it will look like this:\r\n\r\n\r\n\r\nAs you can see, the hero image and its background are different and the cards are different as well.\n\n### Expected behavior\n\nI expected the built version to look just like the dev preview (or at least very close).\n\n### System Info\n\n```Text\nSystem:\r\n OS: Windows 10 10.0.19045\r\n CPU: (12) x64 AMD Ryzen 5 5500U with Radeon Graphics\r\n Memory: 6.45 GB / 15.35 GB\r\n Binaries:\r\n Node: 21.2.0 - C:\\Program Files\\nodejs\\node.EXE\r\n npm: 10.5.0 - C:\\Program Files\\nodejs\\npm.CMD\r\n pnpm: 9.1.2 - ~\\AppData\\Roaming\\npm\\pnpm.CMD\r\n Browsers:\r\n Edge: Chromium (127.0.2651.74)\r\n Internet Explorer: 11.0.19041.4355\r\n npmPackages:\r\n vitepress: ^1.3.1 => 1.3.1\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,2935,2936,2939],{"name":2933,"color":2934},"help wanted","008672",{"name":2866,"color":2867},{"name":2937,"color":2938},"upstream","BF29ED",{"name":2869,"color":2870},4098,"Styling discrepancies between dev and build","2025-01-05T04:42:47Z","https://github.com/vuejs/vitepress/issues/4098",0.72240734,{"description":2946,"labels":2947,"number":2951,"owner":2872,"repository":2873,"state":2883,"title":2952,"updated_at":2953,"url":2954,"score":2955},"**Describe the bug**\r\nThe typing for `UserConfig` includes a `markdown` property which gives you access to the **mardown-it** options. This is an incredibly useful feature but sadly even though I put this into the `.vitepress/config.js` and it is indeed picked up and placed into the UserConfig that property is then ignored and not processed by the `createVitePressPlugin()`. \r\n\r\nI can create a PR for this if that of any help.\r\n\r\n**To Reproduce**\r\nadd a `.vitepress/config.js` which includes:\r\n\r\n```js\r\nmodules.exports = {\r\n // ...\r\n markdown: {\r\n config: md => { console.log(\"made it\") }\r\n }\r\n}\r\n```\r\n\r\n**Expected behavior**\r\nit should report \"made it\" when running `vitepress dev`\r\n\r\n**System Info**\r\n- vitepress version: 0.7.4\r\n- vite version: v1.0.0-rc.9\r\n- Node version: 12.19.0\r\n- OS version: macOS\r\n\r\n**Additional context**\r\nAdd any other context about the problem here.\r\n",[2948],{"name":2949,"color":2950},"question","5D5FAE",133,"UserConfig allows `markdown` prop but it is then ignored","2023-01-21T16:24:14Z","https://github.com/vuejs/vitepress/issues/133",0.72444564,{"description":2957,"labels":2958,"number":2962,"owner":2872,"repository":2873,"state":2883,"title":2963,"updated_at":2964,"url":2965,"score":2966},"### Is your feature request related to a problem? Please describe.\r\n\r\nWhen I use Element-Plus in VitePress, the partial style of the component is modified. The reason is VitePress `src/client/theme-default/styles/layout.css` File reset all styles.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n### Describe the solution you'd like\r\n\r\nI hope this code only takes effect in VitePress.\r\n\r\n### Describe alternatives you've considered\r\n\r\n_No response_\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/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.",[2959],{"name":2960,"color":2961},"duplicate","cfd3d7",434,"This is a suggestion","2023-01-21T16:04:15Z","https://github.com/vuejs/vitepress/issues/434",0.72846144,["Reactive",2968],{},["Set"],["ShallowReactive",2971],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$faOJg2_-GYUibxu621pxB4OAnte431_6N_4wu-KV8fo8":-1},"/vuejs/vitepress/3109"]