\n\u003Cimg width=\"1890\" height=\"470\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1b63e5fd-3d4d-4c14-8861-271409800222\" />\n\u003Cimg width=\"1420\" height=\"215\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1d036d80-1d0f-445e-a799-9763e9b5580e\" />\n\n\n\n### Reproduction\n\nno\n\n### Expected behavior\n\nCan add public path normally\n\n### System Info\n\n```Text\nwindows11 ,chrome latest\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.",[3186],{"name":3187,"color":3188},"need more info","bdbefc",4886,"Document deployment does not support the base option (public path) of the VitePress configuration.?","2025-08-06T06:36:15Z","https://github.com/vuejs/vitepress/issues/4886",0.669889,{"description":3195,"labels":3196,"number":3197,"owner":3146,"repository":3147,"state":3148,"title":3198,"updated_at":3199,"url":3200,"score":3201},"### 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.67527497,{"description":3203,"labels":3204,"number":3208,"owner":3146,"repository":3147,"state":3148,"title":3209,"updated_at":3210,"url":3211,"score":3212},"### Describe the bug\r\n\r\nThe url generated by [`createContentLoader`](https://github.com/vuejs/vitepress/blob/7778187f2dc31554fa7541da9648235c994d4ae8/src/node/contentLoader.ts#L66C17-L66C36) does not contain [`base`](https://vitepress.dev/reference/site-config#base)\r\n\r\n[Relevant code](https://github.com/vuejs/vitepress/blob/7778187f2dc31554fa7541da9648235c994d4ae8/src/node/contentLoader.ts#L142-L146):\r\n\r\n```ts\r\nconst url =\r\n '/' + \r\n normalizePath(path.relative(config.srcDir, file))\r\n .replace(/(^|\\/)index\\.md$/, '$1')\r\n .replace(/\\.md$/, config.cleanUrls ? '' : '.html')\r\n```\r\n\r\nMay be fixed by replacing `'/'` by `config.base`\r\n\r\n### Reproduction\r\n\r\nI have [this repo on StackBlitz](https://stackblitz.com/edit/github-tyb3oh) to reproduce this bug.\r\n\r\n### Expected behavior\r\n\r\n`url`s containing `base` as prefix\r\n\r\n### System Info\r\n\r\n```\r\nSystem:\r\n OS: Linux 5.0 undefined\r\n CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\r\n Memory: 0 Bytes / 0 Bytes\r\n Shell: 1.0 - /bin/jsh\r\n Binaries:\r\n Node: 16.20.0 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 9.4.2 - /usr/local/bin/npm\r\n pnpm: 8.6.3 - /usr/local/bin/pnpm\r\n npmPackages:\r\n vitepress: 1.0.0-beta.7 => 1.0.0-beta.7 \r\n```\r\n\r\n\r\n### Additional context\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.",[3205],{"name":3206,"color":3207},"wont fix","EDEED1",2710,"`createContentLoader` should generate url with `base` in Site Config","2023-08-28T08:32:52Z","https://github.com/vuejs/vitepress/issues/2710",0.68028885,{"description":3214,"labels":3215,"number":3219,"owner":3146,"repository":3147,"state":3148,"title":3220,"updated_at":3221,"url":3222,"score":3223},"### Describe the bug\n\n\r\n\r\n\r\nsame happens when there's another `base: '/section2/',` in sidebar\n\n### Reproduction\n\nconfig:\r\n```ts\r\nexport default defineConfig({\r\n\r\n...\r\n\r\n sidebar: [\r\n {\r\n base: '/section/',\r\n items: [\r\n { text: 'First', link: '/first' },\r\n { text: 'Second', link: '/second' },\r\n { text: 'Third', link: '/third' },\r\n ]\r\n },\r\n ],\r\n\r\n...\r\n```\r\n\r\nfolder structure:\r\n\r\n\r\n\n\n### Expected behavior\n\n\r\n\r\n(like without the base link and md files stored in parent folder)\n\n### System Info\n\n```Text\nrc20, windows\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.",[3216],{"name":3217,"color":3218},"bug: pending triage","e99695",3010,"bottom page navigation link always directs to first page when using base URLs for sidebar","2023-10-02T00:04:34Z","https://github.com/vuejs/vitepress/issues/3010",0.681989,{"description":3225,"labels":3226,"number":3228,"owner":3146,"repository":3147,"state":3148,"title":3229,"updated_at":3230,"url":3231,"score":3232},"### Describe the bug\n\nVite supports defining a relative `base` (`./`) to use when deploying to unknown subpaths.\r\n\r\nVitepress breaks this behavior and instead renders a 404 (hydration mismatch) error.\n\n### Reproduction\n\nuse the default theme installation with the additional vite `base` config:\r\n\r\n```ts\r\nimport { defineConfig } from 'vitepress'\r\n\r\n// https://vitepress.dev/reference/site-config\r\nexport default defineConfig({\r\n title: \"My Awesome Project\",\r\n description: \"A VitePress Site\",\r\n // ...\r\n vite: {\r\n base: './', // \u003C-- this breaks the site generation (homepage shows 404 & hydration mismatch)\r\n },\r\n})\r\n```\n\n### Expected behavior\n\nIt should work just like vite works.\n\n### System Info\n\n```Text\nSystem:\r\n OS: macOS 14.3.1\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 450 MB / 64.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\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\n Browsers:\r\n Chrome: 121.0.6167.160\r\n npmPackages:\r\n vitepress: ^1.0.0-rc.42 => 1.0.0-rc.42\n```\n\n\n### Additional context\n\nNot sure if #3057 describes the same issue but it seems related.\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.",[3227],{"name":3206,"color":3207},3576,"Relative base breaks site generation","2024-02-23T00:05:14Z","https://github.com/vuejs/vitepress/issues/3576",0.6826099,{"description":3234,"labels":3235,"number":3236,"owner":3146,"repository":3147,"state":3148,"title":3237,"updated_at":3238,"url":3239,"score":3240},"### Describe the bug\r\n\r\nI noticed that `route.path` works differently in SSR and Runtime.\r\nIn SSR `route.path` doesn't include the `base` value.\r\nIn Runtime `route.path` includes the `base` value.\r\nIt causes `Hydration completed but contains mismatches.` error\r\n\r\n### Reproduction\r\n\r\n1. Define Vitepress config with `base` option\r\n```js\r\nmodule.exports = {\r\n base: '/blog/',\r\n lang: 'en-US',\r\n title: 'The Blog',\r\n};\r\n```\r\n2. Create two vue components: `\u003CBlog />` to be served at `/blog/` and `\u003CArticle />` to be served at inner routes\r\n3. Use custom layout component in `.vitepress/theme/index.js`\r\n```js\r\nexport default {\r\n ...DefaultTheme,\r\n Layout,\r\n};\r\n```\r\n3. Define routing logic in `Layout.vue` component\r\n```js\r\n\u003Ctemplate>\r\n \u003Cdiv>\r\n \u003CBlog v-if=\"isIndex\" />\r\n \u003CArticle v-else />\r\n \u003C/div>\r\n\u003C/template>\r\n\r\n\u003Cscript setup lang=\"ts\">\r\nimport { computed } from 'vue';\r\nimport { useRoute } from 'vitepress';\r\nimport Blog from './Blog.vue';\r\nimport Article from './Article.vue';\r\n\r\nconst route = useRoute();\r\nconst isIndex = computed(() => {\r\n return route.path.replace(/index.html$/, '') === '/';\r\n});\r\n\u003C/script>\r\n\r\n```\r\n\r\n### Expected behavior\r\n\r\nI expect that\r\n1. Blog component is served at `/blog/`\r\n2. Article component is served at `/blog/**/*` routes\r\n3. No `Hydration completed but contains mismatches.` error in the console\r\n4. No blinking screen that happens because the page is rendered as Article in SSR and then transformed into Blog during hydration\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: 176.77 MB / 16.00 GB\r\n Shell: 5.8 - /bin/zsh\r\n Binaries:\r\n Node: 16.1.0 - ~/.nvm/versions/node/v16.1.0/bin/node\r\n Yarn: 1.22.10 - /usr/local/bin/yarn\r\n npm: 7.17.0 - ~/.nvm/versions/node/v16.1.0/bin/npm\r\n Browsers:\r\n Brave Browser: 92.1.28.106\r\n Chrome: 96.0.4664.45\r\n Firefox: 90.0.2\r\n Safari: 15.0\r\n npmPackages:\r\n vitepress: ^0.20.1 => 0.20.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.",[],446,"route.path doesn't work correctly with base option","2023-01-21T14:35:45Z","https://github.com/vuejs/vitepress/issues/446",0.6830256,["Reactive",3242],{},["Set"],["ShallowReactive",3245],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fWvi6w0-pLxgzWnNg8Un1ZWWGlxAmjr7eb5BR5z8VpX8":-1},"/vuejs/vitepress/252"]