\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.",[3192],{"name":3193,"color":3194},"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.70366865,{"description":3201,"labels":3202,"number":3203,"owner":3152,"repository":3153,"state":3154,"title":3204,"updated_at":3205,"url":3206,"score":3207},"Vitepress keeps adding `.html` extension to any link referencing a pdf file relative to the page. Seems like it's hard-coded here\r\n\r\nhttps://github.com/vuejs/vitepress/blob/cee0b400d95b610fa47ea79007e03221a140084f/src/node/markdownToVue.ts#L52\r\n\r\nMay be it's the right way and any non-routed link should be put as `\u003Ca>` tag? Just wanted to share this observation.",[],265,"Adding link to (non-html) files from md","2023-01-21T16:20:09Z","https://github.com/vuejs/vitepress/issues/265",0.7060685,{"description":3209,"labels":3210,"number":3211,"owner":3152,"repository":3153,"state":3154,"title":3212,"updated_at":3156,"url":3213,"score":3214},"### 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","https://github.com/vuejs/vitepress/issues/458",0.70966285,{"description":3216,"labels":3217,"number":3218,"owner":3152,"repository":3153,"state":3154,"title":3219,"updated_at":3220,"url":3221,"score":3222},"### Describe the bug\r\n\r\nWhen you click a link from a VitePress-generated page to a `public` page on the same site, VitePress gives a 404 error unless the page is reloaded or opened in a new tab.\r\n\r\n### Reproduction\r\n\r\nCreate a VitePress project with these contents.\r\n\r\n`index.md`:\r\n\r\n```markdown\r\n---\r\nlayout: home\r\nhero:\r\n actions:\r\n - text: foo\r\n link: /foo.html\r\n---\r\n```\r\n\r\n`public/foo.html`:\r\n\r\n```html\r\n\u003C!DOCTYPE html>\r\n\u003Chtml lang=\"en\">\r\n \u003Chead>\r\n \u003Cmeta charset=\"utf-8\" />\r\n \u003C/head>\r\n \u003Cbody>\r\n \u003Cp>Hello, world!\u003C/p>\r\n \u003C/body>\r\n\u003C/html>\r\n```\r\n\r\nThen run `npx vitepress dev`, open http://localhost:5173/, and click on the green \"foo\" button that appears. VitePress gives a 404 error page. Reload the page, and the correct HTML page should appear with the contents \"Hello, world!\"\r\n\r\nGo back to http://localhost:5173/, and this time open the green \"foo\" button's link in a new tab. Observe that the page is loaded correctly with no 404.\r\n\r\n### Expected behavior\r\n\r\nVitePress should load the page correctly when clicking the link to open it in the current tab.\r\n\r\n### System Info\r\n\r\n```\r\nSystem:\r\n OS: macOS 12.6.1\r\n CPU: (8) arm64 Apple M1\r\n Memory: 277.38 MB / 16.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node\r\n Yarn: 1.22.19 - ~/.yarn/bin/yarn\r\n npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm\r\n Browsers:\r\n Chrome: 108.0.5359.98\r\n Firefox: 90.0\r\n Safari: 16.1\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.30 => 1.0.0-alpha.30\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.",[],1685,"404 error when clicking link to public","2023-01-21T14:17:08Z","https://github.com/vuejs/vitepress/issues/1685",0.71288544,{"description":3224,"labels":3225,"number":3226,"owner":3152,"repository":3153,"state":3154,"title":3227,"updated_at":3228,"url":3229,"score":3230},"In Vitepress (vuejs/vitepress), the page HTML base path (`site.base`) and the static assets base path (`vite config.base`, equivalent to `publicPath` in webpack) are not handled separately. This causes issues when deploying the HTML and CDN separately (with the HTML being served from a dedicated domain and the CDN deployed on a general CDN service). The built pages cannot navigate correctly or the static assets fail to load properly.\r\n\r\nThe current code handling both `site.base` and `vite.config.base` consistently can be found at the following link:\r\n\r\nhttps://github.com/vuejs/vitepress/blob/b16340acbd3c60fee023daadb0ec5a0292060a1e/src/node/build/bundle.ts#L60\r\n\r\nIt would be beneficial to separate the handling of these two base paths to better support different deployment scenarios.",[],2144," Separate handling of page HTML base path and static assets base path in Vitepress","2023-04-04T00:03:58Z","https://github.com/vuejs/vitepress/issues/2144",0.71615773,{"description":3232,"labels":3233,"number":3235,"owner":3152,"repository":3153,"state":3154,"title":3236,"updated_at":3237,"url":3238,"score":3239},"### Describe the bug\n\nIf there is a plaintext file in public directory, and the file extension is unrecognized (i.e. `.txt` files are recognized, but `.ini`, or any random combination of file extensions, are not), the build system is attempting to convert the links to append `.html` to it. This causes the link to 404.\n\n### Reproduction\n\nNOTE: this reproduces a scenario in the testing environment. **docs:build doesn't even run because, as a result of the below generation, the link is being treated as dead.**\r\n\r\nAdd this to `/public/hello.ini`:\r\n```ini\r\n[helloworld]\r\n```\r\n\r\nAnd then have any page link to it like so:\r\n```md\r\n[download hello.ini](/hello.ini)\r\n```\r\n\r\nAnd it will generate:\r\n```html\r\n\u003Ca href=\"/hello.ini.html\">download hello.ini\u003C/a>\r\n```\r\n\n\n### Expected behavior\n\nThe docs seem to suggest that files in the `public` directory will be copied as-is to the output directory; the same logic should apply to links. That is to say, there should be no `.html` suffix in the `href` and either the download or the browser opening the resulting file in plaintext should proceed.\n\n### System Info\n\n```Text\nSystem:\r\n OS: Windows 10 10.0.19045\r\n CPU: (12) x64 Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz\r\n Memory: 4.95 GB / 31.92 GB\r\n Binaries:\r\n Node: 20.11.0 - C:\\Program Files\\nodejs\\node.EXE\r\n npm: 10.2.4 - C:\\Program Files\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Chromium (127.0.2651.86)\r\n Internet Explorer: 11.0.19041.4355\r\n npmPackages:\r\n vitepress: ^1.3.4 => 1.3.4\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.",[3234],{"name":3163,"color":3164},4208,"Markdown absolute links to plaintext files in public directory attempts to link as HTML","2024-09-24T04:43:23Z","https://github.com/vuejs/vitepress/issues/4208",0.7174973,["Reactive",3241],{},["Set"],["ShallowReactive",3244],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fGjYPKF1SOVPb_ebUqsPlDZLV5vVgBvEyLsFMsWBqVQQ":-1},"/vuejs/vitepress/1806"]