hexo中图片无法加载

首先确认根目录_config.yml中有:

post_asset_folder: true

然后在blog/下执行

npm install https://github.com/CodeFalling/hexo-asset-image --save

确保在blog/source/_posts下创建和md文件同名的目录,在里面放该md需要的图片,然后在md中插入

![](目录名/文件名.png)

在md文件中插入图片时只需写

![](post1/pic1.png)

配置完成之后,执行下列操作

$ hexo c
$ hexo g
$ hexo s

猜你喜欢

转载自www.cnblogs.com/codecheng99/p/12380799.html
今日推荐