首先自己的hexo
版本如下:
1 | hexo -v |
问题:本地图片上传到文章同名文件夹下,而 .html
中图片引用相对链接并没有被转换为绝对路径,也就是说插件并没有工作。
解决:在 hexo
创建的博客文件夹下安装插件以及依赖。
在此过程中发现,实际上将本地图片拷贝到 public
文件夹下的操作是由 config
中的post_asset_folder
控制的,需要把选项置为true
。
而我把自己的permalink
修改为了permalink: :category/:post_title/
,这样的话,相对路径转换为绝对路径时出现问题,字符串拆分错误,具体解决参考链接:https://nobige.cn/post/20190605-hexo-asset-imageFix/。
至此问题解决。