\n这是知乎网站的热搜榜\n\n\u003Cimg width=\"807\" height=\"942\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/092b0749-e7d2-4b00-bd5b-172b6725c892\" />\n\n### Reproduction\n\n希望能更新接口,获取最新热搜数据\n\n### Expected behavior\n\n希望能更新接口,获取最新热搜数据\n\n### System Info\n\n```Text\n1.6.20\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.",[3077],{"name":3078,"color":3079},"bug: pending triage","e99695",4866,"知乎热搜榜不更新","2025-07-30T04:05:01Z","https://github.com/vuejs/vitepress/issues/4866",0.75829923,{"description":3086,"labels":3087,"number":3093,"owner":3024,"repository":3025,"state":3038,"title":3094,"updated_at":3095,"url":3096,"score":3097},"### Describe the bug\n\n# Bug\r\nSVG feature icons in the `home` layout expand to fit the width of their feature element, rather than being constrained to the size specified in their `width` declaration.\r\n\r\n\n\n### Reproduction\n\n# Context\r\nGiven the frontmatter\r\n\r\n```\r\n---\r\nlayout: home\r\n\r\nhero:\r\n name: Bug example\r\n\r\nfeatures:\r\n - icon:\r\n src: /flag-solid.svg\r\n width: 50\r\n title: Bug example\r\n details: The icon expands to fit the width of the feature element, rather than being constrained to 50px\r\n---\r\n```\n\n### Expected behavior\n\n# Expected\r\nThe feature icon is expected to size to the width specified by the `width` declaration.\n\n### System Info\n\n```shell\nSystem:\r\n OS: Windows 10\r\n Binaries:\r\n Node: 18.13.0\r\n npm: 8.19.3\r\n Browsers:\r\n Chrome: 109\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.40 => 1.0.0-alpha.45\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.vuejs.org).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[3088,3089,3092],{"name":3058,"color":3059},{"name":3090,"color":3091},"has-workaround","1B4515",{"name":3035,"color":3036},1886,"SVG icons in `feature` elements do not respect their size setting","2023-08-14T00:04:27Z","https://github.com/vuejs/vitepress/issues/1886",0.7585764,{"description":3099,"labels":3100,"number":3102,"owner":3024,"repository":3025,"state":3038,"title":3103,"updated_at":3104,"url":3105,"score":3106},"### Describe the bug\r\n\r\nWhen using the default theme, the navbar items are hidden away in a menu on screen widths lower than 768px.\r\n\r\nAt 768px and slightly larger sizes, the navbar may have to render on one line:\r\n\r\n- The logo and site title\r\n- A search box (when using the `algolia` options)\r\n- Several nav items\r\n- And the \"extra navigation\" button\r\n\r\nWhen the nav items don't fit, their text may wrap, and their extreme `line-height` makes that result particularly bad:\r\n\r\n\u003Cimg width=\"862\" alt=\"Screenshot 2022-09-01 at 23 57 42\" src=\"https://user-images.githubusercontent.com/243601/188020460-7355ef38-ea1e-4d18-b68d-cf7052cb4f9b.png\">\r\n\r\n\r\n### Reproduction\r\n\r\n1. Visit reproduction on StackBlitz: https://stackblitz.com/edit/vitepress-theme-issue-navbarmenulink?file=index.md\r\n2. Resize the preview area to be roughtly 800px wide\r\n\r\n\r\n\r\n### Expected behavior\r\n\r\nThere are two levels of fixes:\r\n\r\n1. Mitigate the breakage when nav items do wrap.\r\n - Nav links should not use the header height as their `line-height` (that's a bad way to do vertical centering of text, for the reason demonstrated in this issue).\r\n - Instead use something like `min-height: var(--vp-nav-height-mobile); line-height: normal;` (plus probably a tad of `padding-block`).\r\n\r\n2. If the nav items still overflow their container, what should happen? Should they be clipped (`overflow: hidden` on the container), or should the container height grow (i.e. the container should be using `min-height` and not `height`)? Clipping might be better to conserve the design, but note that it's a WCAG violation (loss of content).\r\n\r\n3. Prevent this situation altogether:\r\n - One option is to use the mobile layout earlier, e.g. for widths lower than 1000px instead of widths lower than 769px. (This might not be enough for some accessibility use cases, like text-only zoom.)\r\n - Another one is to implement a type of dynamic overflow menu, where all items that don't fit in the navbar are moved to the overflow menu. This requires runtime JS, probably using IntersectionObserver.\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: macOS 12.5.1\r\n CPU: (8) arm64 Apple M1\r\n Memory: 98.88 MB / 8.00 GB\r\n Shell: 3.5.1 - /opt/homebrew/bin/fish\r\n Binaries:\r\n Node: 16.17.0 - /opt/homebrew/opt/node@16/bin/node\r\n Yarn: 1.22.19 - /opt/homebrew/bin/yarn\r\n npm: 8.12.1 - ~/.npm-packages/bin/npm\r\n Browsers:\r\n Chrome: 105.0.5195.52\r\n Firefox Nightly: 106.0a1\r\n Safari: 15.6.1\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.13 => 1.0.0-alpha.13\r\n```\r\n\r\n### Additional context\r\n\r\nI can probably do a PR for the line-height part at least.\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.",[3101],{"name":3058,"color":3059},1271,"Nav items overflowing navbar on medium viewports","2023-01-21T14:20:36Z","https://github.com/vuejs/vitepress/issues/1271",0.7589434,{"description":3108,"labels":3109,"number":3111,"owner":3024,"repository":3025,"state":3038,"title":3112,"updated_at":3113,"url":3114,"score":3115},"### 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.",[3110],{"name":3078,"color":3079},4607,"markdown 图片自定义渲染,token.attrGet('alt') 获取不到值","2025-03-17T04:44:43Z","https://github.com/vuejs/vitepress/issues/4607",0.75985295,{"description":3117,"labels":3118,"number":3119,"owner":3024,"repository":3025,"state":3038,"title":3120,"updated_at":3121,"url":3122,"score":3123},"### 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,["Reactive",3125],{},["Set"],["ShallowReactive",3128],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fXisyrh49vaJu_Uf1zC7Kta-L41lZz2T1Af7CAV3G5Nc":-1},"/vuejs/vitepress/1982"]