How to show picture/music/video in Hexo
1. 图片插入
安装图片插件
1 | npm install hexo-asset-image --save |
配置文件_config.yml
将post_asset_folder设置为true
然后就可以直接引用了
1 | ![(添加图片描述)](AI.jpg) |
2. 音频插入
插入本地绝对路径音频
1 | <audio controls autoplay> |
插入音频url
1 | <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=430 height=86 src="//music.163.com/outchain/player?type=2&id=114389&auto=0&height=66"></iframe> |
3. 视频插入
插入本地绝对路径视频
1 | <video src='/local/video/oceans.mp4' type='video/mp4' controls='controls' width='100%' height='100%'> |
插入视频url
1 | <video src='http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4' type='video/mp4' controls='controls' width='100%' height='100%'> |