测试下hexo插入图片。
设置步骤:
- 在hexo的_config.yml文件中的配置项“post_asset_folder”设置为true
- 使用hexo new [my_post_name]命令创建新的文章时,在source/_post目录下就会出现一个文件和一个目录:
- my_post_name.md
- my_post_name目录
- 将要插入的图片放置到my_post_name目录下
- 在文章中使用以下的方式来插入图片即可:
1 |  |
例如:
1 |  |
显示出来就是下面的这个样子:
需要说明的是,这种方式插入的图片无法在首页中显示,只能在文章内容中显示。