Hexo图片无法正常显示问题
关于hexo上图片无法正常显示的问题,有如下解决方法:
-
设置站点配置
_config.yml
:将
post_asset_folder: false
改为post_asset_folder: true
-
安装插件:
npm install https://github.com/CodeFalling/hexo-asset-image -- save
-
运行
hexo n "XXXXXX"
,生成XXXXX.md博文时就会在
/source/_posts
目录下生成XXXXXX的文件夹,将你想在XXXXX博文中插入的照片放置到这个同名文件夹中即可,图片的命名随意。 -
添加图片:
在想添加的位置写入
![](图片名字.图片格式)
,例如![](1.png)
。图片的路径和你写入的路径一致。