解决官方hexo-asset-image
插件,在同时使用hexo-abbrlink
时,会导致图片路径错误。
-
配置
_config.yml
配置文件中设置post_asset_folder: true
-
添加依赖
npm install https://github.com/chenzd123456/hexo-asset-image-master.git --save npm install hexo-abbrlink --save
-
指定文章链接
root: / permalink: ":year:month:day/:abbrlink.html" pretty_urls: trailing_index: true # Set to false to remove trailing 'index.html' from permalinks, dont be false, vercel will miss the page trailing_html: true # Set to false to remove trailing '.html' from permalinks, dont be false, vercel will miss the page abbrlink: alg: crc32 # 算法:crc16(default) and crc32 rep: hex # 进制:dec(default) and hex
-
目录结构
test ├── logo.jpg └── rules.jpg test.md
-
markdown中的用法,在typora中也能查看图片
![logo](test/logo.jpg)