下载插件

  • 进入你博客的根目录,右键单击, 然后选择 git bash here 打开 git bash.
  • 键入命令 npm install hexo-asset-image --save

修改插件

  • 进入博客的根目录,然后下面顺序找到index.js:
    node_modules –> hexo-asset-image –> index.js
  • 用VS Code 或者 记事本打开 index.js
  • 在第 58 行,可以找到这么一行代码:
1
$(this).attr('src', config.root + link + src);
  • 把这一行代码改成下面这样
1
$(this).attr('src', src);
  • 保存文件