首先确认根目录_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

相关文章:

  • 2021-12-23
  • 2021-04-09
  • 2021-05-31
  • 2022-01-14
  • 2021-12-23
  • 2022-12-23
  • 2022-01-02
  • 2021-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-23
  • 2021-11-01
  • 2021-11-06
  • 2018-02-07
  • 2021-12-23
  • 2021-12-23
相关资源
相似解决方案