hexo中图片无法加载
配置开关
首先确认根目录_config.yml中有:
1
|
post_asset_folder: true
—|—
安装工具
然后在blog/下执行
1
|
npm install https://github.com/CodeFalling/hexo-asset-image --save
—|—
创建同名的图片目录
确保在blog/source/_posts下创建和md文件同名的目录,在里面放该md需要的图片,然后在md中插入
1
|

—|—
修改md文件
在md文件中插入图片时只需写
1
|

—|—
配置生效
配置完成之后,执行下列操作
1
2
3
|
$ hexo c
$ hexo g
$ hexo s
—|—
https://linuxops.dev/2021/01/26/hexo%E4%B8%AD%E5%9B%BE%E7%89%87%E6%97%A0%E6%B3%95%E5%8A%A0%E8%BD%BD/
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.