\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.",[2934],{"name":2904,"color":2905},4607,"closed","markdown 图片自定义渲染,token.attrGet('alt') 获取不到值","2025-03-17T04:44:43Z","https://github.com/vuejs/vitepress/issues/4607",0.6891229,{"description":2942,"labels":2943,"number":2945,"owner":2860,"repository":2861,"state":2936,"title":2946,"updated_at":2947,"url":2948,"score":2949},"### Describe the bug\n\nI created a monorepo containing 2 packages:\n1. the package i'm building (flyonui-vue)\n2. the docs about it\n\nthe docs use the published version of the package.\n\nwhen i build the docs in my local environment everything works fine. but then when i build them through the github action i get\n\n```\nRun yarn build:docs\n\n vitepress v1.5.0\n\n- building client + server bundles...\nx Build failed in [6](https://github.com/michaelcozzolino/flyonui-vue/actions/runs/12852703212/job/35835005640#step:7:7)[7](https://github.com/michaelcozzolino/flyonui-vue/actions/runs/12852703212/job/35835005640#step:7:8)7ms\n✖ building client + server bundles...\nbuild error:\n[commonjs--resolver] Failed to resolve entry for package \"flyonui-vue\". The package may have incorrect main/module/exports specified in its package.json.\n[commonjs--resolver] Failed to resolve entry for package \"flyonui-vue\". The package may have incorrect main/module/exports specified in its package.json.\n at packageEntryFailure (file:///home/runner/work/flyonui-vue/flyonui-vue/node_modules/vitepress/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:46637:15)\n at resolvePackageEntry (file:///home/runner/work/flyonui-vue/flyonui-vue/node_modules/vitepress/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:46634:3)\n at tryNodeResolve (file:///home/runner/work/flyonui-vue/flyonui-vue/node_modules/vitepress/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:46450:16)\n at Object.resolveId (file:///home/runner/work/flyonui-vue/flyonui-vue/node_modules/vitepress/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:46200:19)\n at file:///home/runner/work/flyonui-vue/flyonui-vue/node_modules/rollup/dist/es/shared/node-entry.js:20936:40\n at async PluginDriver.hookFirstAndGetPlugin (file:///home/runner/work/flyonui-vue/flyonui-vue/node_modules/rollup/dist/es/shared/node-entry.js:20[8](https://github.com/michaelcozzolino/flyonui-vue/actions/runs/12852703212/job/35835005640#step:7:9)36:28)\n at async resolveId (file:///home/runner/work/flyonui-vue/flyonui-vue/node_modules/rollup/dist/es/shared/node-entry.js:1[9](https://github.com/michaelcozzolino/flyonui-vue/actions/runs/12852703212/job/35835005640#step:7:10)440:26)\n at async ModuleLoader.resolveId (file:///home/runner/work/flyonui-vue/flyonui-vue/node_modules/rollup/dist/es/shared/node-entry.js:19869:15)\n at async Object.resolveId (file:///home/runner/work/flyonui-vue/flyonui-vue/node_modules/vitepress/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:12833:[10](https://github.com/michaelcozzolino/flyonui-vue/actions/runs/12852703212/job/35835005640#step:7:11))\n at async PluginDriver.hookFirstAndGetPlugin (file:///home/runner/work/flyonui-vue/flyonui-vue/node_modules/rollup/dist/es/shared/node-entry.js:20836:28)\nError: Process completed with exit code 1.\n\n```\n\neven though the package.json seems to be completely right.\n\nthe workflow outcome can be seen here\nhttps://github.com/michaelcozzolino/flyonui-vue/actions/runs/12852703212/job/35835005640\n\n\n\n### Reproduction\n\nonly through the github action (deploy.yml workflow) as it's for github pages.\n\nto deploy the docs on local:\n```\ngit clone https://github.com/michaelcozzolino/flyonui-vue.git\n\nin the root of the project run:\nyarn install\nyarn build\n```\n`yarn build` will automatically build the package and the docs, alternatively if you want to build only the docs you can run `yarn build:docs` as the github workflow does.\n\n### Expected behavior\n\nthe action should be successful as it is on local.\n\n### System Info\n\n```Text\nSystem:\n OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)\n CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz\n Memory: 16.29 GB / 30.23 GB\n Container: Yes\n Shell: 5.2.21 - /bin/bash\n Binaries:\n Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node\n Yarn: 4.6.0 - ~/.yarn/bin/yarn\n npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm\n Browsers:\n Brave Browser: 132.1.74.48\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.",[2944],{"name":2904,"color":2905},4497,"[commonjs--resolver] Failed to resolve entry for package during vitepress build on github pages","2025-01-27T04:43:01Z","https://github.com/vuejs/vitepress/issues/4497",0.69841903,{"description":2951,"labels":2952,"number":2953,"owner":2860,"repository":2861,"state":2936,"title":2954,"updated_at":2955,"url":2956,"score":2957},"### Is your feature request related to a problem? Please describe.\n\nI need references cited in the paper in the docs like writing papers.\r\n\n\n### Describe the solution you'd like\n\n references cited support can jump each other\r\n\r\nDocusaurus and GitHub support this.but not work for VitePress😭\r\n\r\n\r\neg.\r\n\r\n```\r\nsometext[^1]\r\n[^1]: something\r\n```\r\nsometext[^1]\r\n[^1]: something\r\n\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.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.",[],1081,"References cites support","2023-01-21T14:30:03Z","https://github.com/vuejs/vitepress/issues/1081",0.722926,["Reactive",2959],{},["Set"],["ShallowReactive",2962],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fq-XwwSkrS-nl7CHwZbWjvm9mqNpReHGbmamKOmZXu6k":-1},"/vuejs/vitepress/4611"]