hexo-client icon indicating copy to clipboard operation
hexo-client copied to clipboard

博客部署在子文件夹下,图片不能正常渲染。

Open mapxn opened this issue 4 years ago • 1 comments

如果hexo部署在子目录下时,图片显示异常。 希望能加一个选项,可以自定义选择子目录 hexo的_config.yml配置如下 :

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://mapan.tech/cn
root: /cn/
permalink: :abbrlink.html
permalink_defaults:

这样配置插入的图片,渲染后的路径少了cn/


期望的图片路径:

<img src="/cn/images/2020/05/17/f20f6714-b946-4bcd-a2b4-d4a6e962230d.png" alt="image.png">

实际上的路径:

<img src="/images/2020/05/17/f20f6714-b946-4bcd-a2b4-d4a6e962230d.png" alt="image.png">```

mapxn avatar May 17 '20 02:05 mapxn

或者可以实现hexo-asset-image类似的效果,把每一篇文章的图片单独放在tittle同名文件夹内。

mapxn avatar May 17 '20 02:05 mapxn