\r\n2. 配置文件如下所示:\u003Cbr /> \n\n### Expected behavior\n\n使用 Github 自带的 https://xihuanxiaorang.github.io/docs/ 访问就没有任何问题,如果是使用自定义域名 https://docs.xiaorang.fun/ 的话,样式就会丢失\n\n### System Info\n\n```Text\nSystem:\r\n OS: Windows 10 10.0.19045\r\n CPU: (4) x64 Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz\r\n Memory: 659.73 MB / 3.92 GB\r\n Binaries:\r\n Node: 20.11.0 - E:\\nodejs\\node.EXE\r\n Yarn: 1.22.21 - E:\\nodejs\\node_global\\yarn.CMD\r\n npm: 10.2.4 - E:\\nodejs\\npm.CMD\r\n pnpm: 8.14.3 - E:\\nodejs\\node_global\\pnpm.CMD\r\n Browsers:\r\n Edge: Chromium (120.0.2210.144)\r\n Internet Explorer: 11.0.19041.3636\r\n npmPackages:\r\n vitepress: 1.0.0-rc.40 => 1.0.0-rc.40\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.",[3086],{"name":3087,"color":3088},"question","5D5FAE",3513,"部署到Github Pages之后,如果使用自定义域名的话样式会丢失","2024-02-07T00:04:15Z","https://github.com/vuejs/vitepress/issues/3513",0.695358,{"description":3095,"labels":3096,"number":3101,"owner":3026,"repository":3027,"state":3028,"title":3102,"updated_at":3103,"url":3104,"score":3105},"### Describe the bug\r\n\r\nWhen I:\r\n- installed 'vitepress v1.0.0-rc.25' and executed 'npm run docs: dev', any image displayed normally.\r\n- installed 'vitepress v1.0.0-rc.26' and executed 'npm run docs: dev', any image displayed a 404 error. After manually adding the prefix {vitepressconfig. base} before the path of the image in the domElementPanel(devtool), it displayed normally.\r\n\r\nThe problem of compilating wrong assets path does not have any issues in production environment (when you 'npm run docs: build' and 'npm run docs: preview'), only occurs in the development environment.\r\n\r\n### Reproduction\r\n\r\nInit project\r\n```\r\nnpm i -D vitepress@vitepress v1.0.0-rc.26\r\nnpx vitepress init\r\n/* choosed this options\r\nWhere should VitePress initialize the config? \"./docs\"\r\nTheme: Default Theme (Out of the box, good-looking docs)\r\n*/\r\n```\r\n\r\nCreate directory structure\r\n```\r\ndocs/\r\n .vitepress/\r\n config.mts\r\n assets/\r\n image/\r\n cat.png\r\n index.md\r\n```\r\n\r\nAdd ` base` property in `.vitepress/config.mts`\r\n```\r\nimport { defineConfig } from \"vitepress\";\r\nexport default defineConfig({\r\nbase:'/base/'\r\n})\r\n```\r\n\r\nAdd a image in `index.md`\r\n``\r\n\r\nStart development environment\r\n`npm run docs:dev`\r\n\r\nThen, in the network-panel(chrome dev-tool) you will find that the image request is 404.\r\nopen the dom-panel and modify the image path from '/assets/image/cat. png' to '/base/assets/image/cat. png', it will be normal.\r\n\r\nHowever, if you install `vitepress@vitepress V1.0.0-rc.25`, everything is normal. It seems that there has been a breaking-change in the asset path compilation, but I did not see it in the CHANGLOG.\r\n\r\n\r\n### Expected behavior\r\n\r\nIn the development environment\r\n```\r\n/base/assets/image/cat.png` // it's wrong,please don't compile to this\r\n/assets/image/cat.png // it's correct!\r\n```\r\n\r\n### System Info\r\n\r\n```\r\nSystem:\r\n OS: macOS 13.6.1\r\n CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz\r\n Memory: 1.97 GB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\nBinaries:\r\n Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node\r\n npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm\r\nBrowsers:\r\n Chrome: 119.0.6045.159\r\n Edge: 119.0.2151.72\r\n Safari: 17.1\r\nnpmPackages:\r\n vitepress: ^1.0.0-rc.29 => 1.0.0-rc.29`\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nI really want to fix this issue, but I can't located yet😢 ...\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.",[3097,3098],{"name":3056,"color":3057},{"name":3099,"color":3100},"upstream","BF29ED",3239,"Compiled a wrong asset path(‘/base/’ prefix) in the development environment","2023-12-03T00:04:52Z","https://github.com/vuejs/vitepress/issues/3239",0.70109785,{"description":3107,"labels":3108,"number":3110,"owner":3026,"repository":3027,"state":3028,"title":3111,"updated_at":3112,"url":3113,"score":3114},"### Describe the bug\n\nIf I enable localSearch in the theme config, markdown files in public dir are considered as if they are in the content dir and be processed by vitepress. This is unwanted.\n\n### Reproduction\n\nEnable localSearch and add markdown some files in the public dir.\n\n### Expected behavior\n\nPublic dir should not be processed by vitepress.\n\n### System Info\n\n```shell\nSystem:\r\n OS: Linux 5.19 Ubuntu 22.10 22.10 (Kinetic Kudu)\r\n CPU: (4) x64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz\r\n Memory: 4.08 GB / 7.21 GB\r\n Container: Yes\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.0.0 - ~/.local/share/pnpm/node\r\n npm: 9.6.2 - ~/.local/share/pnpm/npm\r\n Browsers:\r\n Chrome: 112.0.5615.49\r\n```\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.",[3109],{"name":3020,"color":3021},2209,"localSearch treat public dir as content","2023-04-20T00:03:59Z","https://github.com/vuejs/vitepress/issues/2209",0.7011984,{"description":3116,"labels":3117,"number":3119,"owner":3026,"repository":3027,"state":3028,"title":3120,"updated_at":3121,"url":3122,"score":3123},"### Describe the bug\n\nWhen following the steps in https://vitepress.dev/guide/getting-started, the production build doesn't work. \n\n### Reproduction\n\nFirst I used \r\n```\r\nnpx vitepress init\r\n```\r\nto create [this repo](https://gitlab.com/urswilke/vitepress_from_template2).\r\n\r\nI used all the default settings, apart from setting `./docs` in\r\n```\r\nWhere should VitePress initialize the config?\r\n ./docs\r\n```\r\n\r\n\r\nThen, I run:\r\n```\r\nnpm run docs:build \r\n```\r\n\r\nWhen opening the file `docs/.vitepress/dist/index.html`, this results in the CORS errors in the following screenshot:\r\n\r\n\r\n\r\n\r\n\n\n### Expected behavior\n\nThe production build should result in the same as on the dev server (which works).\n\n### System Info\n\n```Text\nSystem:\r\n OS: Linux 6.9 Arch Linux\r\n CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz\r\n Memory: 20.41 GB / 31.12 GB\r\n Container: Yes\r\n Shell: 5.2.26 - /bin/bash\r\n Binaries:\r\n Node: 22.4.1 - /usr/bin/node\r\n npm: 10.8.2 - /usr/bin/npm\r\n npmPackages:\r\n vitepress: ^1.3.1 => 1.3.1\n```\n\n\n### Additional context\n\nOn chrome, the site isn't correctly built either.\r\nThe deploy on gitlab pages also doesn't work (see [here](https://vitepress-from-template2-urswilke-295c17a73cbd456dc43a7cf324dd1.gitlab.io/)).\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.",[3118],{"name":3076,"color":3077},4055,"update notes on base in gitlab deploy guide","2024-07-25T04:42:43Z","https://github.com/vuejs/vitepress/issues/4055",0.70231634,["Reactive",3125],{},["Set"],["ShallowReactive",3128],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fsIQ47g91N7XAHiiL-8mNL41iOktLgGZux8bWZkAJ9dY":-1},"/vuejs/vitepress/2053"]