1、打开_config.yml配置文件,修改为 post_asset_folder: true。
2、hexo new “text”新建文件,此时在source/_posts文件夹中会生成text.md和text同名文件夹。
3、将所需图片文件放进text文件夹中。
4、接着执行命令下载图片插件,npm install https://github.com/CodeFalling/hexo-asset-image –save
注意不要使用下边的命令,npm install hexo-asset-image –save 会造成路径错误无法显示。
如果已经安装的话,输入命令npm list查找插件,npm uninstall hexo-asset-image@1.0.0删除这个插件。
5、图片链接如下:,在文章中引用即可。