实现目标
在hexo博客中,插入视频文件
实现过程
- 安装插件
hexo-tag-dplayer
npm install hexo-tag-dplayer --save
- 配置 dplayer
在文章中插入dplayer代码块,如下
<!-- 视频 -->
<div style="display: flex;justify-content:center;">
<div style="height:auto;width:80%">
{% dplayer
"url=https://media.w3.org/2010/05/sintel/trailer.mp4"
"pic=image.png"
"addition=https://s-sh-17-dplayercdn.oss.dogecdn.com/1678963.json"
"loop=yes"
"theme=#FADFA3"
"autoplay=autoplay" %}
</div>
</div>
效果如下:
更多配置,请参考官网:https://github.com/MoePlayer/hexo-tag-dplayer
转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。