vuepress
vuepress copied to clipboard
【vuepress】相对路径不添加"./"无法访问图片资源
Bug report
Steps to reproduce
图片资源和md文件存放同级目录assets下,通过assets/img.png无法访问,而通过./assets/img.png却能访问
What is expected?
图片访问同时支持assets/img.png相对路径方式访问
What is actually happening?
资源无法访问
Other relevant information
Environment Info:
System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
Binaries:
Node: 12.9.1 - D:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.10.2 - D:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: Not Found
Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.37)
npmPackages:
@vuepress/core: 1.9.7
@vuepress/theme-default: 1.9.7
vuepress: ^1.9.7 => 1.9.7
npmGlobalPackages:
vuepress: Not Found
assets/img.png will be resolved to the public directory, you can put them inside .vuepress/public and they will be copied to the root of the generated directory.
这样对于从其他平台迁移的博客是十分不友好的,可以考虑增加一个选项支持短路径模式