\r\n title: Feature A\r\n details: Lorem ipsum dolor sit amet, consectetur adipiscing elit\r\n```\r\n\r\nCheck the feature icon type\r\n```ts\r\ntype FeatureIcon =\r\n | string\r\n | { src: string; alt?: string; width?: string; height: string }\r\n | {\r\n light: string\r\n dark: string\r\n alt?: string\r\n width?: string\r\n height: string\r\n }\r\n```\r\n\r\nI refer to the render logic, use `v-html` render the icon.\r\nDisplay well in `dev` environment, but shows errors in `prod` environment.\r\n\r\n| dev | build |\r\n| ----------- | ----------- |\r\n|  |  |\r\n\r\n\r\n\r\n\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/github/zyyv/vitepress-unocss-issue\r\n\r\n- Display right run `pnpm dev`\r\n- Display error run `pnpm build && pnpm preview`\r\n\r\n### Expected behavior\r\n\r\nDev and build behave the same\r\n\r\n### System Info\r\n\r\n```Text\r\nlatest\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.",[2884,2885,2888],{"name":2868,"color":2869},{"name":2886,"color":2887},"has-workaround","1B4515",{"name":2871,"color":2872},4045,"SSR in dev for more consistent output in dev and prod","2025-03-02T18:08:58Z","https://github.com/vuejs/vitepress/issues/4045",0.7842613,{"description":2895,"labels":2896,"number":2899,"owner":2874,"repository":2875,"state":2876,"title":2900,"updated_at":2901,"url":2902,"score":2903},"### Is your feature request related to a problem? Please describe.\r\n\r\nWhen I write some document with `vitepress`, I usually need to write the following code:\r\n\r\n````md\r\n::: code-group\r\n\r\n```sh [npm]\r\n$ npm add -D cli-tool\r\n```\r\n\r\n```sh [pnpm]\r\n$ pnpm add -D cli-tool\r\n```\r\n\r\n```sh [yarn]\r\n$ yarn add -D cli-tool\r\n```\r\n\r\n```sh [bun]\r\n$ bun add -D cli-tool\r\n```\r\n\r\n:::\r\n````\r\n\r\nMaybe we can provide a shortcut command like this:\r\n\r\n```md\r\n:pm-install{name=\"cli-tool\"}\r\n```\r\n\r\nAnd even more: \r\n\r\n```md\r\n:pm-run{script=\"dev\"}\r\n\r\n:pm-x{command=\"cli-tool init\"}\r\n```\r\n\r\nTo generate the code in build time. And even with `icon`\r\n\r\n### Describe the solution you'd like\r\n\r\nLike this link: https://undocs.pages.dev/guide/components#package-manager\r\n\r\n### Describe alternatives you've considered\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\nIf the request is granted, I'd be happy to design a detailed plan and start a PR\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.",[2897,2898],{"name":2886,"color":2887},{"name":2871,"color":2872},3616,"Support some shortcut commands such as `pm-install` to generate code-group conveniently!","2025-03-02T18:09:35Z","https://github.com/vuejs/vitepress/issues/3616",0.7852236,{"description":2905,"labels":2906,"number":2911,"owner":2874,"repository":2875,"state":2876,"title":2912,"updated_at":2913,"url":2914,"score":2915},"### Is your feature request related to a problem? Please describe.\n\n例如:将图片换成类似这种脚本框\r\n\r\n\n\n### Describe the solution you'd like\n\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- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[2907,2910],{"name":2908,"color":2909},"theme","0754FB",{"name":2871,"color":2872},3759,"如何将主页Hero 中的图片替换为其他内容","2025-03-02T18:09:26Z","https://github.com/vuejs/vitepress/issues/3759",0.78733283,{"description":2917,"labels":2918,"number":2926,"owner":2874,"repository":2875,"state":2876,"title":2927,"updated_at":2928,"url":2929,"score":2930},"### Describe the bug\r\n\r\nHello 👋 from the [Effect-TS](https://github.com/Effect-TS) community :) \r\n\r\nWe have recently been experimenting with using different frameworks for building our [documentation website](https://effect.website/docs). I decided to try building our documentation with Vitepress because of your native integration with Shiki Twoslash (via `@shikijs/vitepress-twoslash`), which we make extensive use of in our docs. \r\n\r\nHowever, when I attempt to build our documentation with Vitepress and Shiki Twoslash, I consistently receive a `JavaScript heap out of memory` error. I have attempted to increase the `--max-old-space-size` to ~8GB and still encounter this issue.\r\n\r\n**With Twoslash Integration**\r\n\r\n\r\n\r\nIn my `.vitepress/config.ts`, if I remove the `transformerTwoslash` from the `markdown.codeTransformers` array, the build succeeds without issue in ~20 seconds.\r\n\r\n**Without Twoslash Integration**\r\n\r\n\r\n\r\nAlso, please let me know if it is more appropriate to move this issue to the Shiki project. If so, I have no problem closing this issue and moving it 👍 Thank you for your time!\r\n\r\n### Reproduction\r\n\r\n1. Clone our docs experiment\r\n\r\n ```sh\r\n git clone https://github.com/IMax153/vitepress-memory-leak-repro.git\r\n ```\r\n\r\n2. Install dependencies\r\n\r\n ```sh\r\n pnpm install\r\n ```\r\n\r\n3. Attempt to build\r\n\r\n ```sh\r\n pnpm build\r\n ```\r\n\r\n### Expected behavior\r\n\r\nMy expected behavior would be for Vitepress to be able to build our docs with Shiki Twoslash integrated without issue.\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: macOS 14.6.1\r\n CPU: (10) arm64 Apple M1 Pro\r\n Memory: 1.99 GB / 16.00 GB\r\n Shell: 5.9 - /nix/store/w53pgqwh5dm38skdd7n7wn0k6cw72jzj-zsh-5.9/bin/zsh\r\nBinaries:\r\n Node: 20.17.0 - /nix/store/hxl1k8qgmrm1vfq5f419iv4wybz9szqq-nodejs-20.17.0/bin/node\r\n npm: 10.8.2 - /nix/store/hxl1k8qgmrm1vfq5f419iv4wybz9szqq-nodejs-20.17.0/bin/npm\r\n pnpm: 9.10.0 - /nix/store/ddjsxwcpw09llisgvw7drvr92dbkg4mi-corepack-nodejs-20.17.0/bin/pnpm\r\nBrowsers:\r\n Chrome: 129.0.6668.70\r\n Safari: 17.6\r\nnpmPackages:\r\n vitepress: ^1.3.4 => 1.3.4\r\n\r\nNote: I use Nix for provisioning my system, hence the strange looking binary paths.\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nI've included a script in the `package.json` that reduces the available NodeJS heap memory (to force an OOM earlier) and takes a heap snapshot right before an OOM error occurs in case that is useful for you folks.\r\n\r\n```sh\r\npnpm build:snapshot\r\n```\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.",[2919,2922,2923],{"name":2920,"color":2921},"upstream","BF29ED",{"name":2871,"color":2872},{"name":2924,"color":2925},"perf","378A61",4242,"[Memory Leak]: Builds incorporating Shiki Twoslash crash with JavaScript heap out of memory errors","2025-03-02T18:08:28Z","https://github.com/vuejs/vitepress/issues/4242",0.7884716,{"description":2932,"labels":2933,"number":2935,"owner":2874,"repository":2875,"state":2936,"title":2937,"updated_at":2938,"url":2939,"score":2940},"### Is your feature request related to a problem? Please describe.\r\n\r\nThere is no easy way to have captions for images.\r\n\r\n### Describe the solution you'd like\r\n\r\nAny image I'm adding as `{.image}` should have the caption be generated as \"Text here\" in the `\u003Cfigcaption>` element below the image. The entire thing should be in a `\u003Cfigure>` element and either the `\u003Cimg>` or `\u003Cfigure>` should have `class=\"image\"`.\r\n\r\nSo basically,\r\n```markdown\r\n{.image}\r\n```\r\nshould generate\r\n```html\r\n\u003Cfigure>\r\n \u003Cimg class=\"image\" src=\"/path/to/image/\" alt=\"Alt text here\">\r\n \u003Cfigcaption>Text here\u003C/figcaption>\r\n\u003C/figure>\r\n```\r\nThis would allow to link to licenses and provide attribution to image sources. \r\n\r\n\r\n### Describe alternatives you've considered\r\n\r\nI've tried using [`markdown-it-image-caption`](https://www.npmjs.com/package/markdown-it-image-caption), [`markdown-it-figure-caption`](https://www.npmjs.com/package/markdown-it-figure-caption) and [`mdfigcaption`](https://www.npmjs.com/package/mdfigcaption), but none were suitable for me.\r\n\r\nThe issue I'm having with all of these is that they're not letting me add my own classes to the `\u003Cfigure>` element, so I can't theme each image individually. This is an issue since the images I'm using need to be of different sizes depending on where they are in the text, which classes allow me to do.\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] 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.",[2934],{"name":2868,"color":2869},892,"closed","Image captions","2023-01-21T14:32:51Z","https://github.com/vuejs/vitepress/issues/892",0.7706713,{"description":2942,"labels":2943,"number":2945,"owner":2874,"repository":2875,"state":2936,"title":2946,"updated_at":2947,"url":2948,"score":2949},"### Describe the bug\r\n\r\nhttps://github.com/vuejs/vitepress/blob/75ca9e4302c65e3bcc9518f7df928318380f6cf6/src/node/markdown/plugins/highlightLines.ts#L30\r\n\r\n`highlightLinePlugin` is used before `attrs`, and `token.info` is rewritten.\r\n\r\nvia https://github.com/vuejs/vitepress/pull/664#discussion_r902203459\r\n\r\n### Reproduction\r\n\r\n\u003Cimg width=\"177\" alt=\"image\" src=\"https://user-images.githubusercontent.com/8336744/174726207-1c068f94-f597-4d5e-9101-4709a08a60c3.png\">\r\n\r\n\u003Cimg width=\"299\" alt=\"image\" src=\"https://user-images.githubusercontent.com/8336744/174726233-83967c42-db47-4c12-8dbd-0c83a817c448.png\">\r\n\r\n\r\n### Expected behavior\r\n\r\nRender `data=\"asdf\"`\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: macOS 13.0\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 13.84 GB / 64.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.15.1 - ~/Library/Caches/fnm_multishells/95455_1655742557079/bin/node\r\n Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/95455_1655742557079/bin/yarn\r\n npm: 8.12.1 - ~/Library/Caches/fnm_multishells/95455_1655742557079/bin/npm\r\n Browsers:\r\n Chrome: 102.0.5005.115\r\n Firefox: 101.0.1\r\n Safari: 16.0\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.2 => 1.0.0-alpha.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] 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.",[2944],{"name":2871,"color":2872},826,"support adding attributes to code blocks","2023-08-11T00:04:28Z","https://github.com/vuejs/vitepress/issues/826",0.77589893,{"description":2951,"labels":2952,"number":2956,"owner":2874,"repository":2875,"state":2936,"title":2957,"updated_at":2958,"url":2959,"score":2960},"### Describe the bug\n\n布局 home ,build以后不显示,最新版本\n\n### Reproduction\nlayout: home\n\nhero:\n name: xxx\n image:\n src: /logo.png\n tagline: xxx\n actions:\n - theme: brand\n text: xxx\n link: /x/xx\n\n\n### Expected behavior\n\n希望正常显示 layout:home\n\n### System Info\n\n```Text\n\"vitepress\": \"^2.0.0-alpha.5\",\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.",[2953],{"name":2954,"color":2955},"need more info","bdbefc",4744,"布局 home ,build以后不显示,最新版本","2025-05-13T03:47:00Z","https://github.com/vuejs/vitepress/issues/4744",0.7812149,{"description":2962,"labels":2963,"number":2965,"owner":2874,"repository":2875,"state":2936,"title":2966,"updated_at":2967,"url":2968,"score":2969},"### Is your feature request related to a problem? Please describe.\n\nI've built up great docs in Vitepress but I need an API reference built off an OpenApi 3.1 spec. I'm having trouble finding a clean, \"Vitepressy\" way of doing this. \n\n### Describe the solution you'd like\n\nI'd like to setup a Vitepress layout (e.g., \"openapi\") and simply point to either a URL or file OpenAPI 3.1 spec which renders as nicely as [Stoplight Elements](https://stoplight.io/open-source/elements) but inherits the Vitepress theme, navigation, dark mode/lightmode etc.\n\n### Describe alternatives you've considered\n\nI tried to wrap [Stoplight Elements](https://stoplight.io/open-source/elements), but it was very heavy and slow and I couldn't figure out how to get the theme to match:\r\n```\r\n---\r\nlayout: false\r\n---\r\n\r\n\u003Clink rel=\"stylesheet\" href=\"https://unpkg.com/@stoplight/elements/styles.min.css\"/>\r\n\r\n\u003Ctemplate>\r\n \u003Ccomponent\r\n src=\"https://unpkg.com/@stoplight/elements/web-components.min.js\"\r\n :is=\"'script'\"\r\n >\u003C/component>\r\n\u003C/template>\r\n\r\n\u003CClientOnly>\r\n \u003Celements-api\r\n apiDescriptionUrl=\"https://raw.githubusercontent.com/stoplightio/Public-APIs/master/reference/zoom/openapi.yaml\"\r\n layout=\"sidebar\"\r\n router=\"hash\"\r\n />\r\n\u003C/ClientOnly>\r\n```\r\n If there are good other options out there that I don't know about, I'd gladly settle for the recommendation.\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.",[2964],{"name":2871,"color":2872},2091,"Provide supported approach for rendering API docs generated from an OpenAPI spec","2023-08-23T00:04:05Z","https://github.com/vuejs/vitepress/issues/2091",0.7828624,{"description":2971,"labels":2972,"number":2974,"owner":2874,"repository":2875,"state":2936,"title":2975,"updated_at":2976,"url":2977,"score":2978},"https://github.com/vuejs/vitepress/commit/804954cf4d5417b1abcba9854ed5f064348292c5#diff-332834eb76757b8e31926e411cef34f7207564d0bf5fd00a185b41d97b3403bfR53\r\n\r\nThis change is not backwards compatible, it would be nice if the value could be set by default.\r\n\r\n_Originally posted by @ST-DDT in https://github.com/vuejs/vitepress/pull/502#issuecomment-1051312775_",[2973],{"name":2868,"color":2869},555,"Change createMarkdownRenderer base to default to `''`","2023-01-21T14:35:37Z","https://github.com/vuejs/vitepress/issues/555",0.7861536,["Reactive",2980],{},["Set"],["ShallowReactive",2983],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fFCDqW6-qJr_vZ9Kcr2NunT1KCgBNGrNL84uNpTkRkGw":-1},"/vuejs/vitepress/3685"]