0.0.4 • Published 5 years ago
hexo-asset-image-cdn v0.0.4
hexo-asset-image-fix
Fork hexo-asset-image,fixed an issue where the image path did not use the root path in the hexo configuration, and give an option to use jsDelivr as your Pic-Bed.
Give asset image in hexo a absolutely path automatically.
Usege
npm install hexo-asset-image-cdn --save
Config
Paste the following configuration into the _config.yml
of Hexo, and customized yourself.
post_asset_cdn:
enable: # boolean & lower case
prefix: # url ends without '/'
Example
post_asset_cdn:
enable: true
prefix: //cdn.jsdelivr.net/gh/muxq99/muxq99.github.io@latest
Make sure markdown files and asset folder are placed as follows:
macbook-unbox
├── macbook-a.jpg
├── macbook-b.jpeg
├── macbook-c.png
├── macbook-d.bmp
└── apple-logo.webp
macbook-unbox.md
Make sure post_asset_folder: true
in your _config.yml
.
Just use 
or <<img src="macbook-unbox/apple-logo.webp" alt="Apple Logo" />>
to insert apple-logo.webp
.