\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.",[2932],{"name":2933,"color":2934},"bug: pending triage","e99695",4607,"markdown 图片自定义渲染,token.attrGet('alt') 获取不到值","2025-03-17T04:44:43Z","https://github.com/vuejs/vitepress/issues/4607",0.75985295,{"description":2941,"labels":2942,"number":2943,"owner":2869,"repository":2870,"state":2871,"title":2944,"updated_at":2945,"url":2946,"score":2947},"### What problem does this feature solve?\r\nIt is actually a layout problem of `vue-router-next` documentation. Please accept my apology if I reported it in the wrong place.\r\n\r\nCurrently, the [official documentation site] layout is not worked as expected when it comes to the screen size with `959px` and `719px` breakpoints. \r\n\r\nUnexpected behaviours with breakpoints:\r\n- `959px`: `16.4rem` is applied to `margin-left` in the main section.\r\n- `719px`: `var(--sidebar-width)` is applied to `padding-left` in the main section.\r\n\r\nAs a result, the main content is hard to read when readers are using small-size screens, such as mobile phones, as the unexpected extra spaces are occupied.\r\n\r\n[official documentation site]: https://next.router.vuejs.org/guide/#html\r\n\r\n### What does the proposed API look like?\r\nI haven't used 'vitepress' before so I don't know if it is actually an issue of vitepress. But I have a 'temporary' solution for this issue:\r\n\r\nIn `/docs/.vitepress/theme/Layout.vue`:\r\n\r\n```vue\r\n\u003Cstyle>\r\n...\r\n\r\n/* Fix: Unexpected margin at 959px breakpoint */\r\n@media screen and (max-width: 959px) {\r\n .theme main {\r\n margin-left: 0;\r\n }\r\n}\r\n\r\n/* Fix: Unexpected padding at 719px breakpoint */\r\n@media screen and (max-width: 719px) {\r\n .theme main {\r\n padding-left: 0;\r\n }\r\n}\r\n\u003C/style>\r\n```\r\n\r\nAnd it should fix the layout problem existed.\r\n\r\nI believe that small changes can bring a big positive effect on the community. Thank you for reviewing this issue.\r\n\r\n\u003C!-- generated by vue-issues. DO NOT REMOVE -->",[],121,"Better Docs Layout for Small Screen","2023-01-21T16:24:17Z","https://github.com/vuejs/vitepress/issues/121",0.7601699,{"description":2949,"labels":2950,"number":2952,"owner":2869,"repository":2870,"state":2871,"title":2953,"updated_at":2954,"url":2955,"score":2956},"### Describe the bug\n\nWhile trying to run document some components built on top of Quasar components, I was unable to run `vitepress build docs` for my project and throwing error\r\n\r\n> ✓ building client + server bundles...\r\n✖ rendering pages...\r\nbuild error:\r\nTypeError: Cannot convert undefined or null to object\r\n at Function.assign (\u003Canonymous>)\r\n at installQuasar (......dist\\quasar.cjs.prod.js:6:15454)\r\n at Object.install (......\\quasar\\dist\\quasar.cjs.prod.js:6:491344)\r\n at Object.use (......\\dist\\runtime-core.cjs.prod.js:3350:28)\r\n at Object.enhanceApp (....../docs/.vitepress/.temp/app.js:5580:9)\r\n at createApp (....../docs/.vitepress/.temp/app.js:5881:17)\r\n at render (....../docs/.vitepress/.temp/app.js:5921:33)\r\n at renderPage (....../vitepress/dist/node/serve-c489c02c.js:41209:25)\r\n at ....../node_modules/vitepress/dist/node/serve-c489c02c.js:41742:21\r\n at Array.map (\u003Canonymous>)\r\n\n\n### Reproduction\n\n**config.ts**\r\n\r\n```typescript\r\nimport { defineConfig } from 'vitepress'\r\nimport vueJsx from '@vitejs/plugin-vue-jsx'\r\nimport * as path from \"path\";\r\n\r\nexport default defineConfig(\r\n {\r\n lang: 'en-US',\r\n title: 'MyLib',\r\n lastUpdated: true,\r\n titleTemplate: false,\r\n themeConfig: {\r\n siteTitle: 'MyLib',\r\n docFooter: {\r\n prev: 'Prev',\r\n next: 'Next'\r\n },\r\n },\r\n vite: {\r\n plugins: [\r\n vueJsx(),\r\n ],\r\n resolve: {\r\n alias: [\r\n {find: \"@\", replacement: path.resolve(__dirname, '../../src') },\r\n {find: \"components\", replacement: path.resolve(__dirname, '../components') }\r\n ],\r\n dedupe: ['vue', 'quasar', 'Quasar', 'pubsub-js'],\r\n },\r\n build: {\r\n rollupOptions: {\r\n external: ['vue', /quasar\\/.+/]\r\n }\r\n },\r\n }\r\n }\r\n)\r\n````\r\n\r\n**index.ts**\r\n\r\n```typescript\r\nimport DefaultTheme from 'vitepress/theme'\r\nimport { App, onMounted } from 'vue'\r\nimport { dispatchEventStorage } from '../utils/tools'\r\nimport MyLib from 'my-lib '\r\n\r\nimport Container from \"../components/Container.vue\";\r\nimport {Quasar } from \"quasar\";\r\nimport {quasarConfig} from \"@\";\r\n\r\nexport default {\r\n ...DefaultTheme,\r\n enhanceApp ({ app }: { app: App }) {\r\n app.use(Quasar, {\r\n components: {\r\n ...quasarConfig.components,\r\n },\r\n directives: {\r\n ...quasarConfig.directives,\r\n },\r\n plugins: {\r\n ...quasarConfig.plugins,\r\n },\r\n });\r\n app.use(MyLib);\r\n app.component('Container', Container)\r\n },\r\n\r\n setup () {\r\n onMounted(() => {\r\n dispatchEventStorage()\r\n })\r\n }\r\n}\r\n```\n\n### Expected behavior\n\nAs `vitepress dev docs` works fine and serving the documentation with the required component example, running 'vitepress build docs' is not running fine in rendering pages step.\n\n### System Info\n\n```shell\nwindows: 11,\r\nnode: v16.19.1\r\nnpm: 8.19.3\r\nquasar: 2.10.2\r\nvue: 3.2.47\r\nvite: 4.3.1\r\nvitepress: 1.0.0-alpha.73\n```\n\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] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2951],{"name":2880,"color":2881},2298,"Quasar and Vitepress: Cannot convert undefined or null to object","2023-05-05T00:04:11Z","https://github.com/vuejs/vitepress/issues/2298",0.7611493,{"description":2958,"labels":2959,"number":2963,"owner":2869,"repository":2870,"state":2871,"title":2964,"updated_at":2965,"url":2966,"score":2967},"URL: https://vitepress.vuejs.org/guide/theme-home-page\r\n\r\n- General recommendation about image\r\n - Dimensions/Resolutions/Aspect Ratio\r\n - Mention the home-hero-image slot\r\n - Can be used to add videos and animated stuff \r\n- How to get the glow effect? (section similar to \"Customizing the name color\" present on that page)\r\n - Mention the CSS vars\r\n - Recommendation on how to generate gradients\r\n - If someone can spin up an online app to recommend certain gradient combinations based on user-provided image, we can add a link to that too. Or if the app is not much heavy, we can embed it itself in docs.\r\n\r\nx-ref: #1569, /cc @btea\r\n\r\nalso #1272",[2960],{"name":2961,"color":2962},"docs","0075ca",1773,"Add docs about hero image","2023-08-12T00:04:21Z","https://github.com/vuejs/vitepress/issues/1773",0.76720685,["Reactive",2969],{},["Set"],["ShallowReactive",2972],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fXisyrh49vaJu_Uf1zC7Kta-L41lZz2T1Af7CAV3G5Nc":-1},"/vuejs/vitepress/1982"]