title: 如何在博客网站hexo的文章中添加图片
date: 2021-08-12 04:24:33
tags: hexo 添加图片
1.安装插件
npm install hexo-asset-image --save
2.需要配置文件
在博客的根目录的配置文件_config.yml中,添加post_asset_folder: true
3.新建文章
hexo new post newArticle
随即在source/_posts下就会产生和文章名字一样的目录newArticle,此为新创建文章的图片存储目录;
4.引用图片
在文章中使用如下语句,引用目录里的图片:

END