\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.",[3156],{"name":3157,"color":3158},"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.67069894,{"description":3165,"labels":3166,"number":3167,"owner":3146,"repository":3147,"state":3148,"title":3168,"updated_at":3169,"url":3170,"score":3171},"\u003C!--\r\nNOTE:\r\nVitePress is still WIP, and it is not compatible with VuePress.\r\nPlease do not open issue about default theme missing features or something doesn't work like VuePress.\r\n-->\r\n\r\n**Describe the bug**\r\n`yarn docs:dev` renders home page on `http://localhost:3000` despite *base* is defined in *config.js*. But asset links honor the base path.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. follow *getting started* to create new site\r\n2. create file */docs/.vitepress/config.js* with base set to, say `/foo/`\r\n3. run `yarn docs:dev`\r\n\r\n**Expected behavior**\r\nSite should be rendered at `http://localhost:3000/foo/`\r\n\r\n**System Info**\r\n- vitepress version: 0.9.1\r\n- vite version: 1.0.0-rc.13\r\n- Node version: v14.5.0\r\n- OS version: Windows 10\r\n\r\n",[],181,"dev home page doesn't honor base config","2023-01-21T16:23:59Z","https://github.com/vuejs/vitepress/issues/181",0.6784538,{"description":3173,"labels":3174,"number":1029,"owner":3146,"repository":3147,"state":3148,"title":3175,"updated_at":3176,"url":3177,"score":3178},"\r\n```\r\n├──.vitepress\r\n│ ├──dist\r\n│ │ ├──_assets\r\n│ │ │ ├──app.b8eb737b.js\r\n│ │ │ ├──common-40001381.js\r\n│ │ │ ├──index.md.9d20daf2.js\r\n│ │ │ ├──index.md.9d20daf2.lean.js\r\n│ │ │ └──style.34674f41.css\r\n│ ├──theme\r\n│ │ ├──index.js\r\n│ │ └──Layout.vue\r\n├──index.md\r\n├──package-lock.json\r\n└──package.json\r\n```\r\nWrite according to the document when executing `npx vitepress build`\r\n\r\nbuild error:\r\n ReferenceError: __DEV__ is not defined\r\n at createApp (C:\\Users\\lizhongyao\\Desktop\\vitepress\\node_modules\\vitepress\\dist\\client\\app\\temp\\app.js:433:17)\r\n at Object.renderPage (C:\\Users\\lizhongyao\\Desktop\\vitepress\\node_modules\\vitepress\\dist\\node\\build\\render.js:12:29)\r\n at Object.build (C:\\Users\\lizhongyao\\Desktop\\vitepress\\node_modules\\vitepress\\dist\\node\\build\\build.js:24:28)\r\n",[],"0.3.0build error","2023-01-21T16:25:41Z","https://github.com/vuejs/vitepress/issues/21",0.68503267,{"description":3180,"labels":3181,"number":3188,"owner":3146,"repository":3147,"state":3148,"title":3189,"updated_at":3190,"url":3191,"score":3192},"### Describe the bug\n\nWhen you define a link to an image in frontmatter or in config.js, the file is note copy in the dist folder, whereas for a link in the markdown file directly it works, also when you define a public folder with your pictures it copy the content of the folder directly in dist folder and not in a public folder in dist folder. \n\n### Reproduction\n\nat this in a makdown file that represents the home page :\r\nfeatures:\r\n - icon: \r\n src: /public/compiler.png\r\ncreate a public folder in docs with the image\r\n\r\nand build the project\r\n\r\n\n\n### Expected behavior\n\nit will be preferable if the content of public folder will be copy in a dist/public folder, because here you can just enter :\r\nfeatures:\r\n - icon: \r\n src: compiler.png\r\n\r\nbut it is not very clear\n\n### System Info\n\n```sh\nnpm run docs:build\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.",[3182,3185],{"name":3183,"color":3184},"bug: pending triage","e99695",{"name":3186,"color":3187},"stale","ededed",2422,"No inclusion of assets in frontmatter of markdown file and js config","2023-08-11T00:04:07Z","https://github.com/vuejs/vitepress/issues/2422",0.6891733,{"description":3194,"labels":3195,"number":3197,"owner":3146,"repository":3147,"state":3148,"title":3198,"updated_at":3199,"url":3200,"score":3201},"### Describe the bug\n\njust like title decribe,\r\nin vit.config.js i just set ssr option`noExternal: ['packages']`, base option does not work in product. In builded html file the js assets path is '/assets/jsfile.js' which should be `/docs/assets/jsfile.js`. And if i use --base='/docs/' the res path will add base url but when i put it on my server it dont work and shows `Hydration completed but contains mismatch` in my console\n\n### Reproduction\n\nidk, it huge project, monorepo\n\n### Expected behavior\n\nlike dev when i put it in nginx\n\n### System Info\n\n```Text\nvitpress 1.2.3\r\npnpm: 9.4.0\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.",[3196],{"name":3157,"color":3158},3984,"base option dont work in build in vite.config.js, if use in commend line like '--base=./' Hydration completed but contains mismatch","2024-07-04T04:41:53Z","https://github.com/vuejs/vitepress/issues/3984",0.69029784,{"description":3203,"labels":3204,"number":3206,"owner":3146,"repository":3147,"state":3148,"title":3207,"updated_at":3208,"url":3209,"score":3210},"**Describe the bug**\r\n\r\nSee https://github.com/songololo/vitepress-debug for reproduction of this issue:\r\n\r\nRun a dev server: `yarn docs:dev`.\r\n\r\nNote that the base-path `/my-base-path/` is set in the config at `.vitepress/config.js`.\r\n\r\nThe base path works for root files, i.e. `index.md` is served from `/my-base-path/`.\r\n\r\nHowever, the base path is missing for nested files, i.e. `content/index.md` is served from `/content/` and `content/hello.md` is served from `/content/hello.html`.\r\n\r\nThis doesn't break things in development mode because the links are also missing the base path.\r\n\r\nHowever, it breaks things in production because the links are missing the base path.\r\n\r\n**System Info**\r\n- vitepress 0.12.2\r\n- vite/2.0.4\r\n- darwin-x64\r\n- node-v15.8.0\r\n\r\nThis happens for both my local system and for a github actions build.",[3205],{"name":3183,"color":3184},252,"Base paths (and links) not generating correctly for nested pages.","2023-01-21T16:20:10Z","https://github.com/vuejs/vitepress/issues/252",0.69220847,{"description":3212,"labels":3213,"number":3215,"owner":3146,"repository":3147,"state":3148,"title":3216,"updated_at":3217,"url":3218,"score":3219},"### Describe the bug\n\nImage wasn't inlined, see https://stackblitz.com/edit/vite-upxxuh?file=package.json,vite.config.ts:\r\n\r\n\u003Cimg width=\"1919\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/3367820/7ab7ef71-c29e-4a24-9f96-36d06441e7b9\">\r\n\n\n### Reproduction\n\nsee https://stackblitz.com/edit/vite-upxxuh?file=package.json,vite.config.ts:\r\n\r\n\u003Cimg width=\"1919\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/3367820/7ab7ef71-c29e-4a24-9f96-36d06441e7b9\">\n\n### Expected behavior\n\nthe image should be base64 inlined according to https://vitepress.dev/guide/asset-handling#referencing-static-assets\n\n### System Info\n\n```Text\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: 18.18.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.10.5 - /usr/local/bin/pnpm\r\n npmPackages:\r\n vitepress: v1.0.0-beta.7 => 1.0.0-beta.7\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.",[3214],{"name":3183,"color":3184},3370,"assets Inline doesn't work?","2023-12-30T00:04:35Z","https://github.com/vuejs/vitepress/issues/3370",0.69315827,{"description":3221,"labels":3222,"number":3226,"owner":3146,"repository":3147,"state":3148,"title":3227,"updated_at":3228,"url":3229,"score":3230},"### Describe the bug\r\n\r\nUsing the newly released `v1.0.0-alpha.41` results in my browser URL being re-written to the root when previewing the Vitepress site with a configured `base`:\r\n\r\n```js\r\nexport default {\r\n title: 'API Docs',\r\n description: 'My API Docs',\r\n base: '/docs/',\r\n}\r\n```\r\n\r\n### Resolution\r\n\r\nDowngrading to `v1.0.0-alpha.40` resolves this issue. No redirect/URL rewrite occurs.\r\n\r\nI suspect it's due to this new feature: https://github.com/vuejs/vitepress/pull/1798\r\n\r\n### Reproduction\r\n\r\n1. Create a new Vitepress site\r\n2. Set the `base` configuration option to `/docs/`\r\n3. Run `yarn docs:build`\r\n4. Run `yarn docs:preview`\r\n5. Navigate to the served site\r\n6. Notice how the URL is rewritten to the root host, and `/docs/` is removed from the URL\r\n\r\n### Expected behavior\r\n\r\nThe URL should not be rewritten to the root host. `/docs/` should be preserved.\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: macOS 13.2\r\n CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz\r\n Memory: 98.54 MB / 16.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.17.1 - ~/.nvm/versions/node/v16.17.1/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 8.15.0 - ~/.nvm/versions/node/v16.17.1/bin/npm\r\n Browsers:\r\n Chrome: 109.0.5414.119\r\n Firefox: 100.0.2\r\n Safari: 16.3\r\n npmPackages:\r\n vitepress: 1.0.0-alpha.40 => 1.0.0-alpha.40 \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.",[3223],{"name":3224,"color":3225},"build","377ba8",1857,"v1.0.0-alpha.41 breaks `base` config option -- URL always rewrites to root","2023-02-06T00:04:30Z","https://github.com/vuejs/vitepress/issues/1857",0.69338244,{"description":3232,"labels":3233,"number":3234,"owner":3146,"repository":3147,"state":3148,"title":3235,"updated_at":3236,"url":3237,"score":3238},"### Describe the bug\n\nI want to use `VitePress` to build a blog, I want to find current post base on route, so i have below code:\r\n```\r\n\tfunction findCurrentIndex() {\r\n\t\t\r\n\t\tconst result = posts.findIndex((p) => p.url.includes(route.path))\r\n\t\tif (result === -1) console.error(`blog post missing: ${route.path}`)\r\n\t\treturn result\r\n\t}\r\n\r\n```\r\nthis works fine, when we do not enable rewrites or set `base` configuration, because url of post comes from `createContentLoader` do not add `base` or prefix, so I wrap the url with `withBase` in many places, could anyone explain why `createContentLoader ` not return the 'correct' url base on site configuration or rewrites rules? \r\nI add `withBase` inside loader as well, but It doesn't work\r\n```\r\nexport default createContentLoader(pattern, {\r\n\texcerpt: '\u003C!--more-->',\r\n\ttransform(raw): Post[] {\r\n\t\treturn raw\r\n\t\t\t.map(({ url, frontmatter, excerpt }) => ({\r\n\t\t\t\ttitle: frontmatter.title,\r\n\t\t\t\tcategories: frontmatter?.categories ?? [],\r\n\t\t\t\tdescription: excerpt,\r\n\t\t\t\ttags: frontmatter.tags ?? [],\r\n\t\t\t\turl: withBase(url), // in here will got error message: does not provide an export named 'withBase'\r\n\t\t\t\texcerpt,\r\n\t\t\t\tdate: formatDate(frontmatter.date),\r\n\t\t\t}))\r\n\t\t\t.sort((a, b) => b.date.time - a.date.time)\r\n\t},\r\n})\r\n```\n\n### Reproduction\n\nas describe\n\n### Expected behavior\n\ncreateContentLoader return correct url\n\n### System Info\n\n```Text\nSystem:\r\n OS: Windows 10 10.0.22621\r\n CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz\r\n Memory: 19.90 GB / 31.96 GB\r\n Binaries:\r\n Node: 18.17.1 - C:\\Program Files\\nodejs\\node.EXE\r\n npm: 9.6.7 - C:\\Program Files\\nodejs\\npm.CMD\r\n pnpm: 8.7.4 - ~\\AppData\\Roaming\\npm\\pnpm.CMD\r\n Browsers:\r\n Edge: Chromium (117.0.2045.60)\r\n Internet Explorer: 11.0.22621.1\r\n npmPackages:\r\n vitepress: 1.0.0-rc.20 => 1.0.0-rc.20\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.",[],3063,"createContentLoader do not return correct url of post","2023-10-24T00:04:13Z","https://github.com/vuejs/vitepress/issues/3063",0.69427794,["Reactive",3240],{},["Set"],["ShallowReactive",3243],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f6JTi6AqEjjGsb6S3396kHbA59lf3b0sSaLga4QR3_eY":-1},"/vuejs/vitepress/3239"]