\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.",[2891],{"name":2892,"color":2893},"question","5D5FAE",3513,"部署到Github Pages之后,如果使用自定义域名的话样式会丢失","2024-02-07T00:04:15Z","https://github.com/vuejs/vitepress/issues/3513",0.72128683,{"description":2900,"labels":2901,"number":2903,"owner":2869,"repository":2870,"state":2883,"title":2904,"updated_at":2905,"url":2906,"score":2907},"### Describe the bug\n\nI have `.github/workflows/deploy.yml` set up in my project root as doc instructed. And Github action succeeds. However, when I visit my pages, its not vitepress that I see but regular github pages.\r\n\r\nIs there some settings I have to alter in github repository itself?\n\n### Reproduction\n\n\r\nThis is my app structure \r\n\r\n```\r\n- root\r\n - docs (vitepress)\r\n - theme/index.js\r\n - config.js\r\n - index.md \r\n - src (src for my vue component lib)\r\n - dist (for my vue component lib)\r\n```\r\n\r\nThis is my github workflow deploy.yml\r\n```\r\nname: Deploy\r\n\r\non:\r\n push:\r\n branches:\r\n - master\r\n\r\njobs:\r\n deploy:\r\n runs-on: ubuntu-latest\r\n steps:\r\n - uses: actions/checkout@v2\r\n - uses: actions/setup-node@v3\r\n with:\r\n node-version: 16\r\n cache: npm\r\n - run: npm ci\r\n\r\n - name: Build\r\n run: npm run docs:build\r\n\r\n - name: Deploy\r\n uses: peaceiris/actions-gh-pages@v3\r\n with:\r\n github_token: ${{ secrets.GITHUB_TOKEN }}\r\n publish_dir: docs/.vitepress/dist\r\n```\n\n### Expected behavior\n\nBuilt vitepress in github pages.\n\n### System Info\n\n```shell\n(Local)\r\nSystem:\r\n OS: macOS 12.2\r\n CPU: (8) arm64 Apple M1 Pro\r\n Memory: 99.72 MB / 16.00 GB\r\n Shell: 5.8 - /bin/zsh\n```\n\n\n### Additional context\n\nMy repository is in an organization.\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.",[2902],{"name":2880,"color":2881},1144,"Github pages shows index.md natively","2023-01-21T14:26:58Z","https://github.com/vuejs/vitepress/issues/1144",0.72431695,{"description":2909,"labels":2910,"number":2914,"owner":2869,"repository":2870,"state":2883,"title":2915,"updated_at":2916,"url":2917,"score":2918},"### Describe the bug\r\n\r\nMainly described in the title, further description is at 4th point of reproducing the error. This is reproduced in normal python http server, and seems to happen in github pages as well.\r\n\r\nMight be related to #412, but I don't think its exactly the same behavior & cause.\r\n\r\n### Reproduction\r\n\r\n1. Download the repro and unzip, it should have the following content:\r\n\r\n```bash\r\n.\r\n├── content\r\n│ ├── first\r\n│ │ ├── index.md\r\n│ │ └── second.md\r\n│ └── index.md\r\n├── package.json\r\n└── yarn.lock\r\n```\r\n\r\n[vitepress-repro.zip](https://github.com/vuejs/vitepress/files/9575259/vitepress-repro.zip)\r\n\r\n\r\n2. Run `yarn && yarn run content:build`\r\n a `site` folder at project root should be created.\r\n4. Run `python3 -m http.server -d . 4000`, and lookup `localhost:4000/site`.\r\n Everything looks fine, you can navigate to First using navbar, and second.md file in first by left panel.\r\n5. Now refresh at the same `localhost:4000/site/first/second`.\r\n You should see the page is loaded but a 404 page is added at the bottom too, now if you try to navigate, the top of page remains as is, the bottom of page is instead replaced by the new content.\r\n\r\n### Expected behavior\r\n\r\nPage should not append a 404 page, nor it should load navigated pages in bottom of page instead of replacing current page.\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: Linux 5.18 Void\r\n CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz\r\n Memory: 3.97 GB / 7.56 GB\r\n Container: Yes\r\n Shell: 3.5.1 - /usr/bin/fish\r\n Binaries:\r\n Node: 16.15.1 - /usr/bin/node\r\n Yarn: 1.22.18 - /usr/bin/yarn\r\n npm: 8.11.0 - /usr/bin/npm\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nFull page screenshot\r\n\r\n\r\n\r\nTwo errors, in order appears in the browser's console:\r\n\r\n```\r\nFailed to load resource: the server responded with a status of 404 (File not found) :4000/site/assets/first_second_index.md.undefined.lean.js:1\r\n\r\nHydration completed but contains mismatches. app.558d10a0.js:1\r\n```\r\n\r\nPoint to be noted is that `first_second_index.md.undefined.lean.js` is trying to get fetched, i.e. the \"undefined\" hash.\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.",[2911],{"name":2912,"color":2913},"need more info","bdbefc",1345,"Built content when served manually (not `vitepress dev \u003Csrc>`) adds a 404 page at end of page, and later navigation loads the page there at bottom replacing 404 at the bottom.","2023-01-21T14:25:22Z","https://github.com/vuejs/vitepress/issues/1345",0.72510725,{"description":2920,"labels":2921,"number":2923,"owner":2869,"repository":2870,"state":2883,"title":2924,"updated_at":2925,"url":2926,"score":2927},"### Describe the bug\n\nHey i got a issue on my fresh installed vitepress..\nI can reload the main page \"index\" as often i want it works, but as soon i go into a \"docs\" page \"https://example.com/introduction/getting-started\" i get a HTTP ERROR 404 on reload everytime ..\ndoes someone know, why ?\n\n### Reproduction\n\nas soon i go into a \"docs\" page \"https://example.com/introduction/getting-started\" i get a HTTP ERROR 404 on reload everytime ..\n\n### Expected behavior\n\nReload page normal without issues.\n\n### System Info\n\n```Text\nSystem:\n OS: Linux 6.12 Debian GNU/Linux trixie/sid\n CPU: (2) x64 AMD EPYC 7543 32-Core Processor\n Memory: 3.20 GB / 3.84 GB\n Container: Yes\n Shell: 5.2.37 - /bin/bash\n Binaries:\n Node: 22.13.1 - /usr/bin/node\n npm: 11.0.0 - /usr/bin/npm\n pnpm: 10.0.0 - /usr/bin/pnpm\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.",[2922],{"name":2912,"color":2913},4518,"HTTP ERROR 404 on Page Reload","2025-02-02T04:41:48Z","https://github.com/vuejs/vitepress/issues/4518",0.7272319,{"description":2929,"labels":2930,"number":2931,"owner":2869,"repository":2870,"state":2883,"title":2932,"updated_at":2933,"url":2934,"score":2935},"### Describe the bug\r\n\r\nI have the following site structure\r\n\r\n\r\n\r\n`/blog` is powered by VitePress (I set `base: '/blog/'` in `/blog/.vitepress/config.js`)\r\n\r\nThe problem is that links from `/blog` pages to other pages of the website do not work\r\n\r\n\r\n\r\nI checked the console and saw 404 for js bundles. And no document requests\r\n\r\n### Reproduction\r\n\r\nDescribed above\r\n\r\n### Expected behavior\r\n\r\nLinks to pages pages outside `/\u003CbasePath>/` should work.\r\n\r\nAs I understood, VitePress treats all the links under `/` as internal and applies routing and prefetching.\r\nThis is the root of the problem.\r\nScoping routing and prefetching to `/\u003CbasePath>/` should fix the problem.\r\n\r\nHere is where an additional check for `basePath` is needed for Router\r\nhttps://github.com/vuejs/vitepress/blob/main/src/client/app/router.ts#L125\r\n\r\n\r\nHere is where an additional check for `basePath` is needed for preFetch https://github.com/vuejs/vitepress/blob/main/src/client/app/composables/preFetch.ts#L83 \r\n\r\n\r\n\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: macOS 11.6\r\n CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz\r\n Memory: 323.38 MB / 16.00 GB\r\n Shell: 5.8 - /bin/zsh\r\n Binaries:\r\n Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node\r\n Yarn: 1.22.15 - ~/.nvm/versions/node/v16.13.0/bin/yarn\r\n npm: 8.1.4 - ~/.nvm/versions/node/v16.13.0/bin/npm\r\n Browsers:\r\n Brave Browser: 95.1.31.88\r\n Chrome: 96.0.4664.55\r\n Firefox: 90.0.2\r\n Safari: 15.1\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] Follow our [Code of Conduct](https://vuejs.org/coc)\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.",[],458,"Links to pages outside \"base\" path scope do not work","2023-01-21T14:32:53Z","https://github.com/vuejs/vitepress/issues/458",0.72822726,{"description":2937,"labels":2938,"number":2941,"owner":2869,"repository":2870,"state":2883,"title":2942,"updated_at":2943,"url":2944,"score":2945},"### Describe the bug\r\n\r\nNot sure if a bug or user error. Should this work? (check reproduction)\r\n\r\n### Reproduction\r\n\r\n```ts\r\nconst githubRepo = resolve(__dirname, '..', '..', '.github', 'docs')\r\nlet rewrites = {}\r\nrewrites[resolve(githubRepo, 'SECURITY.md')] = 'policy/security'\r\n\r\nexport default defineConfig({\r\n // ...\r\n rewrites,\r\n // ...\r\n})\r\n```\r\n\r\n### Expected behavior\r\n\r\nNavigating to https://siteurl/policy/security should load content from the .github repo source\r\n\r\n### System Info\r\n\r\n```sh\r\nSystem:\r\n OS: macOS 13.3.1\r\n CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz\r\n Memory: 68.12 MB / 24.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.9.1 - ~/.nvm/versions/node/v18.9.1/bin/node\r\n Yarn: 1.22.19 - ~/.nvm/versions/node/v18.9.1/bin/yarn\r\n npm: 9.4.0 - ~/.nvm/versions/node/v18.9.1/bin/npm\r\n Browsers:\r\n Chrome: 112.0.5615.137\r\n Safari: 16.4\r\n npmPackages:\r\n vitepress: 1.0.0-alpha.74 => 1.0.0-alpha.74\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nA quick `console.log` of the config shows the correct path is loaded under the rewrite object.\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.",[2939,2940],{"name":2880,"color":2881},{"name":2866,"color":2867},2335,"Rewrite routes with path outside project root ","2023-08-20T00:04:17Z","https://github.com/vuejs/vitepress/issues/2335",0.7283251,{"description":2947,"labels":2948,"number":2950,"owner":2869,"repository":2870,"state":2883,"title":2951,"updated_at":2952,"url":2953,"score":2954},"### Describe the bug\r\n\r\nI'm migrate vue-i18n docs site with vitepress v1 alpha.4\r\nThe config.ts for that docs consists of Mulutiple Sidbars.\r\nConfig.ts is here:\r\nhttps://github.com/intlify/vue-i18n-next/blob/docs/vitepress1/docs/.vitepress/config.ts\r\n\r\n`/guide/` sidebar has items, but it’s wried, we will access the `Message Format Syntax` and `Fallbacking` items resulting in a 404.\r\n\r\nThese settings are here.\r\n- `Message Format Syntax`: https://github.com/intlify/vue-i18n-next/blob/e59dcca32e1aa6af966651f02bb624081299c2bf/docs/.vitepress/config.ts#L114-L117\r\n- `Fallbacking`: https://github.com/intlify/vue-i18n-next/blob/e59dcca32e1aa6af966651f02bb624081299c2bf/docs/.vitepress/config.ts#L134-L137\r\n\r\nThe previous version of vitepress worked, so here is the site URL and config for your reference.\r\n\r\n- URL: https://vue-i18n.intlify.dev/\r\n- config: https://github.com/intlify/vue-i18n-next/blob/master/docs/.vitepress/config.js\r\n\r\n\r\n\r\n### Reproduction\r\n\r\nRepository: https://github.com/intlify/vue-i18n-next\r\n\r\nReproduction step:\r\n1. `git clone git@github.com:intlify/vue-i18n-next.git`\r\n2. `git checkout docs/vitepress1`\r\n3. `pnpm install`\r\n4. `pnpm docs:setup`\r\n5. `pnpm docs:dev`\r\n6. go to http://localhost:3000/\r\n7. go to Guid via navigation `Guide` menu\r\n8. go to [Message Format Syntax](http://localhost:3000/guide/essentials/syntax.html) via sidebar\r\n9. go to [Fallbacking](http://localhost:3000/guide/essentials/fallback.html) via sidebar \r\n\r\n### Expected behavior\r\n\r\nI hope that 404 won't occur on these pages\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: macOS 10.15.7\r\n CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz\r\n Memory: 9.93 GB / 64.00 GB\r\n Shell: 5.7.1 - /bin/zsh\r\n Binaries:\r\n Node: 18.4.0 - ~/bin/.nvm/versions/node/v18.4.0/bin/node\r\n npm: 8.12.1 - ~/bin/.nvm/versions/node/v18.4.0/bin/npm\r\n Browsers:\r\n Chrome: 103.0.5060.53\r\n Firefox: 97.0.1\r\n Safari: 15.5\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.4 => 1.0.0-alpha.4\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] 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.",[2949],{"name":2880,"color":2881},885,"Occured 404 in some pages","2023-01-21T14:32:52Z","https://github.com/vuejs/vitepress/issues/885",0.72977483,{"description":2956,"labels":2957,"number":2958,"owner":2869,"repository":2870,"state":2883,"title":2959,"updated_at":2960,"url":2961,"score":2962},"### Describe the bug\r\n\r\nBefore creating the router the page title is `404 | XXX`, check the screenshot below, it is also reproducible on dev.\r\n\r\n### Reproduction\r\n\r\nJust run `pnpm run docs-dev` on this repo and check the title.\r\n\r\n### Expected behavior\r\n\r\nThe title should not contain the `404`.\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem: \r\n OS: Windows 10 10.0.19044 \r\n CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz\r\n Memory: 45.30 GB / 63.95 GB \r\n Binaries: \r\n Node: 16.13.0 - C:\\Program Files\\nodejs\\node.EXE \r\n Yarn: 1.22.17 - C:\\Program Files\\nodejs\\yarn.CMD \r\n npm: 8.1.0 - C:\\Program Files\\nodejs\\npm.CMD \r\n Browsers: \r\n Chrome: 99.0.4844.82\r\n Edge: Spartan (44.19041.1266.0), Chromium (99.0.1150.55)\r\n Internet Explorer: 11.0.19041.1566\r\n npmPackages:\r\n vitepress: ^0.22.3 => 0.22.3\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n\r\n\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.",[],589,"title `404 | XXX` before creating router","2023-01-21T14:34:19Z","https://github.com/vuejs/vitepress/issues/589",0.73224276,["Reactive",2964],{},["Set"],["ShallowReactive",2967],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fj9aFJSjhQt46N4xvLVzvHweAIl4IQGgSPinkWjEsT9I":-1},"/vuejs/vitepress/2802"]