关于hexo butterfly 文章内容图片加载不出来问题
前言
网上说npm add hexo-asset-image 这个之后就可以在Md直接引用图片了,显然不行,还有一些博客引用的地址都不正确….。起初我还怀疑是我配置的环境有问题,摸索了一下OJBK了,废话不多说上图。
内容
新建hexo new post ‘’say your name’,在test文件夹中放入图片
接着我们添加hexo-asset-image
1 | npm add https://github.com/CodeFalling/hexo-asset-image, |
然后我们修改hexo-asset-image/index.js 文件中的第58代码 修改为图中内容。其原因可以自行打开 public/../index.html 验证
图片路径这么写: (./text/1.png)
完结撒花
1 | 今天把坑又踩了一遍,后续我发现原环境没npm add hexo-asset-image之前直接npm add https://github.com/CodeFalling/hexo-asset-image,根本不用修改index.html,图片路径这么写: (./text/1.png) 就行了 |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 FeiFei!
评论