[Share Experiences] hexo博客简单添加音乐插件
Tofloor
poster avatar
青稚
deepin
2023-05-10 19:43
Author

上个贴子教大家如何部署博客,有坛友说没有音乐播放器。

有两种方法可以插入,加到你要添加播放器的页面文件里面,也可以单独创建个页面专门放音乐播放器(可以置顶首页)

1.使用网易云音乐的生成外链(缺点有些因为版权保护无法生成)
Screenshot_20230510_120607.jpg
2.hexo-tag-aplayer会配置后真香,https://github.com/MoePlayer/hexo-tag-aplayer参考项目地址。

3.开始安装

4.执行npm install --save hexo-tag-aplayer

5.使用 MetingJS

6.修改非主题文件的 _config.yml

7.添加 # aplayer

aplayer:

meting: true

注意排序和其他配置文件对齐

之后打开页面文件插入

{% meting "60198" "netease" "playlist" "autoplay" "mutex:false" "listmaxheight:340px" "preload:none" "theme:#ad7a86"%}

60198代表音乐目录id或者音乐id

netease网易云音乐

音乐平台可以修改:tencent kugouxiami baidu

tencent为qq音乐。

Reply Favorite View the author
All Replies
阿尼樱奈奈
deepin
2023-05-10 19:53
#1

applaud

Reply View the author
‌量子巡游者
Moderator
2023-05-10 20:15
#2

like

Reply View the author
hanzn-zzx
deepin
2023-05-11 04:42
#3

like学习了

Reply View the author