\n\n### Expected behavior\n\nI hope to use SVG and other methods instead of using masks to display icons, which can avoid frequent redrawing\n\n### System Info\n\n```Text\n\"vitepress\": \"^1.6.4\",\n```\n\n### Additional context\n\n\u003Cimg width=\"2559\" height=\"1042\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/39db5990-f3ee-47bb-8bcf-49272a1918f4\" />\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.",[3145],{"name":3146,"color":3147},"bug: pending triage","e99695",4917,"vuejs","vitepress","open","Bug: Frequent triggering of redrawing of navigation bar icons","2025-08-21T09:14:41Z","https://github.com/vuejs/vitepress/issues/4917",0.71927273,{"description":3157,"labels":3158,"number":3160,"owner":3149,"repository":3150,"state":3151,"title":3161,"updated_at":3162,"url":3163,"score":3164},"### Describe the bug\n\n\n\n\n\nI accidentally used AI to generate a text of an md, and found that there was a text overflow problem\n\n### Reproduction\n\nAs described above\n\n### Expected behavior\n\nThe text should not overflow\n\n### System Info\n\n```Text\ndefault config 、edge\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.",[3159],{"name":3146,"color":3147},4798,"Rendering or parsing issues with Markdown","2025-06-21T09:57:36Z","https://github.com/vuejs/vitepress/issues/4798",0.72346824,{"description":3166,"labels":3167,"number":3172,"owner":3149,"repository":3150,"state":3151,"title":3173,"updated_at":3174,"url":3175,"score":3176},"### Describe the bug\r\n\r\nI'm trying to piece together how to properly create\r\n```html\r\n\u003Cmeta property=\"og:image\" content=\"https://my.page/images/example.png\">\r\n```\r\nand similar.\r\n\r\nI found\r\n- https://github.com/vuejs/vitepress/issues/504 which just points out links need to be absolute\r\n- https://github.com/vuejs/vitepress/issues/551 where a bunch of questions are asked and then just the transformHead API is linked\r\n- the docs for https://vitepress.dev/reference/site-config#transformhead.\r\n\r\nI tried to reference the image from frontmatter;\r\nbut while the direct markdown image reference is resolved and copied out, the frontmatter URL stays the same.\r\n\r\n```yaml\r\n---\r\ntitle: \"Title\"\r\ndescription: \"Desc\"\r\nhead:\r\n - - meta\r\n - name: property=\"og:image\"\r\n content: ./../src/relative/image.jpg\r\n---\r\n\r\n\r\n```\r\n\r\nThe above _should_ in my opinion result in the image being copied over and the path resolved, and then the path could be further transformed in transformHead given some known absolute target URL where the website will end up at.\r\n\r\nI also tried\r\n`content: url(./../src/relative/image.jpg)`\r\nin the hopes that this will trigger vite/vitepress understanding that's a file/url and should be treated as such, but that didn't work either.\r\n\r\n### Reproduction\r\n\r\nIt seems I can't upload images at vitepress.new, so can't add a repro there. I hope above explanation is sufficient.\r\n\r\n### Expected behavior\r\n\r\n1. Ability to reference relative images from frontmatter so they're bundled properly\r\n2. Docs for how to transform them to absolute URLs for use as meta tags\r\n\r\n### System Info\r\n\r\n```sh\r\nSystem:\r\n OS: Windows 10 10.0.22621\r\n CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz\r\n Memory: 32.63 GB / 63.85 GB\r\n Binaries:\r\n Node: 18.13.0 - D:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.19 - ~\\AppData\\Roaming\\npm\\yarn.CMD\r\n npm: 8.13.2 - D:\\Program Files\\nodejs\\npm.CMD\r\n Browsers:\r\n Chrome: 113.0.5672.127\r\n Edge: Spartan (44.22621.1702.0), Chromium (113.0.1774.35)\r\n Internet Explorer: 11.0.22621.1\r\n npmPackages:\r\n vitepress: ^1.0.0-beta.1 => 1.0.0-beta.1\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nThere could also be additional processing steps involved on images (e.g. vite imagetools), so I think images referenced from frontmatter should be bundled/processed too.\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.",[3168,3169],{"name":3146,"color":3147},{"name":3170,"color":3171},"stale","ededed",2419,"Frontmatter: images in meta tags aren't resolved/bundled","2023-08-03T10:15:36Z","https://github.com/vuejs/vitepress/issues/2419",0.7259834,{"description":3178,"labels":3179,"number":3183,"owner":3149,"repository":3150,"state":3184,"title":3185,"updated_at":3186,"url":3187,"score":3188},"### Is your feature request related to a problem? Please describe.\r\n\r\nI'd like to override `\u003Cmeta name=\"description\">` for each page via `transformHead()`\r\n\r\nhttps://vitepress.dev/reference/site-config#transformhead\r\n\r\nHow it only adds it. So there are 2 `\u003Cmeta description>`s.\r\n\r\n### Describe the solution you'd like\r\n\r\nI'd like to get a chance to remove or override the default `\u003Cmeta description>` for a certain page.\r\n\r\n### Describe alternatives you've considered\r\n\r\nOr having an option to disable the default `\u003Cmeta description>`.\r\n\r\n### Additional context\r\n\r\nReproduction link: https://github.com/Jinjiang/reproductions/tree/vitepress-head-dedupe-20230728\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.",[3180],{"name":3181,"color":3182},"build","377ba8",2695,"closed","Override/deduplicate meta heads in transformHead()","2023-08-06T00:04:30Z","https://github.com/vuejs/vitepress/issues/2695",0.62421095,{"description":3190,"labels":3191,"number":3192,"owner":3149,"repository":3150,"state":3184,"title":3193,"updated_at":3194,"url":3195,"score":3196},"**Describe the bug**\r\n\r\nWhen you set a custom meta description within the config.js and set a description at a page level using frontmatter, the build output has 2 meta descriptions\r\n\r\n**To Reproduce**\r\n\r\nAdd a description in the vitepress config\r\n\r\n```js\r\n// .vitepress/config.js\r\n\r\nmodule.exports = {\r\n // ...\r\n description: 'Hey 👋 I'm building Laravel & Vue projects and would like to share my journey with you.',\r\n // ...\r\n}\r\n```\r\n\r\nAdd a description for a page\r\n\r\n```md\r\n// about/index.md\r\n\r\n---\r\ntitle: About\r\ndescription: \"My name's Harlan. I am a full stack developer living and working out of Sydney, Australia.\"\r\nhead:\r\n- - meta\r\n - name: description\r\n content: \"My name's Harlan. I am a full stack developer living and working out of Sydney, Australia.\"\r\n---\r\n\r\n# {{ $page.title }}\r\n\r\nHey! Thank you for checking out my site 😊\r\n```\r\n\r\nLive example: https://harlanzw.com/about/\r\n\r\n**Expected behavior**\r\n\r\nA single meta description should be present, with the description from the page (about.md) taking precedence over the vitepress config description.\r\n\r\n**System Info**\r\n- vitepress version: 0.10.4\r\n- vite version: 2.0.0-beta.1\r\n- Node version: 14.15.1\r\n- OS version: Linux Mint 20\r\n\r\n\r\n",[],194,"Duplicate Meta Descriptions In Build Output","2023-01-21T16:22:32Z","https://github.com/vuejs/vitepress/issues/194",0.67692196,{"description":3198,"labels":3199,"number":3202,"owner":3149,"repository":3150,"state":3184,"title":3203,"updated_at":3204,"url":3205,"score":3206},"### Describe the bug\n\nI am writing a transformHead function that would automatically generate some meta tags.\r\n\r\nSome meta tags would have content as an URL (e.g. `og:image`).\r\n\r\nSince the content is [escaped](https://github.com/vuejs/vitepress/blob/main/src/node/build/render.ts#L249-L255), it makes it impossible to do so.\n\n### Reproduction\n\nhttps://stackblitz.com/edit/vite-8sef84\r\n\r\nI have added this\r\n```ts\r\n transformHead() {\r\n return [\r\n [\r\n 'meta',\r\n {\r\n name: 'og:image',\r\n content:\r\n 'https://static.independent.co.uk/s3fs-public/thumbnails/image/2017/07/11/11/harold-0.jpg?width=1200&something',\r\n },\r\n ],\r\n ];\r\n },\r\n```\r\n\r\nAnd if you inspect the HTML generated, the meta tag is\r\n\r\n```\r\n\u003Cmeta name=\"og:image\" content=\"https://static.independent.co.uk/s3fs-public/thumbnails/image/2017/07/11/11/harold-0.jpg?width=1200&something\">\r\n```\n\n### Expected behavior\n\nto generate unescaped URLs\r\n\r\n\r\n```diff\r\n-\u003Cmeta name=\"og:image\" content=\"https://static.independent.co.uk/s3fs-public/thumbnails/image/2017/07/11/11/harold-0.jpg?width=1200&something\">\r\n+\u003Cmeta name=\"og:image\" content=\"https://static.independent.co.uk/s3fs-public/thumbnails/image/2017/07/11/11/harold-0.jpg?width=1200&something\">\r\n```\n\n### System Info\n\n```shell\nsuccess Install finished in 1.095s\r\n\r\n\r\n System:\r\n OS: Linux 5.0 undefined\r\n CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\r\n Memory: 0 Bytes / 0 Bytes\r\n Shell: 1.0 - /bin/jsh\r\n Binaries:\r\n Node: 16.14.2 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 7.17.0 - /usr/local/bin/npm\r\n npmPackages:\r\n vitepress: latest => 1.0.0-alpha.64\n```\n\n\n### Additional context\n\nI understand that in most cases we would need to escape the value in attributes. But perhaps we can do either of the followings to allow cases like this:\r\n\r\n1. if the value is URL-like, do not escape; or\r\n2. add a `doNotEscape` option to `HeadConfig` to hint the compiler not to escape.\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.",[3200,3201],{"name":3146,"color":3147},{"name":3170,"color":3171},2190,"transformHead's content got escaped","2023-09-25T00:04:31Z","https://github.com/vuejs/vitepress/issues/2190",0.6799488,{"description":3208,"labels":3209,"number":3210,"owner":3149,"repository":3150,"state":3184,"title":3211,"updated_at":3212,"url":3213,"score":3214},"### Is your feature request related to a problem? Please describe.\n\nWhen the user configures build hooks, the theme's build hooks are overwritten.\r\n\r\n当用户配置 build hooks 时, 会覆盖掉主题的 build hooks.\n\n### Describe the solution you'd like\n\nFor example, when there is a `transformHead` in the theme, the user adds a `transformHead` in their configuration to override the processing of the theme and has to handle it as follows: Is it possible to place this processing inside `vitepress`?\r\n\r\n以为 `transformHead` 为例, 当主题里存在 `transformHead` , 用户在自己配置里添加 `transformHead` 会覆盖掉主题的处理, 不得不像下面那样处理, 能否将这种处理放置在 `vitepress` 内部处理呢?\r\n\r\n``` ts\r\n// user config\r\nimport Config from 'vitepress-theme-xxx';\r\n\r\n{\r\n async transformHead(content) {\r\n const { transformHead } = await Config()\r\n if (transformHead) {\r\n\t transformHead(content)\r\n }\r\n // do something\r\n }\r\n}\r\n```\r\n---\r\n\r\nIt seems that useRouter's `onBeforeRouteChange` will also exist in `vitepress`, and overrides will also exist when multiple internal components declare onBeforeRouteChange\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- [ ] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],3109,"When the user configures build hooks, the theme's build hooks are overwritten","2023-10-28T00:04:01Z","https://github.com/vuejs/vitepress/issues/3109",0.7101435,{"description":3216,"labels":3217,"number":3219,"owner":3149,"repository":3150,"state":3184,"title":3220,"updated_at":3221,"url":3222,"score":3223},"### Describe the bug\n\nHTML rendered within the `buildEnd` hook contain `{{ $frontmatter.title }}` rather than the actual title contained with the frontmatted metadata. \n\n### Reproduction\n\n\r\n\r\nHere is my implementation:\r\nhttps://github.com/CodyBontecou/blog/commit/cd40a9d79f9954bf7f64fd329b0ee74b06c2dadc#diff-a2c09d222e870efa333dc7e96fbe9b10bc9b289553da72641eb52f7605a2ed51\n\n### Expected behavior\n\nI expect the `buildEnd` hook to have the template `$frontmatter` variables to be the value of what it's calling, not of `{{ $frontmatter.title }}`.\n\n### System Info\n\n```sh\nSystem:\r\n OS: macOS 13.4.1\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 128.91 MB / 32.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node\r\n Yarn: 1.22.15 - ~/.nvm/versions/node/v16.14.2/bin/yarn\r\n npm: 9.6.2 - ~/.nvm/versions/node/v16.14.2/bin/npm\r\n Watchman: 2023.07.24.00 - /opt/homebrew/bin/watchman\r\n Browsers:\r\n Chrome: 115.0.5790.170\r\n Safari: 16.5.2\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.44 => 1.0.0-beta.7\n```\n\n\n### Additional context\n\nYou can see the generated file at https://codybontecou.com/feed.rss.\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.",[3218],{"name":3146,"color":3147},2748,"Build hook buildEnd rendering $frontmatter in generated template.","2023-08-16T00:04:26Z","https://github.com/vuejs/vitepress/issues/2748",0.7136563,{"description":3225,"labels":3226,"number":3230,"owner":3149,"repository":3150,"state":3184,"title":3231,"updated_at":3232,"url":3233,"score":3234},"### Describe the bug\n\neg.\n```js\nexport default {\n data () {\n return {\n msg1: '1 Highlighted!' // [!code highlight]\n msg2: '2 Highlighted!' // [!code highlight]\n msg3: '3 Highlighted!' // [!code highlight]\n }\n }\n}\n```\n\n```js\nexport default {\n data () {\n return {\n // msg1: '1 Highlighted!' // [!code highlight]\n // msg2: '2 Highlighted!' // [!code highlight]\n // msg3: '3 Highlighted!' // [!code highlight]\n }\n }\n}\n```\n\n\u003Cimg width=\"742\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/4ecd55e7-2975-4229-9474-e7d884d633e6\" />\n\n### Reproduction\n\n{\n \"devDependencies\": {\n \"vitepress\": \"2.0.0-alpha.2\"\n },\n \"scripts\": {\n \"docs:dev\": \"vitepress dev docs\",\n \"docs:build\": \"vitepress build docs\",\n \"docs:preview\": \"vitepress preview docs\"\n }\n}\n\n### Expected behavior\n\n在被注释的代码行后面添加 `// [!code highlight]` 高亮的位置错误。\n\n```js\nexport default {\n data () {\n return {\n // msg1: '1 Highlighted!' // [!code highlight]\n }\n }\n}\n```\n\n\u003Cimg width=\"705\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/f1f5e3ce-3bc6-4939-b199-d9ac120ffab8\" />\n\n\n### System Info\n\n```Text\nChrome: 132.0.6834.160\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.",[3227],{"name":3228,"color":3229},"upstream","BF29ED",4546,"代码高亮渲染异常","2025-02-23T04:43:37Z","https://github.com/vuejs/vitepress/issues/4546",0.71618164,{"description":3236,"labels":3237,"number":3238,"owner":3149,"repository":3150,"state":3184,"title":3239,"updated_at":3240,"url":3241,"score":3242},"### Describe the bug\n\ncontent 部分没有 overflow:hidden 导致很长的滚动条(也有可能是我的图片太大?)\r\n\r\n[github here](https://github.com/Mt-Youya/DeepLearning-500-questions)\r\n\r\n[site here](https://deeplearning-500-questions.pages.dev/zh-cn/ch02_%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E5%9F%BA%E7%A1%80/%E7%AC%AC%E4%BA%8C%E7%AB%A0_%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E5%9F%BA%E7%A1%80.html)\n\n### Reproduction\n\n我fork 别人的仓库,不是我自己写的, 它原本用的是 docsify 我想提个pr用vitepress 试试,然后就出现了这个bug\n\n### Expected behavior\n\n没有滚动条\n\n### System Info\n\n```Text\nVersion 122.0.6261.112 (Official Build) (64-bit)\r\nwin11\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.",[],3644,"CSS bug","2024-03-19T00:07:30Z","https://github.com/vuejs/vitepress/issues/3644",0.71726334,["Reactive",3244],{},["Set"],["ShallowReactive",3247],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fvOSZUhXYKAY8dxk5jac2qcKKyJQco5lSGu6XnnUen0A":-1},"/vuejs/vitepress/4812"]