\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.",[3151],{"name":3152,"color":3153},"need more info","bdbefc",4886,"vuejs","vitepress","closed","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.6977707,{"description":3163,"labels":3164,"number":3165,"owner":3155,"repository":3156,"state":3157,"title":3166,"updated_at":3167,"url":3168,"score":3169},"### Describe the bug\n\nWhen placing an HTML file inside the `public` folder, creating a link to it and then clicking the link, the console fills with warnings and errors instead of navigating to the HTML file.\r\n\r\n\n\n### Reproduction\n\n1. Place an HTML file inside the public dir (e. .g. `public/api/index.html`)\r\n2. Inside a Markdown file, create a link to this HTML file:\r\n```\r\n[link](/api/)\r\n[link](/api/index)\r\n[link](/api/index.html)\r\n```\r\n3. Open the page and click the link\n\n### Expected behavior\n\nThe browser should navigate to the HTML file and display it full-size (essentially replacing the VitePress app)\r\n\r\nInterestingly: When accessing to the HTML page directly (`http://localhost:3000/api/index.html`) it renders the HTML page, so that part works.\r\nAlthough clicking the link and reloading (`CTRL+R`) renders the HTML page, but when clicking the browser's back button it just changes the URL and doesn't return to the VitePress application.\n\n### System Info\n\n```shell\nSystem:\r\n OS: Windows 10 10.0.19042\r\n CPU: (12) x64 AMD Ryzen 5 1600X Six-Core Processor\r\n Memory: 7.92 GB / 15.95 GB\r\n Binaries:\r\n Node: 14.15.5 - C:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.10 - ~\\AppData\\Roaming\\npm\\yarn.CMD\r\n npm: 6.14.11 - C:\\Program Files\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1023.0), Chromium (92.0.902.55)\r\n Internet Explorer: 11.0.19041.1\r\n npmPackages:\r\n vitepress: ^0.16.0 => 0.16.0\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/coc)\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.",[],360,"Linking to HTML file in public dir","2023-01-21T14:32:53Z","https://github.com/vuejs/vitepress/issues/360",0.69996953,{"description":3171,"labels":3172,"number":3176,"owner":3155,"repository":3156,"state":3157,"title":3177,"updated_at":3178,"url":3179,"score":3180},"### 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.",[3173],{"name":3174,"color":3175},"bug: pending triage","e99695",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.71223116,{"description":3182,"labels":3183,"number":3185,"owner":3155,"repository":3156,"state":3157,"title":3186,"updated_at":3187,"url":3188,"score":3189},"### 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.",[3184],{"name":3174,"color":3175},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.7125426,{"description":3191,"labels":3192,"number":3196,"owner":3155,"repository":3156,"state":3157,"title":3197,"updated_at":3198,"url":3199,"score":3200},"### Describe the bug\n\nIf you configure the base config property, it somewhat works on dev. The way it appears to work is that it navigates to the requested page, but proceeds to redirect you to the true page directly after. \r\n\r\nIf this is how it works on dev, it isn't really a foolproof solution. \r\n\r\nThe issue mainly is that on a built copy, this method doesn't work at all. Even if you have a base config property, it doesn't redirect you. \r\n\r\nKeep in mind that I'm using these links in _layout.vue_ which may be different in an md file. \n\n### Reproduction\n\nCreate an app, \r\nconfigure the base\r\nGo to layout\r\nCreate some links, say, to /about\r\nTry to navigate on dev, seemingly goes to /about then redirects to /${base}/about\r\n- works\r\nBuild the project\r\nPreview\r\nTry to navigate to /about\r\n- does not work -> goes directly to /about and not /`${base}/about\n\n### Expected behavior\n\nIt would be nice if Vitepress was smart enough to compile all the links with the base property. Like I've said, it seems that the method is redirection, but perhaps I'm confused. \n\n### System Info\n\n```sh\nSystem:\r\n OS: Linux 6.2 Pop!_OS 22.04 LTS\r\n CPU: (12) x64 AMD Ryzen 5 3600X 6-Core Processor\r\n Memory: 7.46 GB / 15.53 GB\r\n Container: Yes\r\n Shell: 5.1.16 - /bin/bash\r\n Binaries:\r\n Node: 18.16.0 - /run/user/1000/fnm_multishells/11424_1683296095333/bin/node\r\n npm: 9.5.1 - /run/user/1000/fnm_multishells/11424_1683296095333/bin/npm\r\n Browsers:\r\n Firefox: 112.0.2\r\n npmPackages:\r\n vitepress: 1.0.0-alpha.75 => 1.0.0-alpha.75\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.",[3193],{"name":3194,"color":3195},"docs","0075ca",2339,"Config 'base' option works on dev, but doesn't quite work on build","2023-06-03T00:03:55Z","https://github.com/vuejs/vitepress/issues/2339",0.71428615,{"description":3202,"labels":3203,"number":3204,"owner":3155,"repository":3156,"state":3157,"title":3205,"updated_at":3206,"url":3207,"score":3208},"1. Put a file called `foo.json` in the `public/` directory\r\n2. In an `.md` file somewhere, create a link like `[look at this JSON file](/foo.json)`\r\n3. Build the site. The link works.\r\n4. Change the VitePress config to add `base: '/base/`\r\n5. Build the site again. The link doesn't work: it erroneously points to `/foo.json`, but it should point to `/base/foo.json`",[],1806,"Links to public/ files are wrong when a base URL is used","2023-02-20T00:04:34Z","https://github.com/vuejs/vitepress/issues/1806",0.7191443,{"description":3210,"labels":3211,"number":3215,"owner":3155,"repository":3156,"state":3157,"title":3216,"updated_at":3217,"url":3218,"score":3219},"### 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.",[3212],{"name":3213,"color":3214},"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.7199455,{"description":3221,"labels":3222,"number":3224,"owner":3155,"repository":3156,"state":3157,"title":3225,"updated_at":3226,"url":3227,"score":3228},"### Describe the bug\r\n\r\nFor example the page https://blog.jaggerwang.net/basicai-annotation-specification/ cannot access directly, but it's ok when add `index.html` suffix, and other pages did not have this problem, such as https://blog.jaggerwang.net/basicai-technical-architecture/ . So it seems related to the content of page?\r\n\r\n\u003Cimg width=\"1512\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/1255011/3a69f282-d002-4194-b7ca-3b3075616883\">\r\n\r\nIt's ok when running in local dev and preview mode, and there is no error showing in the browser console or terminal console.\r\n\r\n\u003Cimg width=\"1512\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/1255011/82b87b50-f21a-430e-bb4e-893eb3bf9c52\">\r\n\r\n### Reproduction\r\n\r\nProject structure:\r\n\r\n\u003Cimg width=\"1624\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/1255011/d3f2d9e0-5dc8-4344-9674-61433c5a8322\">\r\n\r\nAliyun OSS config:\r\n\r\n\u003Cimg width=\"1306\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/1255011/d30acd18-d20c-44f2-a872-61bd981d0bcb\">\r\n\r\nBuid with GitHub actions, but the html is same with local build.\r\n\r\n\u003Cimg width=\"1624\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/1255011/f57bef3c-2d76-47c4-b18a-4b4a7b696771\">\r\n\r\n### Expected behavior\r\n\r\nNo error.\r\n\r\n### System Info\r\n\r\n```Text\r\nAliyun OSS\r\n```\r\n\r\n### Additional context\r\n\r\n_No response_\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.",[3223],{"name":3174,"color":3175},3322,"Refresh some pages with error \"Hydration completed but contains mismatches.\" when deployed on Aliyun OSS.","2023-12-21T00:04:35Z","https://github.com/vuejs/vitepress/issues/3322",0.7202924,{"description":3230,"labels":3231,"number":3233,"owner":3155,"repository":3156,"state":3157,"title":3234,"updated_at":3235,"url":3236,"score":3237},"### Describe the bug\r\n\r\n之前我一直在使用 `vitepress: ^1.0.0-beta.5` 版本,近期升级最新版本之后发现 `withBase` 出现了问题,某些地方的 `withBase` 不生效了,当我回退到 `1.0.0-beta.5` 版本,`withBase` 表现恢复正常。查看版本更新记录发现并没有对 `withBase` 作出更改。\r\n\r\n### Reproduction\r\n\r\nhttps://github.com/peiyanlu/vite-press/blob/docs-deploy/docs/archive/components/DocTimeline.vue#L125\r\n\r\n### Expected behavior\r\n\r\n`withBase` 表现正常\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: Windows 11 10.0.26100\r\n CPU: (32) x64 13th Gen Intel(R) Core(TM) i9-13980HX\r\n Memory: 13.04 GB / 31.63 GB\r\n Binaries:\r\n Node: 16.20.0 - C:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.22 - C:\\Program Files\\nodejs\\yarn.CMD\r\n npm: 8.19.4 - C:\\Program Files\\nodejs\\npm.CMD\r\n pnpm: 9.4.0 - ~\\AppData\\Local\\pnpm\\pnpm.EXE\r\n Browsers:\r\n Edge: Chromium (126.0.2592.87)\r\n Internet Explorer: 11.0.26100.1\r\n npmPackages:\r\n vitepress: 1.3.0 => 1.3.0\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] 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.",[3232],{"name":3174,"color":3175},4034,"withBase 表现异常","2024-07-19T04:42:27Z","https://github.com/vuejs/vitepress/issues/4034",0.7215835,{"description":3239,"labels":3240,"number":3242,"owner":3155,"repository":3156,"state":3157,"title":3243,"updated_at":3244,"url":3245,"score":3246},"### 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.",[3241],{"name":3174,"color":3175},2209,"localSearch treat public dir as content","2023-04-20T00:03:59Z","https://github.com/vuejs/vitepress/issues/2209",0.7263103,["Reactive",3248],{},["Set"],["ShallowReactive",3251],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fjEOxbe8mKd--ixs3yn9KjCBTHrI1jJEmQV_mbX54ILk":-1},"/vuejs/vitepress/3318"]