\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.",[2907],{"name":2885,"color":2886},3047,"CSS i18n in one page","2025-03-02T18:10:37Z","https://github.com/vuejs/vitepress/issues/3047",0.7339263,{"description":2914,"labels":2915,"number":2920,"owner":2871,"repository":2872,"state":2873,"title":2921,"updated_at":2922,"url":2923,"score":2924},"### Is your feature request related to a problem? Please describe.\n\nDue to my markdown file is particularly large, resulting in packaged js file and the corresponding html file size are close to 3M b, which in turn leads to the browser first screen rendering DOM size is too large.\n\n### Describe the solution you'd like\n\nIs it possible to reduce the size of the first screen html and lazy load the rest of the dom?\r\n\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\n\u003Cimg width=\"368\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/73653404/afe26e27-6e7a-489d-983a-42a6acbfff8e\">\r\n\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.",[2916,2917],{"name":2885,"color":2886},{"name":2918,"color":2919},"perf","378A61",3509,"DOM is oversized","2025-03-02T18:09:47Z","https://github.com/vuejs/vitepress/issues/3509",0.7387882,{"description":2926,"labels":2927,"number":2928,"owner":2871,"repository":2872,"state":2929,"title":2930,"updated_at":2931,"url":2932,"score":2933},"```\r\n/**\r\n * Fonts\r\n * -------------------------------------------------------------------------- */\r\n\r\n:root {\r\n --vp-font-family-base: LXGWWenKai; /* normal text font */\r\n --vp-font-family-mono: LXGWWenKaiMono; /* code font */\r\n}\r\n```\r\nI have set the overall font like the code above, but I still want \"home hero name\" to use \"Intel\" font. How do I do this? Thank you very much!",[],3678,"closed","Define the font for \"home hero name\"","2024-04-28T12:27:38Z","https://github.com/vuejs/vitepress/issues/3678",0.7044278,{"description":2935,"labels":2936,"number":2941,"owner":2871,"repository":2872,"state":2929,"title":2942,"updated_at":2943,"url":2944,"score":2945},"### Is your feature request related to a problem? Please describe.\r\n\r\nHello,\r\n\r\nActually, I have to create a loader for each language, and then import all of them in my vue component.\r\n\r\n```ts\r\n// @ts-expect-error - vitepress types are not available\r\nimport { data as rootData } from '../../data/posts.data'\r\n// @ts-expect-error - vitepress types are not available\r\nimport { data as frData } from '../../data/fr-posts.data'\r\nimport { computed } from 'vue';\r\n\r\nconst data: Record\u003Cstring, any> = {\r\n root: rootData,\r\n fr: frData\r\n}\r\n\r\nconst { localeIndex } = useData()\r\n\r\nconst posts = computed(() => data[localeIndex.value])\r\n```\r\n\r\n### Describe the solution you'd like\r\n\r\nI would like to have to only create a single content loader and based on my locales configuration (and maybe an option) retrive all content.\r\n\r\nFor example: `posts/*.md` should get `posts/*.md` (the root) and `fr/posts/*.md` (the fr locale).\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.",[2937,2940],{"name":2938,"color":2939},"has-workaround","1B4515",{"name":2885,"color":2886},4072,"Support i18n in `contentLoader`","2024-10-08T04:44:35Z","https://github.com/vuejs/vitepress/issues/4072",0.71222204,{"description":2947,"labels":2948,"number":2950,"owner":2871,"repository":2872,"state":2929,"title":2951,"updated_at":2952,"url":2953,"score":2954},"### Describe the bug\r\n\r\nHere is my website:\r\ngithub: https://github.com/Lark-Base-Team/js-sdk-docs\r\nAccessing https://lark-base-team.github.io/js-sdk-docs/zh/start\r\ndoes not display the icons.\r\n\r\nBelow is my configuration file:\r\n```\r\nexport default defineConfig({\r\n lastUpdated: true,\r\n cleanUrls: true,\r\n base: '/js-sdk-docs/',\r\n themeConfig: {\r\n logo: 'logo.svg',\r\n search: {\r\n provider: 'local'\r\n },\r\n nav: [\r\n { text: 'API', link: '/zh/api/guide', activeMatch: 'zh/api' },\r\n ],\r\n },\r\n head: [\r\n ['link', { rel: 'icon', href: 'logo.svg' }],\r\n ],\r\n title: 'Base JS SDK',\r\n description: 'Base JS SDK Docs',\r\n // sitemap: {\r\n // hostname: 'https://basejsapi.com',\r\n // },\r\n lang: 'zh',\r\n locales: {\r\n zh: {\r\n label: '中文',\r\n lang: 'zh',\r\n dir: '/zh',\r\n title: 'Base JS SDK',\r\n description: 'Base JS SDK Docs',\r\n themeConfig: {\r\n search: {\r\n provider: 'local'\r\n },\r\n nav: [\r\n { text: 'API', link: '/zh/api/guide', activeMatch: 'zh/api' },\r\n ],\r\n sidebar: getZhSideBar(),\r\n },\r\n },\r\n en: {\r\n label: 'English',\r\n lang: 'en',\r\n dir: '/en',\r\n title: 'Base JS SDK',\r\n description: 'Base JS SDK Docs',\r\n themeConfig: {\r\n search: {\r\n provider: 'local'\r\n },\r\n nav: [\r\n { text: 'API', link: '/en/api/guide.md' },\r\n ],\r\n sidebar: getEnSideBar(),\r\n },\r\n }\r\n },\r\n})\r\n\r\n```\r\n\r\n### Reproduction\r\n\r\nvitepress: 1.0.0-rc.10\r\n\r\n### Expected behavior\r\n\r\nshow icon like this\r\n\r\n\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: macOS 13.6\r\n CPU: (10) arm64 Apple M1 Pro\r\n Memory: 210.73 MB / 32.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.14.2 - ~/.nvm/versions/node/v18.14.2/bin/node\r\n Yarn: 1.22.19 - /opt/homebrew/bin/yarn\r\n npm: 9.5.0 - ~/.nvm/versions/node/v18.14.2/bin/npm\r\n pnpm: 8.7.4 - ~/.nvm/versions/node/v18.14.2/bin/pnpm\r\n Browsers:\r\n Chrome: 117.0.5938.149\r\n Safari: 16.6\r\n npmPackages:\r\n vitepress: 1.0.0-rc.10 => 1.0.0-rc.10\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\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.",[2949],{"name":2896,"color":2897},3059,"After I added the relevant internationalization configuration, the icons in the public directory cannot be loaded on pages in certain languages.","2023-10-20T00:04:32Z","https://github.com/vuejs/vitepress/issues/3059",0.7229025,{"description":2956,"labels":2957,"number":2958,"owner":2871,"repository":2872,"state":2929,"title":2959,"updated_at":2960,"url":2961,"score":2962},"when use some new language blocks in `md`, such as `wgsl`, it shows `No language registration for wgsl`\r\n\r\nThe shiki support add custom languages: https://github.com/shikijs/shiki/blob/main/docs/languages.md#supporting-your-own-languages-with-shiki\r\n\r\nThen, how to use it in VitePress to add custom languages?",[],1331,"How to add register language/grammar for shiki?","2023-01-21T14:25:07Z","https://github.com/vuejs/vitepress/issues/1331",0.72429174,{"description":2964,"labels":2965,"number":2967,"owner":2871,"repository":2872,"state":2929,"title":2968,"updated_at":2969,"url":2970,"score":2971},"### 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.",[2966],{"name":2868,"color":2869},3896,"How to using Vite Env Variables?","2024-05-24T04:42:25Z","https://github.com/vuejs/vitepress/issues/3896",0.7276429,["Reactive",2973],{},["Set"],["ShallowReactive",2976],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fcMOwoC_sAAi32F2Nao2iAxV6sEQG8Ic-IQ9iwazE8lU":-1},"/vuejs/vitepress/3720"]