\r\n~~~\r\n\r\nThe second case, Vitepress generates a target filename that is original source path with Base prepended. **But the filename is not the same as the Markdown-generated filename**. Also the image file is not added to the build.\r\n\r\nSame problem also happen to images referenced in frontmatter are also unprocessed by asset pipelines, e.g. HeroImage on the Home page.\r\n\r\nNew users of Vitepress are always confused about this --- e.g. see #505 and #301\r\n\r\n### Describe the solution you'd like\r\n\r\nOf course not every property or frontmatter string are assets, only some of them. \r\n\r\nHence the user should have a choice of which strings should be hashed and added to the asset pipeline.\r\n\r\nVitepress already provides a function \"withBase\" for customising URLs, but this is not enough for image assets. \r\n\r\nI would like to see user-callable functions that:\r\n- resolves the URL correctly in both Dev and Build cases\r\n- adds the file to the hash/build asset pipeline\r\n- and behaves correctly with the rest of Vite and Rollup \r\n\r\nThis will allow custom components to behave identically with Markdown, which is the original promise of Vitepress (i.e. \"every Markdown page is translated into a Vue SFC component\")\r\n\r\n### Describe alternatives you've considered\r\n\r\n1) The usual fallback of putting all images into \"public\" directory. Not an elegant solution.\r\n\r\n2) Defining path prefix constants in themeConfig. Does not resolve all user cases.\r\n\r\n3) Extending the Vite config to process extra directories. Two moving targets instead of one.\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] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],607,"My solution for custom components accessing relative assets -- Vite's static asset handling and enhanced Markdown hoisting","2023-01-21T16:04:03Z","https://github.com/vuejs/vitepress/issues/607",0.72011805,{"description":2926,"labels":2927,"number":2929,"owner":2869,"repository":2870,"state":2892,"title":2930,"updated_at":2931,"url":2932,"score":2933},"### Describe the bug\r\n\r\nWhen running `npx vitepress init` the default path is `./`. This can cause problems.\r\n\r\nAfter finishing installation and running to test the project is working I am greeted with this error.\r\n\r\n\r\n\r\n```bash\r\n[plugin:vite:vue] At least one \u003Ctemplate> or \u003Cscript> is required in a single file component.\r\n```\r\n\r\nResolving it was as simple as remaking the project, and changing the `vitepress` path to `./docs`.\r\n\r\n### Reproduction\r\n\r\nReproducing repository: https://github.com/drunkenvalley/vitepress-reprod\r\n\r\n1. Create vite project.\r\n```bash\r\n> npm create vite@latest\r\n√ Project name: ... vite-project\r\n√ Select a framework: » Vue\r\n√ Select a variant: » TypeScript\r\n\r\nScaffolding project in path/to/project...\r\n\r\nDone. Now run:\r\n\r\n cd vite-project\r\n npm install\r\n npm run dev\r\n```\r\n2. From project folder initialize `vitepress`\r\n```bash\r\n> npx vitepress init \r\n\r\n vitepress v1.0.0-alpha.66\r\n\r\n┌ Welcome to VitePress! \r\n│\r\n◇ Where should VitePress initialize the config?\r\n│ ./\r\n│\r\n◇ Site title:\r\n│ My Awesome Project\r\n│\r\n◇ Site description:\r\n│ A VitePress Site\r\n│\r\n◇ Theme:\r\n│ Default Theme\r\n│\r\n◇ Use TypeScript for config and theme files?\r\n│ Yes\r\n│\r\n◇ Add VitePress npm scripts to package.json?\r\n│ Yes\r\n│\r\n└ Done! Now run npm run docs:dev and start writing.\r\n```\r\n3. Run `npm i -D vitepress` and `npm install`\r\n4. Run `npm run docs:dev`\r\n\r\n### Expected behavior\r\n\r\nA default Vue project created with vite and the default vitepress settings should preferably be compatible out of the box. Alternatively, the *Getting Started* documentation should be a bit more explicit that an alternate path is not optional, but required, with an \"existing\" vite project.\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: Windows 10 10.0.19045\r\n CPU: (32) x64 AMD Ryzen 9 7950X 16-Core Processor\r\n Memory: 8.52 GB / 15.73 GB\r\n Binaries:\r\n Node: 16.18.1 - C:\\Program Files\\nodejs\\node.EXE\r\n npm: 8.19.2 - C:\\Program Files\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1266.0), Chromium (112.0.1722.46)\r\n Internet Explorer: 11.0.19041.1566\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.66 => 1.0.0-alpha.66\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nWhile not really an issue, it is a bit odd to not install `vitepress` when using the `npx vitepress init`.\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.dev).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2928],{"name":2866,"color":2867},2220,"Default `vitepress` project initialized in `vite` + `vue` throws exceptions","2023-08-15T00:04:15Z","https://github.com/vuejs/vitepress/issues/2220",0.72877246,{"description":2935,"labels":2936,"number":2940,"owner":2869,"repository":2870,"state":2892,"title":2941,"updated_at":2942,"url":2943,"score":2944},"### Describe the bug\n\nI upgrade to alpha52 then docs:build. Outline in page missing.\r\n\r\nI tried docs:dev, it goes well.\r\n\r\nIs it a bug?\n\n### Reproduction\n\nI upgrade to alpha52 then docs:build. Outline in page missing.\r\n\r\nI tried docs:dev, it is goes well.\r\n\r\nIs it a bug?\n\n### Expected behavior\n\ndocs:dev and docs:build should be the same.\n\n### System Info\n\n```shell\nWindows 11\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.",[2937],{"name":2938,"color":2939},"need more info","bdbefc",2072,"No outline generated after docs:build (Yes it is there when docs:dev) since alpha52","2023-03-21T00:04:10Z","https://github.com/vuejs/vitepress/issues/2072",0.73456854,{"description":2946,"labels":2947,"number":2949,"owner":2869,"repository":2870,"state":2892,"title":2950,"updated_at":2951,"url":2952,"score":2953},"### Describe the bug\r\n\r\nAfter I deploy VitePress to Nginx, refreshing the page will display both the content of the home page and the content of the current route, Why does this happen\r\n\r\n\r\nnginx configuration:\r\n~~~\r\nlocation /docs {\r\n alias /Users/wulianpu/Workplace/vitepress/docs/.vitepress/dist;\r\n try_files $uri $uri/ /docs/index.html;\r\n}\r\n",[2948],{"name":2889,"color":2890},2342,"Nginx deployment, refresh the browser page content display problem","2023-05-14T00:04:11Z","https://github.com/vuejs/vitepress/issues/2342",0.7433361,{"description":2955,"labels":2956,"number":2958,"owner":2869,"repository":2870,"state":2892,"title":2959,"updated_at":2960,"url":2961,"score":2962},"### Describe the bug\n\nThese two links should both load the same page, but the one with trailing slash returns 404.\r\n\r\nhttps://docs.celestia.org/developers/blobstream/\r\nhttps://docs.celestia.org/developers/blobstream\n\n### Reproduction\n\nhttps://docs.celestia.org/developers/blobstream/\r\nhttps://docs.celestia.org/developers/blobstream\n\n### Expected behavior\n\nBoth pages load https://docs.celestia.org/developers/blobstream\n\n### System Info\n\n```Text\nSystem:\r\n OS: macOS 14.0\r\n CPU: (10) arm64 Apple M1 Pro\r\n Memory: 80.42 MB / 16.00 GB\r\n Shell: 3.2.57 - /bin/bash\r\n Binaries:\r\n Node: 18.12.0 - ~/.nvm/versions/node/v18.12.0/bin/node\r\n Yarn: 1.22.19 - /opt/homebrew/bin/yarn\r\n npm: 8.19.2 - ~/.nvm/versions/node/v18.12.0/bin/npm\r\n pnpm: 7.13.1 - /opt/homebrew/bin/pnpm\r\n Browsers:\r\n Brave Browser: 117.1.58.135\r\n Chrome: 118.0.5993.88\r\n Safari: 17.0\r\n npmPackages:\r\n vitepress: 1.0.0-rc.24 => 1.0.0-rc.24\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.",[2957],{"name":2889,"color":2890},3134,"links with trailing slash do not load","2023-11-01T00:04:41Z","https://github.com/vuejs/vitepress/issues/3134",0.74668086,["Reactive",2964],{},["Set"],["ShallowReactive",2967],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fdvcOjiDSNSyO8gUMt-7MNA1-zrf7eeIp1vEUk0F8QAE":-1},"/vuejs/vitepress/100"]