\r\n \u003C/template>\r\n\u003C/ClientOnly>\r\n```\r\nAnd I feel like `ClientOnly` doesn't seem to work. I'm not sure if it should be used here.\r\n\r\nmy package.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 --open\",\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\": \"1.0.0-alpha.45\"\r\n },\r\n \"dependencies\": {\r\n \"browser-tool\": \"^1.0.3\"\r\n }\r\n}\r\n```\r\n`browser-tool` can do this: Browser analysis / browser detection / browser identification / browser judgment / UA parsing-user agent, operating system information\r\n\r\nAll in all, the reason why I do this is that edge browsers do not support avif image format. I need to judge that if the user's browser is edge, it will remind users to change their browsers to read blogs for a better experience.\r\n\r\n\n\n### Reproduction\n\nIf it's convenient for you, this is my repo:\r\nhttps://github.com/you-hengh/myblog_vitepress\r\n\r\nIn short, in the development environment, there will be a notification when opening the homepage with edge browser.\r\n\r\n\u003Cimg width=\"612\" alt=\"image\" src=\"https://user-images.githubusercontent.com/34816426/218310448-032c69bc-4c3f-44e3-997a-5080761fe69c.png\">\r\n\r\n\r\nBut in a production environment, edge visits the home page without this notification, which is not normal.\r\n\r\n\u003Cimg width=\"517\" alt=\"image\" src=\"https://user-images.githubusercontent.com/34816426/218310530-9b1f1aa7-e189-473d-9afe-0bccc7fc336d.png\">\r\n\r\n\r\nI don't know how to get it back to normal. Please help me.\n\n### Expected behavior\n\nIt should be packaged and run as well as in the development environment.\r\n\u003Cimg width=\"1512\" alt=\"image\" src=\"https://user-images.githubusercontent.com/34816426/218309052-4642bae2-53da-43d6-aa98-50297732db1f.png\">\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 13.2\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 3.39 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: 109.0.5414.119\r\n Edge: 109.0.1518.70\r\n Safari: 16.3\n```\n\n\n### Additional context\n\nWorking normally in the development environment:\r\n\r\n\u003Cimg width=\"1512\" alt=\"image\" src=\"https://user-images.githubusercontent.com/34816426/218309052-4642bae2-53da-43d6-aa98-50297732db1f.png\">\r\n\r\nBut after packing, the work is not normal:\r\n\u003Cimg width=\"1512\" alt=\"image\" src=\"https://user-images.githubusercontent.com/34816426/218309239-ac091181-61c3-4546-96c9-45c67d231369.png\">\r\n\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.",[2922],{"name":2923,"color":2924},"bug: pending triage","e99695",1929,"Referencing the third library has no effect after packaging","2023-03-29T00:04:14Z","https://github.com/vuejs/vitepress/issues/1929",0.78665704,{"description":2931,"labels":2932,"number":2934,"owner":2866,"repository":2867,"state":2903,"title":2935,"updated_at":2936,"url":2937,"score":2938},"### Describe the bug\r\n\r\nSuch code:\r\n\r\n````md\r\n```vue twoslash :line-numbers\r\n\u003Cscript setup lang=\"ts\">\r\nimport {ref} from 'vue';\r\n\r\nconst message = ref('Hello world!');\r\n\u003C/script>\r\n```\r\n````\r\n\r\ncode block line numbers would be from 1 to 2, rather than from 1 to 5, [see here](http://localhost:5173/knowledge-base/TODO#bug)\r\n\r\n### Reproduction\r\n\r\nusing such code in `vitepress`:\r\n\r\n````md\r\n```vue twoslash :line-numbers\r\n\u003Cscript setup lang=\"ts\">\r\nimport {ref} from 'vue';\r\n\r\nconst message = ref('Hello world!');\r\n\u003C/script>\r\n```\r\n````\r\n\r\n### Expected behavior\r\n\r\nline number works correctly\r\n\r\n### System Info\r\n\r\n```Text\r\nnone\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.",[2933],{"name":2923,"color":2924},3972,"[BUG]","2024-06-28T04:43:03Z","https://github.com/vuejs/vitepress/issues/3972",0.7913562,{"description":2940,"labels":2941,"number":2942,"owner":2866,"repository":2867,"state":2903,"title":2943,"updated_at":2944,"url":2945,"score":2946},"I noticed that `VitePress` imports `@vue/shared`, but it appears to only use one of its methods. However, there are more methods available in `@vue/shared`. Should `VitePress` directly import these additional methods from `@vue/shared` to reduce redundancy in the code?\r\n\r\nHere is one case of what I mentioned:\r\n\r\n`vitepress`:\r\nhttps://github.com/vuejs/vitepress/blob/a6a7645e942cc63c57ca5d79da4b76dee76d8a96/src/node/config.ts#L229\r\n\r\n`@vue/shared`:\r\nhttps://github.com/vuejs/core/blob/db374e54c9f5e07324728b85c74eca84e28dd352/packages/shared/src/general.ts#L52\r\n\r\nSeems that can directly use `import { isObject } from '@vue/shared`.",[],3720,"Reuse some of the existing methods in `@vue/shared`","2024-04-28T12:24:53Z","https://github.com/vuejs/vitepress/issues/3720",0.79196256,{"description":2948,"labels":2949,"number":2951,"owner":2866,"repository":2867,"state":2903,"title":2952,"updated_at":2953,"url":2954,"score":2955},"### Describe the bug\n\nmarkdown 图片自定义渲染,token.attrGet('alt') 获取不到值。\n` md.renderer.rules.image = (tokens, idx, options, env, self) => {\n const token = tokens[idx];\n let alt = token.attrGet('alt');\n console.log(\"alt :\"+ alt);\n let result = self.renderToken(tokens, idx, options);\n if (alt) {\n result += `\\n\u003CClientOnly>\u003CTableCaption title='${alt}' />\u003C/ClientOnly>`\n }\n return result;\n }`\n这段代码alt的值获取不到。\n\n### Reproduction\n\nconfig.js 的markdown配置中配置如下:\n` md.renderer.rules.image = (tokens, idx, options, env, self) => {\n const token = tokens[idx];\n let alt = token.attrGet('alt');\n console.log(\"alt :\"+ alt);\n let result = self.renderToken(tokens, idx, options);\n if (alt) {\n result += `\\n\u003CClientOnly>\u003CTableCaption title='${alt}' />\u003C/ClientOnly>`\n }\n return result;\n }`\n\n### Expected behavior\n\n希望可以取到alt属性值。\n\n### System Info\n\n```Text\nSystem:\n OS: macOS 15.3.1\n CPU: (8) arm64 Apple M1\n Memory: 77.58 MB / 8.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n Node: 23.6.0 - ~/.nvm/versions/node/v23.6.0/bin/node\n npm: 10.9.2 - ~/.nvm/versions/node/v23.6.0/bin/npm\n pnpm: 8.15.0 - ~/Library/pnpm/pnpm\n Browsers:\n Chrome: 133.0.6943.142\n Safari: 18.3\n npmPackages:\n vitepress: ^1.6.3 => 1.6.3\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.",[2950],{"name":2923,"color":2924},4607,"markdown 图片自定义渲染,token.attrGet('alt') 获取不到值","2025-03-17T04:44:43Z","https://github.com/vuejs/vitepress/issues/4607",0.79654944,{"description":2957,"labels":2958,"number":2965,"owner":2866,"repository":2867,"state":2903,"title":2966,"updated_at":2967,"url":2968,"score":2969},"Hi guys, I hope you are well. I have forked to check spanish #translation. It is working for some files I have tested. I would like to contribute. Thanks.",[2959,2962],{"name":2960,"color":2961},"docs","0075ca",{"name":2963,"color":2964},"translations","6366D3",3850,"docs: add spanish translation","2024-06-14T04:41:50Z","https://github.com/vuejs/vitepress/issues/3850",0.7988054,["Reactive",2971],{},["Set"],["ShallowReactive",2974],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fozWed9EOe5lAENuCWJgiItkiMm2bq_QJ_OLIoNj-GfA":-1},"/vuejs/vitepress/656"]