\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.",[3034],{"name":3035,"color":3036},"question","5D5FAE",3513,"closed","部署到Github Pages之后,如果使用自定义域名的话样式会丢失","2024-02-07T00:04:15Z","https://github.com/vuejs/vitepress/issues/3513",0.6764693,{"description":3044,"labels":3045,"number":3049,"owner":3024,"repository":3025,"state":3038,"title":3050,"updated_at":3051,"url":3052,"score":3053},"### Describe the bug\n\nIt seems when I set `lastUpdated: true` something is trying to call git.\r\n\r\nI use vitepress in an alpine docker container so git is not installed and an error occured. \n\n### Reproduction\n\n```ts\r\n// config.ts\r\nimport { defineConfig } from 'vitepress'\r\n\r\n// https://vitepress.dev/reference/site-config\r\nexport default defineConfig({\r\n title: \"Documentation\",\r\n description: \"La documentation interne\",\r\n vite: {\r\n server: {\r\n host: true,\r\n origin: 'https://documentation.docker',\r\n port: 5173,\r\n strictPort: true,\r\n hmr: {\r\n clientPort: 443,\r\n },\r\n },\r\n },\r\n lastUpdated: true,\r\n themeConfig: {\r\n // https://vitepress.dev/reference/default-theme-config\r\n nav: [\r\n { text: 'Home', link: '/' },\r\n { text: 'Examples', link: '/markdown-examples' },\r\n ],\r\n }\r\n})\r\n```\r\n```yml\r\n# docker-compose.yml\r\nversion: \"3\"\r\n\r\nservices:\r\n documentation:\r\n container_name: documentation\r\n image: node:18-alpine\r\n user: node\r\n working_dir: /documentation\r\n volumes:\r\n - ./:/documentation\r\n```\r\n```json\r\n// package.json\r\n{\r\n \"scripts\": {\r\n \"dev\": \"vitepress dev docs\",\r\n \"build\": \"vitepress build docs\",\r\n \"preview\": \"vitepress preview docs\"\r\n },\r\n \"devDependencies\": {\r\n \"vitepress\": \"^1.0.0-alpha.64\"\r\n }\r\n}\r\n```\r\n\r\nI run the command\r\n```shell\r\ndocker-compose run --rm documentation npm run build\r\n```\r\n\r\nAnd this error occurred : \r\n```sh\r\n vitepress v1.0.0-alpha.64\r\n\r\n⠏ building client + server bundles...[vitepress] spawn git ENOENT\r\nfile: /documentation/docs/drupal_niji/drupal_niji.md\r\n✖ building client + server bundles...\r\nbuild error:\r\nError: spawn git ENOENT\r\n at ChildProcess._handle.onexit (node:internal/child_process:283:19)\r\n at onErrorNT (node:internal/child_process:476:16)\r\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\r\n```\n\n### Expected behavior\n\nVitepress shouldn't needs git to build. no ?\n\n### System Info\n\n```shell\nSystem:\r\n OS: Linux 5.15 Alpine Linux\r\n CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz\r\n Memory: 2.38 GB / 15.03 GB\r\n Container: Yes\r\n Shell: 1.35.0 - /bin/ash\r\n Binaries:\r\n Node: 18.13.0 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 8.19.3 - /usr/local/bin/npm\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.64 => 1.0.0-alpha.64\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.",[3046],{"name":3047,"color":3048},"bug: pending triage","e99695",2175,"Display lastUpdated call git ?","2023-04-08T00:03:56Z","https://github.com/vuejs/vitepress/issues/2175",0.68139106,{"description":3055,"labels":3056,"number":3058,"owner":3024,"repository":3025,"state":3038,"title":3059,"updated_at":3060,"url":3061,"score":3062},"### Describe the bug\n\n\r\nvitepress v1.0.0-rc.41\r\n--\r\n18:10:03.153 | \r\n18:10:03.204 | - building client + server bundles...\r\n18:10:04.206 | \r\n18:10:04.206 | The language 'git' is not loaded, falling back to 'txt' for syntax highlighting.\r\n18:10:04.207 | \r\n18:10:04.207 | The language 'git' is not loaded, falling back to 'txt' for syntax highlighting.\r\n18:10:20.793 | \r\n18:10:20.794 | \r\n18:10:20.794 | (!) Found dead link ./assets/Vue.js-devtools_v3.1.6.crx in file web/vue/vue-router/3-devTools.md\r\n18:10:20.794 | \r\n18:10:20.794 | If this is expected, you can disable this check via config. Refer: https://vitepress.dev/reference/site-config#ignoredeadlinks\r\n18:10:20.794 | \r\n18:10:20.795 | [vitepress] 1 dead link(s) found.\r\n18:10:20.795 | ✖ building client + server bundles...\r\n18:10:20.803 | build error:\r\n18:10:20.804 | Error: 1 dead link(s) found.\r\n\r\n\u003Cimg width=\"1341\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/56349292/19734b5b-3ede-426d-a62e-c06967ed9f03\">\r\n\n\n### Reproduction\n\nThere is no problem with packaging in the local environment\r\n\r\nProduction environment packaging prompt error\r\n\r\nnode - 20.10.0\r\nvitepress\": \"^1.0.0-rc.41\"\n\n### Expected behavior\n\nbuild success\n\n### System Info\n\n```Text\nSystem:\r\n OS: macOS 14.2\r\n CPU: (8) arm64 Apple M1\r\n Memory: 52.17 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\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.",[3057],{"name":3047,"color":3048},3541,"[vitepress] 1 dead link(s) found.","2024-02-17T00:04:16Z","https://github.com/vuejs/vitepress/issues/3541",0.68209386,{"description":3064,"labels":3065,"number":3067,"owner":3024,"repository":3025,"state":3038,"title":3068,"updated_at":3069,"url":3070,"score":3071},"### Describe the bug\r\n\r\nVitePress builds, and instantly removes the dist folder again.\r\n\r\n### Reproduction\r\n\r\nClone my [GitHub repository](https://github.com/Ahwxorg/Linkbase/), run yarn to install the dependencies and run `yarn vitepress build`.\r\n\r\n### Expected behavior\r\n\r\nVitePress successfully builds the dist/ folder.\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: macOS 13.5.2\r\n CPU: (10) arm64 Apple M2 Pro\r\n Memory: 125.69 MB / 16.00 GB\r\n Shell: 3.6.1 - /opt/homebrew/bin/fish\r\n Binaries:\r\n Node: 20.7.0 - /opt/homebrew/bin/node\r\n Yarn: 1.22.19 - /opt/homebrew/bin/yarn\r\n npm: 10.1.0 - /opt/homebrew/bin/npm\r\n Browsers:\r\n Safari: 16.6\r\n```\r\n\r\n\r\nAlthough I use GitHub Actions as well (see [the failed run here](https://github.com/Ahwxorg/Linkbase/actions/runs/6273423931/job/17036870482))\r\n\r\n\r\n### Additional context\r\n\r\nBuild log is the following:\r\n\r\n```sh\r\nvitepress v1.0.0-rc.20\r\n\r\n✓ building client + server bundles...\r\n✓ rendering pages...\r\nbuild complete in 1.89s.\r\n✨ Done in 2.06s.\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.",[3066],{"name":3047,"color":3048},3040,"[Bug] VitePress won't build","2023-10-10T00:04:18Z","https://github.com/vuejs/vitepress/issues/3040",0.6839388,{"description":3073,"labels":3074,"number":3076,"owner":3024,"repository":3025,"state":3038,"title":3077,"updated_at":3078,"url":3079,"score":3080},"### Describe the bug\n\nWhen running Vitepress I get the following dead link error messages for my localhost server: \r\n-(!) Found dead link `http://localhost:4000/#/...`\r\n\r\nWhen I click on the links they open up without any issues.\r\nWhen I set the config to ignore the dead links:\r\n```js\r\nimport { defineConfig } from \"vitepress\";\r\n\r\nexport default defineConfig({\r\n ignoreDeadLinks: true\r\n});\r\n```\r\nand try to build I still get the following error:\r\n```sh\r\n⠼ building client + server bundles...[vitepress] One or more pages contain dead links.\r\n✖ building client + server bundles...\r\nbuild error:\r\n Error: One or more pages contain dead links.\r\n```\n\n### Reproduction\n\nPoint a link to a local server running on localhost. In my case, I'm pointing it to [cubejs](https://cube.dev/) dev server running on localhost port 4000 `http://localhost:4000/#/build?query={}`\r\n\r\ncode in Vitepress:\r\n```md\r\n[link to localhost endpoint](http://localhost:4000/#/build?query={})\r\n```\n\n### Expected behavior\n\nThe link should not be reported as a dead link as it is working, maybe display a warning as this is a link pointing to localhost to make sure this is the desired host in my case it is.\r\n\r\nIf I set the config to ignore deadlink, it should build and not fail\r\n```js\r\nimport { defineConfig } from \"vitepress\";\r\n\r\nexport default defineConfig({\r\n ignoreDeadLinks: true\r\n});\r\n```\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 12.4\r\n CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz\r\n Memory: 25.68 MB / 16.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.16.0 - /usr/local/opt/node@16/bin/node\r\n npm: 8.11.0 - /usr/local/opt/node@16/bin/npm\r\n Browsers:\r\n Chrome: 103.0.5060.114\r\n Safari: 15.5\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.",[3075],{"name":3047,"color":3048},1019,"localhost dead links","2023-01-21T14:30:20Z","https://github.com/vuejs/vitepress/issues/1019",0.6845023,{"description":3082,"labels":3083,"number":3084,"owner":3024,"repository":3025,"state":3038,"title":3085,"updated_at":3086,"url":3087,"score":3088},"### Describe the bug\n\n✓ building client + server bundles...\r\n✓ rendering pages...\r\n✖ generating sitemap...\r\nbuild error:\r\nError: spawn git ENOENT\r\n at ChildProcess._handle.onexit (node:internal/child_process:283:19)\r\n at onErrorNT (node:internal/child_process:476:16)\r\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\r\n ELIFECYCLE Command failed with exit code 1.\r\n\r\n\r\n\n\n### Reproduction\n\nhttps://github.com/tomiaa12/blog\n\n### Expected behavior\n\n如题\n\n### System Info\n\n```sh\nSystem:\r\n OS: Windows 10 10.0.19043\r\n CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-1235U\r\n Memory: 3.64 GB / 15.64 GB\r\n Binaries:\r\n Node: 18.16.0 - C:\\Program Files\\nodejs\\node.EXE\r\n npm: 9.5.1 - C:\\Program Files\\nodejs\\npm.CMD\r\n pnpm: 8.6.11 - C:\\Program Files\\nodejs\\pnpm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1023.0)\r\n Internet Explorer: 11.0.19041.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.",[],2749,"✖ generating sitemap...生成sitemap编译报错","2023-08-16T00:04:25Z","https://github.com/vuejs/vitepress/issues/2749",0.6849351,{"description":3090,"labels":3091,"number":3093,"owner":3024,"repository":3025,"state":3038,"title":3094,"updated_at":3095,"url":3096,"score":3097},"### Describe the bug\n\nWhen building my VitePress site, sometimes will got this error:\r\n\r\n```log\r\n✓ building client + server bundles...\r\n✖ rendering pages...\r\nbuild error:\r\nCannot read properties of undefined (reading 'some')\r\nTypeError: Cannot read properties of undefined (reading 'some')\r\n at isChildActive (file:///mnt/disk/MAIN/read/.vitepress/.temp/app.js:2935:28)\r\n at file:///mnt/disk/MAIN/read/.vitepress/.temp/app.js:2937:43\r\n at ReactiveEffect.fn (/mnt/disk/MAIN/read/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js:928:13)\r\n at ReactiveEffect.run (/mnt/disk/MAIN/read/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js:162:19)\r\n at get value [as value] (/mnt/disk/MAIN/read/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js:940:109)\r\n at file:///mnt/disk/MAIN/read/.vitepress/.temp/app.js:2942:127\r\n at renderComponentSubTree (/mnt/disk/MAIN/read/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:442:9)\r\n at renderComponentVNode (/mnt/disk/MAIN/read/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:386:12)\r\n at ssrRenderComponent (/mnt/disk/MAIN/read/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:84:10)\r\n at file:///mnt/disk/MAIN/read/.vitepress/.temp/app.js:2974:19\r\nerror: script \"build\" exited with code 1\r\n```\r\n\r\nDidnot know how to figure it out.\n\n### Reproduction\n\nhttps://github.com/tianheg/read/tree/0a2c670076d0bec5db10500807eb4c31bb5c80da\n\n### Expected behavior\n\nbuild succeed every time\n\n### System Info\n\n```Text\nSystem:\r\n OS: Linux 6.10 Arch Linux\r\n CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz\r\n Memory: 13.31 GB / 23.36 GB\r\n Container: Yes\r\n Shell: 5.9 - /usr/bin/zsh\r\nBinaries:\r\n Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node\r\n npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm\r\n bun: 1.1.22 - /usr/bin/bun\r\nnpmPackages:\r\n vitepress: ^1.3.2 => 1.3.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.",[3092],{"name":3047,"color":3048},4130,"bug: Repeated builds doesn't always succeed every time","2024-09-04T04:43:02Z","https://github.com/vuejs/vitepress/issues/4130",0.68761516,{"description":3099,"labels":3100,"number":3104,"owner":3024,"repository":3025,"state":3038,"title":3105,"updated_at":3106,"url":3107,"score":3108},"### Describe the bug\r\n\r\nWhen using [`base`](https://vitepress.vuejs.org/config/basics.html#base), `route.path` is different across client and server.\r\n\r\nFor example, when using base `/base/` and logging `route.path`, `vitepress build` will log `/index.html`, but when visited in the browser, it logs `/base/index.html`.\r\n\r\n\r\n### Reproduction\r\n\r\n[Minimal reproduction link](https://github.com/privatenumber/issue-reproductions/tree/master/reproductions/vuejs/vitepress/587)\r\n\r\n1. Create a project with the following files:\r\n\r\n.vitepress/config.js\r\n```js\r\nimport { defineConfig } from 'vitepress'\r\n\r\nexport default defineConfig({\r\n\tbase: '/base/'\r\n})\r\n```\r\n\r\nindex.md:\r\n```html\r\n\u003Cscript setup>\r\nimport { useRoute } from 'vitepress';\r\n\r\nconst route = useRoute();\r\nconsole.log(`\\n\\nBUG: \"route.path\" is different across server and client: \"${route.path}\"\\n\\n`);\r\n\u003C/script>\r\n\r\nHello world\r\n```\r\n\r\n2. Run`vitepress build` and see `/index.html` get logged\r\n\r\n3. Run `vitepress serve` and see `/base/index.html` get logged\r\n\r\n\r\n### Expected behavior\r\n\r\nFor `route.path` to be consistent across server and client.\r\n\r\n### System Info\r\n\r\n```shell\r\nN/A\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nRelated: https://github.com/vuejs/vitepress/issues/446\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.",[3101],{"name":3102,"color":3103},"duplicate","cfd3d7",587,"base not used in route.path in server side","2023-01-21T16:04:13Z","https://github.com/vuejs/vitepress/issues/587",0.6885984,{"description":3110,"labels":3111,"number":3115,"owner":3024,"repository":3025,"state":3038,"title":3116,"updated_at":3117,"url":3118,"score":3119},"### 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.",[3112],{"name":3113,"color":3114},"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.6905572,["Reactive",3121],{},["Set"],["ShallowReactive",3124],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fcJQ-OGsgMXgjNH7CcF7lP6Xney7K6rcjZLRZ2-6JItg":-1},"/vuejs/vitepress/2646"]