\r\n \u003Cbr />\r\n \u003Cdiv id=\"disqus_thread\">\u003C/div>\r\n \u003C/template>\r\n \u003C/Layout>\r\n\u003C/template>\r\n```\r\n2. 修改了`docs/.vitepress/theme/index.ts`; 2. Modified `docs/.vitepress/theme/index.ts`\r\n```ts\r\nimport DefaultTheme from 'vitepress/theme';\r\n\r\nimport Discussion from '../../components/Discussion.vue';\r\n\r\nexport default {\r\n ...DefaultTheme,\r\n Layout: Discussion,\r\n};\r\n```\n\n### Expected behavior\n\nvitepress 能够正常的和Disqus合并,并在生产环境正常工作\r\nVitepress can merge with Disqus normally and work normally in production environment.\n\n### System Info\n\n```sh\nSystem:\r\n OS: macOS 13.5\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 1.38 GB / 32.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.16.0 - ~/Library/pnpm/node\r\n npm: 9.5.1 - ~/Library/pnpm/npm\r\n pnpm: 8.6.3 - ~/Library/pnpm/pnpm\r\n Browsers:\r\n Chrome: 115.0.5790.170\r\n Safari: 16.6\r\n npmPackages:\r\n vitepress: ^1.0.0-rc.4 => 1.0.0-rc.4\n```\n\n\n### Additional context\n\ngithub 提示我日志太长,我将日志分享到了谷歌网盘,地址:https://drive.google.com/file/d/13X8e_sFMtE09SNIXx8B5xm2ZUp0QIPD6/view?usp=drive_link\r\n\r\nGithub prompted me that the log was too long, and I shared the log to Google disk at https://drive.google.com/file/d/13X8e_sFMtE09SNIXx8B5xm2ZUp0QIPD6/view?usp=drive_link\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.",[3064],{"name":3053,"color":3054},2824,"Compilation failed after merging vitepress and Disqus, request help","2023-08-29T00:04:21Z","https://github.com/vuejs/vitepress/issues/2824",0.6982298,{"description":3071,"labels":3072,"number":3076,"owner":3030,"repository":3031,"state":3056,"title":3077,"updated_at":3078,"url":3079,"score":3080},"### Describe the bug\n\nIn a page with a lot of content, it is sometimes impossible to locate a specific location using #id. This may be caused by positioning before the page has fully loaded. Especially when the project is just started, use search to find particularly late content on a certain page (which has a lot of content).\n\n### Reproduction\n\n1. Start the project\r\n2. Use search to search for the title or content at the end of a page (with more content)\r\n3. Can locate the correct page, but cannot locate the content.\n\n### Expected behavior\n\nAfter searching, you can locate the specific location on the specific page.\r\n\n\n### System Info\n\n```Text\nwindows10,chrome120.0.6051.2\n```\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.",[3073],{"name":3074,"color":3075},"question","5D5FAE",3089,"When there is too much content on the page, using #id may not allow you to locate the specific location.","2023-10-15T07:35:23Z","https://github.com/vuejs/vitepress/issues/3089",0.70835185,{"description":3082,"labels":3083,"number":3084,"owner":3030,"repository":3031,"state":3056,"title":3085,"updated_at":3086,"url":3087,"score":3088},"### Is your feature request related to a problem? Please describe.\r\n\r\nMultiple sidebars do not work with multiple locales\r\n\r\nMultiple sidebars work only for the root locale\r\n\r\n```js\r\nimport sidebar_es from \"./sidebar.es\";\r\nimport sidebar_en from \"./sidebar.en\";\r\nimport sidebar_subdir_es from \"./sidebar.subdir.es\";\r\nimport sidebar_subdir_en from \"./sidebar.subdir.en\";\r\n\r\nexport default defineConfig({\r\n locales: {\r\n root: {\r\n lang: \"sp\",\r\n label: \"Spanish\",\r\n themeConfig: {\r\n nav: nav_es,\r\n sidebar: {\r\n \"/\": sidebar_es,\r\n \"/subdir/\": sidebar_subdir_es,\r\n },\r\n },\r\n },\r\n en: {\r\n lang: \"en\",\r\n label: \"English\",\r\n themeConfig: {\r\n nav: nav_en,\r\n sidebar: {\r\n \"/\": sidebar_en,\r\n \"/subdir/\": sidebar_subdir_en,\r\n },\r\n },\r\n```\r\n\r\nIn this example `/en/subdir/` path shows default `sidebar_en` sidebar\r\n\r\n### Describe the solution you'd like\r\n\r\nMultiple sidebars should work for secondary locales\r\n\r\n### Describe alternatives you've considered\r\n\r\n_No response_\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.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.",[],3202,"i18n and multiple sidebars problem","2023-11-21T00:04:49Z","https://github.com/vuejs/vitepress/issues/3202",0.7127801,{"description":3090,"labels":3091,"number":3095,"owner":3030,"repository":3031,"state":3056,"title":3096,"updated_at":3097,"url":3098,"score":3099},"### Describe the bug\n\n单击 AntDesignVue Pagination 组件某页进行切换时,会导致当前页面会滚动到 Top。\n\n### Reproduction\n\n后排查发现 \\\u003Ca rel=\"nofollow\"> 这种也会起到锚链接的作用。但在其他非 vitepress 的 SPA 页面中使用,却不会有这个影响。我不太理解。\n\n### Expected behavior\n\n消除 \\\u003Ca rel=\"nofollow\"> 本不该有的 锚链接影响。\n\n### System Info\n\n```Text\nSystem:\r\n OS: macOS 14.5\r\n CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\r\n Memory: 2.63 GB / 32.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node\r\n Yarn: 1.22.22 - /usr/local/bin/yarn\r\n npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm\r\n pnpm: 9.2.0 - /usr/local/bin/pnpm\r\n bun: 1.1.12 - /usr/local/bin/bun\r\n Browsers:\r\n Chrome: 125.0.6422.142\r\n Safari: 17.5\r\n npmPackages:\r\n vitepress: ^1.2.3 => 1.2.3\n```\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.",[3092],{"name":3093,"color":3094},"client","1AA9E5",3950,"使用 AntDesignVue Pagination 组件中,发现单击某个页数切换,会导致页面会回滚到 Top","2024-06-17T04:43:00Z","https://github.com/vuejs/vitepress/issues/3950",0.71486086,{"description":3101,"labels":3102,"number":3103,"owner":3030,"repository":3031,"state":3056,"title":3104,"updated_at":3105,"url":3106,"score":3107},"### Describe the bug\n\n如果nav配置了不同的url query但是是相同的url path,点击后浏览器地址栏不会变化\n\n### Reproduction\n\n```js\r\n{\r\n nav: [\r\n {\r\n text: 'test', items: [\r\n { text: 'a', link: '/?tag=a' },\r\n { text: 'b', link: '/?tag=b' },\r\n ]\r\n }\r\n ]\r\n}\r\n```\n\n### Expected behavior\n\n浏览器地址栏做出相应变化\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 10.15.7\r\n CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz\r\n Memory: 367.99 MB / 32.00 GB\r\n Shell: 5.7.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.1.0 - ~/.nvm/versions/node/v16.1.0/bin/node\r\n Yarn: 1.22.19 - ~/.nvm/versions/node/v16.1.0/bin/yarn\r\n npm: 7.12.1 - ~/.nvm/versions/node/v16.1.0/bin/npm\r\n Watchman: 2021.08.02.00 - /usr/local/bin/watchman\r\n Browsers:\r\n Chrome: 103.0.5060.134\r\n Safari: 13.1.3\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.4 => 1.0.0-alpha.4\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.",[],1107,"如果nav配置了不同的url query但是是相同的url path,点击后浏览器地址栏不会变化","2023-01-21T14:28:54Z","https://github.com/vuejs/vitepress/issues/1107",0.7180356,{"description":3109,"labels":3110,"number":3112,"owner":3030,"repository":3031,"state":3056,"title":3113,"updated_at":3114,"url":3115,"score":3116},"### Describe the bug\n\nWhen I build, I receive the error prompt `TypeError: Cannot read properties of undefined (reading 'imports')`. After debugging, I find that this problem comes from the exception thrown by `src/node/build/build.ts`\n\n```javascript\n await pMap(\n [\"404.md\", ...siteConfig.pages],\n async (page) => {\n // maybe this render failed when build stage\n const r = await renderPage(\n render,\n siteConfig,\n siteConfig.rewrites.map[page] || page,\n clientResult,\n appChunk,\n cssChunk,\n assets,\n pageToHashMap,\n metadataScript,\n additionalHeadTags,\n usedIcons\n );\n return r;\n },\n { concurrency: siteConfig.buildConcurrency }\n );\n```\n\n### Reproduction\n\nhttps://github.com/longportapp/openapi-website/tree/838c186d9ae49391f1641c6bff350d5a4b1267f9\n\nrun `bun run docs:build` will get error info\nbut run `bun run docs:dev`, everything is well\n\n### Expected behavior\n\nbuild success\n\n### System Info\n\n```Text\nSystem:\n OS: macOS 15.3.1\n CPU: (10) arm64 Apple M4\n Memory: 104.50 MB / 24.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n Node: 20.19.0 - ~/.nvm/versions/node/v20.19.0/bin/node\n Yarn: 1.22.22 - ~/.nvm/versions/node/v20.19.0/bin/yarn\n npm: 11.3.0 - ~/.nvm/versions/node/v20.19.0/bin/npm\n pnpm: 10.8.0 - ~/.nvm/versions/node/v20.19.0/bin/pnpm\n bun: 1.2.10 - ~/.bun/bin/bun\n Browsers:\n Chrome: 136.0.7103.114\n Safari: 18.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.",[3111],{"name":3053,"color":3054},4771,"The build reported an error, but development and preview worked correctly","2025-06-04T05:01:08Z","https://github.com/vuejs/vitepress/issues/4771",0.7227107,{"description":3118,"labels":3119,"number":3121,"owner":3030,"repository":3031,"state":3056,"title":3122,"updated_at":3123,"url":3124,"score":3125},"### Describe the bug\n\n```\r\n▶ yarn build:docs\r\nyarn run v1.22.10\r\n$ vitepress build docs\r\nvitepress v0.15.6\r\nvite v2.4.1\r\n✓ building client + server bundles...\r\n⠋ rendering pages...\r\n✖ rendering pages...\r\nbuild error:\r\n TypeError: Cannot read property 'imports' of undefined\r\n at resolvePageImports (x/node_modules/vitepress/dist/node/build/render.js:81:22)\r\n at Object.renderPage (x/node_modules/vitepress/dist/node/build/render.js:35:12)\r\n at async Object.build (x/node_modules/vitepress/dist/node/build/build.js:29:17)\r\nerror Command failed with exit code 1.\r\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\r\n```\r\n\r\nhttps://github.com/vuejs/vitepress/blob/master/src/node/build/render.ts#L115\r\n\n\n### Reproduction\n\n``` bash\r\ncd docs\r\nln -s ../CHANGELOG.md changelog.md\r\nln -s ../packages components \r\n```\n\n### Expected behavior\n\n`build` success same as `dev`\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 11.4\r\n CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz\r\n Memory: 710.10 MB / 16.00 GB\r\n Shell: 5.8 - /bin/zsh\r\n Binaries:\r\n Node: 14.17.0 - /usr/local/bin/node\r\n Yarn: 1.22.10 - /usr/local/bin/yarn\r\n npm: 6.14.13 - /usr/local/bin/npm\r\n Watchman: 4.9.0 - /usr/local/bin/watchman\r\n Browsers:\r\n Chrome: 91.0.4472.164\r\n Edge: 81.0.416.77\r\n Firefox: 87.0\r\n Safari: 14.1.1\r\n Safari Technology Preview: 15.0\r\n npmPackages:\r\n vitepress: ^0.15.6 => 0.15.6\n```\n\n\n### Additional context\n\nThe following code works fine\r\n```\r\n return Array.from(new Set([\r\n ...indexChunk.imports,\r\n ...indexChunk.dynamicImports,\r\n ...(pageChunk?.imports|| []),\r\n ...(pageChunk?.dynamicImports || [])\r\n ].filter(Boolean)));\r\n```\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/coc)\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.",[3120],{"name":3053,"color":3054},335,"build failed with symbolic links","2023-01-21T16:20:24Z","https://github.com/vuejs/vitepress/issues/335",0.7286794,["Reactive",3127],{},["Set"],["ShallowReactive",3130],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f8GrXqGF9_dtpgjkey9UJIL-CcwyOrjunXfbMDR0Jx2w":-1},"/vuejs/vitepress/2898"]