1、通过网易云网站引入外链HTML代码:


如图所示,复制当中的HTML代码即可。

效果如下:

1
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=100% height=86 src="//music.163.com/outchain/player?type=2&id=1346281717&auto=1&height=66"></iframe>

2、通过B站来引入外链HTML代码:


如图所示,复制当中的HTML代码即可。

效果如下:

3、通过Hexo的插件来引用音乐:

通过npm来安装两个插件:

1
2
3
4

$ npm install hexo-tag-aplayer --save

$ npm install hexo-tag-dplayer --save

第一种:meting后面根歌单id。

例如 :https://music.163.com/playlist?id=523845661&userid=46562117 ,这个歌

单的id就是523845661,公司名可以是tencent、netease或是其他公司。

  • 最新版的 hexo-tag-aplayer 已经支持了MetingJS的使用,可以直接解析网络平台的歌曲,在站点配置文件_config.yml中将aplayer的meting属性开启。
1
2
3

aplayer:
meting: true
1
{% meting "523845661" "netease" "playlist" "theme:#FF4081" "mode:circulation" "mutex:true" "listmaxheight:340px" "preload:auto" %}

第二种:写上名字,歌手,链接地址即可。

1
{% aplayer "她的睫毛" "周杰伦" "https://home.ustc.edu.cn/~mmmwhy/%d6%dc%bd%dc%c2%d7%20-%20%cb%fd%b5%c4%bd%de%c3%ab.mp3"  "http://home.ustc.edu.cn/~mmmwhy/jay.jpg" "autoplay=false" %}

        

通过meting 和 aplayer 的引用,无法同时使用,都在的时候,只能加载meting!

4、通过Hexo的插件来引用视频:

效果如下:

1
2

{% dplayer "url=http://home.ustc.edu.cn/~mmmwhy/GEM.mp4" "pic=http://home.ustc.edu.cn/~mmmwhy/GEM.jpg" "loop=yes" "theme=#FADFA3" "autoplay=false" "token=tokendemo" %}