\r\n\r\n::: zh-CN\r\n中文\r\n:::\r\n\r\n::: en\r\nEnglish\r\n:::\r\n```\r\n\r\nThis reduces maintenance costs.\r\n\r\nI came up with a very low cost implementation - [CSS-I18N](https://github.com/valaxyjs/css-i18n)\r\nAnd I implemented it in my own project [valaxy](https://github.com/YunYouJun/valaxy).\r\n\r\nIt works well. You can preview it [here](https://valaxy.site/guide/i18n).\r\nAnd this is my implementation: [How to realize CSS i18n?](https://valaxy.site/posts/i18n#css-i18n-another-solution)\r\n\r\n---\r\n\r\nIt is very cost-effective and I hope to integrate it with vitepress.\r\nIf you agree with my proposal, please let me know and I can create a PR for vitepress.\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.",[2881],{"name":2882,"color":2883},"stale","ededed",3047,"CSS i18n in one page","2025-03-02T18:10:37Z","https://github.com/vuejs/vitepress/issues/3047",0.7543605,{"description":2890,"labels":2891,"number":2896,"owner":2871,"repository":2872,"state":2873,"title":2897,"updated_at":2898,"url":2899,"score":2900},"### Is your feature request related to a problem? Please describe.\n\nCurrently, the search results only display the page title and anchors (if any) in which the results appear in. I have many similar page titles for different contexts, which are organized as different sidebar directories. Without being able to see which sidebar directory a page is in, it can get confusing as to which page I am looking at.\n\n### Describe the solution you'd like\n\nIt will be nice to be able to see which sidebar sub-directory the pages are in, as is the case for Vuepress's built-in search option. Would it be possible to add an option to configure what fields to display in the search bar results in themeConfig?\r\n\r\n\n\n### Describe alternatives you've considered\n\nI have looked at the existing search options, but none seem to offer this functionality.\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.",[2892,2895],{"name":2893,"color":2894},"theme","0754FB",{"name":2882,"color":2883},3192,"Display directory heading in search results","2025-03-02T18:10:21Z","https://github.com/vuejs/vitepress/issues/3192",0.7730137,{"description":2902,"labels":2903,"number":2911,"owner":2871,"repository":2872,"state":2873,"title":2912,"updated_at":2913,"url":2914,"score":2915},"### Describe the bug\r\n\r\nUsing `@babylonjs/loaders` will cause an error during the build phase: `KHR_animation_pointer.data.js`: config must export or return an object.\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/vite-v1c8np4w\r\n\r\nRun `npm run docs:build`.\r\n\r\n### Expected behavior\r\n\r\nThe error \"config must export or return an object\" should not occur.\r\n\r\nRemoving `import '@babylonjs/loaders'` will prevent any errors from occurring.\r\n\r\nI suspect it might be due to the filename `KHR_animation_pointer.data.js`, which might cause VitePress to mistakenly identify it as a `data loader`, leading to this error.\r\n\r\nIf my guess is correct, might there be a need for a way to exclude specific files?\r\n\r\n### System Info\r\n\r\n```Text\r\n@babylonjs/loaders: 7.43.0\r\nvitepress: 1.5.0\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n> vitepress build docs\r\n\r\n\r\n vitepress v1.5.0\r\n\r\n⠇ building client + server bundles...failed to load config from /home/projects/vite-v1c8np4w/node_modules/@babylonjs/loaders/glTF/2.0/Extensions/KHR_animation_pointer.data.js\r\nx Build failed in 3.63s\r\n✖ building client + server bundles...\r\nbuild error:\r\n[commonjs--resolver] Could not load /home/projects/vite-v1c8np4w/node_modules/@babylonjs/loaders/glTF/2.0/Extensions/KHR_animation_pointer.data.js: config must export or return an object.\r\n[commonjs--resolver] Could not load /home/projects/vite-v1c8np4w/node_modules/@babylonjs/loaders/glTF/2.0/Extensions/KHR_animation_pointer.data.js: config must export or return an object.\r\n at Module.loadConfigFromFile (file:///home/projects/vite-v1c8np4w/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:66589:13)\r\n at async Object.load (file:///home/projects/vite-v1c8np4w/node_modules/vitepress/dist/node/chunk-DMuPggCS.js:44533:21)\r\n \r\n \r\n\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.",[2904,2907,2908],{"name":2905,"color":2906},"build","377ba8",{"name":2882,"color":2883},{"name":2909,"color":2910},"needs more discussion","C2E0C6",4482,"Using babylonjs/loaders, the error \"config must export or return an object\" occurs","2025-03-02T18:07:54Z","https://github.com/vuejs/vitepress/issues/4482",0.7745645,{"description":2917,"labels":2918,"number":2921,"owner":2871,"repository":2872,"state":2873,"title":2922,"updated_at":2923,"url":2924,"score":2925},"### Describe the bug\n\nbuildConcurrency 默认为64,使用pMap之后,无法保证本地搜索索引的添加顺序\r\n\r\nhttps://github.com/vuejs/vitepress/blob/8f31a4c0780657af9137762c9394c56912f6e383/src/node/plugins/localSearchPlugin.ts#L137\n\n### Reproduction\n\n重现路径:\r\n * 配置文件中,启动 `themeConfig.server.provider = 'local'`\r\n * 需要处理的页面尽量多\r\n\r\n临时规避方案:\r\n配置 `buildConcurrency = 1` 之后,问题消失\n\n### Expected behavior\n\n每次编译都生成相同的 @localSearchIndexroot.js \n\n### System Info\n\n```Text\nSystem:\r\n OS: Linux 6.1\r\n CPU: (32) x64 AMD EPYC 7K62 48-Core Processor\r\n Memory: 46.37 GB / 62.79 GB\r\n Container: Yes\r\n Shell: 5.2.0 - /bin/bash\r\n Binaries:\r\n Node: 16.19.1 - ~/.n/bin/node\r\n Yarn: 1.22.10 - ~/.n/bin/yarn\r\n npm: 8.19.3 - ~/.n/bin/npm\r\n pnpm: 8.6.11 - ~/.n/bin/pnpm\r\n npmPackages:\r\n vitepress: ^1.3.1 => 1.3.1\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.",[2919,2920],{"name":2905,"color":2906},{"name":2882,"color":2883},4081,"源码无变化下,每次编译产物@localSearchIndexroot.js hash都不同","2025-03-02T18:08:51Z","https://github.com/vuejs/vitepress/issues/4081",0.77994233,{"description":2927,"labels":2928,"number":2933,"owner":2871,"repository":2872,"state":2873,"title":2934,"updated_at":2935,"url":2936,"score":2937},"### Describe the bug\n\nMy document project, packaging error:\r\n\r\nvitepress v1.0.1\r\n\r\nx Build failed in 25.03s\r\n✖ building client + server bundles...\r\nbuild error:\r\nSyntaxError: Invalid end tag.\r\n\r\n\r\nUnder the config.js file, follow the documentation: https://vitepress.dev/zh/reference/site-config#transformpagedata, add the transformPageData method, as a result, the console print document is not correct.\r\n\r\nAnd each time you repackage, the console outputs a different error document\r\n\r\n![Uploading 1711309593420.jpg…]()\r\n\r\n\r\nI wrote too many documents too long, packaging, an error, can not find the wrong document\n\n### Reproduction\n\ngit clone https://github.com/muyaCode/FrontEndLearnNotes.git\n\n### Expected behavior\n\nCan debug output error files correctly\n\n### System Info\n\n```Text\nWindows 11 Home Chinese Version\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.",[2929,2932],{"name":2930,"color":2931},"bug: pending triage","e99695",{"name":2882,"color":2883},3696,"Configuring the transformPageData method, the console output the wrong document file is incorrect","2024-04-28T12:18:07Z","https://github.com/vuejs/vitepress/issues/3696",0.78050965,{"description":2939,"labels":2940,"number":2942,"owner":2871,"repository":2872,"state":2943,"title":2944,"updated_at":2945,"url":2946,"score":2947},"### Describe the bug\n\nWhenever I commit a change to my repo; [Linkbase](https://github.com/Ahwxorg/Linkbase), GitHub is supposed to build VitePress and put it on GitHub Pages, but it often fails, and shows just the title of the repo, like it's a simple GH Pages Jekyll site.\n\n### Reproduction\n\n1. Clone my repository\r\n2. Commit a change\r\n3. Push to GitHub repo with Actions/Workflows enabled\r\n4. See it not building sometimes\n\n### Expected behavior\n\nVitePress builds the site.\n\n### System Info\n\n```Text\nSystem:\r\n OS: macOS 14.0\r\n CPU: (10) arm64 Apple M2 Pro\r\n Memory: 173.63 MB / 16.00 GB\r\n Shell: 3.6.1 - /opt/homebrew/bin/fish\r\n Binaries:\r\n Node: 21.3.0 - /opt/homebrew/bin/node\r\n Yarn: 1.22.21 - /opt/homebrew/bin/yarn\r\n npm: 10.2.4 - /opt/homebrew/bin/npm\r\n Browsers:\r\n Safari: 17.0\r\n npmPackages:\r\n vitepress: ^1.0.0-rc.10 => 1.0.0-rc.20\n```\n\n\n### Additional context\n\nRunning `yarn vitepress build` locally does not display anything wrong.\r\n\u003Cimg width=\"336\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/87855602/33757f2d-6a2c-4f7c-8210-03feed3b962d\">\r\n\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.",[2941],{"name":2930,"color":2931},3293,"closed","GitHub Actions fail to build site often","2024-01-07T00:05:01Z","https://github.com/vuejs/vitepress/issues/3293",0.7220744,{"description":2949,"labels":2950,"number":2951,"owner":2871,"repository":2872,"state":2943,"title":2952,"updated_at":2953,"url":2954,"score":2955},"### Is your feature request related to a problem? Please describe.\n\nI noticed a closed pr: https://github.com/vuejs/vitepress/pull/2347/files\r\n\r\nIf someone want to implement it by himself, it can be helpful to use the exported component (VPSwitch)\n\n### Describe the solution you'd like\n\n```ts\r\nimport { VPSwitch } from 'vitepress/theme'\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.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.",[],3660,"Feature: export `\u003CVPSwitch />` for better custom theme","2024-03-26T00:04:20Z","https://github.com/vuejs/vitepress/issues/3660",0.72611064,{"description":2957,"labels":2958,"number":2960,"owner":2871,"repository":2872,"state":2943,"title":2961,"updated_at":2962,"url":2963,"score":2964},"### Describe the bug\n\nMy project add network request, But I need different environment variables control the request address, how should I use env in vite\r\n\r\n[Env Variables](https://vitejs.dev/guide/env-and-mode.html#env-variables)\n\n### Reproduction\n\nNone\n\n### Expected behavior\n\nI want to be able to access `import.meta.env.BASE_URL`, just like the vite project\n\n### System Info\n\n```Text\nSystem:\r\n OS: Windows 11 10.0.22631\r\n CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-12600KF\r\n Memory: 2.31 GB / 31.82 GB\r\n Binaries:\r\n Node: 18.19.0 - D:\\software\\nodejs\\node.EXE\r\n npm: 10.2.3 - D:\\software\\nodejs\\npm.CMD\r\n pnpm: 9.1.1 - ~\\AppData\\Local\\pnpm\\pnpm.CMD\r\n bun: 1.1.3 - ~\\.bun\\bin\\bun.EXE\r\n Browsers:\r\n Edge: Chromium (123.0.2420.97)\r\n Internet Explorer: 11.0.22621.3527\r\n npmPackages:\r\n vitepress: 1.0.2 => 1.0.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.",[2959],{"name":2868,"color":2869},3896,"How to using Vite Env Variables?","2024-05-24T04:42:25Z","https://github.com/vuejs/vitepress/issues/3896",0.74522376,{"description":2966,"labels":2967,"number":2968,"owner":2871,"repository":2872,"state":2943,"title":2969,"updated_at":2970,"url":2971,"score":2972},"### Is your feature request related to a problem? Please describe.\n\nhope can be support local search. when run `docs:dev`, current doesn't have search functional.\n\n### Describe the solution you'd like\n\nhope can use local search like vuepress: https://v2.vuepress.vuejs.org/reference/plugin/search.html\r\n\r\nthis is an local search js:\r\n\r\nhttps://github.com/vuejs/vuepress/blob/master/packages/%40vuepress/plugin-search/match-query.js\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.",[],1757,"Local search can be support?","2023-01-21T14:16:56Z","https://github.com/vuejs/vitepress/issues/1757",0.7520888,["Reactive",2974],{},["Set"],["ShallowReactive",2977],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fdCm2KiTbvEwW3sVxhQeZpFJp9r6PN7dAa3yv7-SD5Bk":-1},"/vuejs/vitepress/3507"]