\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.704003,{"description":2941,"labels":2942,"number":2943,"owner":2875,"repository":2876,"state":2897,"title":2944,"updated_at":2945,"url":2946,"score":2947},"### Is your feature request related to a problem? Please describe.\n\nLet's say we got a folder structure like this:\r\n\r\n\r\n└─ foo\r\n ├─ 1.0.0.md\r\n ├─ 2.0.0.md\r\n └─ 3.0.0.md\r\n\r\nRight now we would have routes like:\r\n `/foo/1.0.0.html`\r\n `/foo/2.0.0.html`\r\n `/foo/3.0.0.html`\r\n\r\nI'd like to also have a route or alias like the following: `/foo/latest` which will point to the latest version (this can all be determined on build time by looking at the file, I already have a function that gives me the latest \"route\", in this case `/foo/3.0.0.html`.\r\n\r\nHow can I make this `/foo/latest` route exist and be an alias to the one I wanted?\n\n### Describe the solution you'd like\n\nAllow us to define route aliases or redirects\n\n### Describe alternatives you've considered\n\nI've tried with rewrites but that allowed me to make the latest version redirected to /latest instead. I want the reverse.\n\n### Additional context\n\nIf this is not something you think vitepress should have because it's not SSG friendly (there is no latest.html file) then I understand.\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] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],2922,"Route Alias or Redirect","2023-09-16T00:04:02Z","https://github.com/vuejs/vitepress/issues/2922",0.7040428,{"description":2949,"labels":2950,"number":2954,"owner":2875,"repository":2876,"state":2897,"title":2955,"updated_at":2956,"url":2957,"score":2958},"### Describe the bug\n\ncode-group is used, but it does not work\r\n\n\n### Reproduction\n\nI used **stackblitz**\r\n\r\nhttps://stackblitz.com/edit/vite-r6wzwe?file=docs/example.md\n\n### Expected behavior\n\nTabs should be switched.\n\n### System Info\n\n```shell\nstackblitz online\n```\n\n\n### Additional context\n\n\r\n\r\n\r\nThe ID is always created the same.\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\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.",[2951],{"name":2952,"color":2953},"upstream","BF29ED",1981,"code-group does not work","2023-03-23T00:04:22Z","https://github.com/vuejs/vitepress/issues/1981",0.7051393,{"description":2960,"labels":2961,"number":2963,"owner":2875,"repository":2876,"state":2897,"title":2964,"updated_at":2965,"url":2966,"score":2967},"### Describe the bug\n\nAfter build in MPA mode, the woff2 file aren't copy to assets dir, but style.xxx.css used it.\n\n### Reproduction\n\nany md file\n\n### Expected behavior\n\nIn MPA file, the woff2 file can be copied to assets dir\n\n### System Info\n\n```shell\nwindows vitepress@1.0.0-alpha.60\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.",[2962],{"name":2906,"color":2907},2094,"Missing woff2 file in MPA mode","2023-03-24T00:04:12Z","https://github.com/vuejs/vitepress/issues/2094",0.70721567,["Reactive",2969],{},["Set"],["ShallowReactive",2972],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$forumRIjgKmt6A7_BNmCTLytS2CCWMVQrj_gOiVWzoZY":-1},"/vuejs/vitepress/2068"]