Hexo笔记之添加网易云音乐

站点根目录:就是你创建的blog文件夹目录,我的是daiyongtao.github.io。

主题目录:/theme/next。

生成外链

登录web端,随便找首歌.png

复制html代码.png

最终样式.png

设置

找到 主题目录下layout/_custom/sidebar.swig。

粘贴刚刚的那段html代码,如下所示

1
2
3
4
<div id="music163player">
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=450567505&auto=1&height=66">
</iframe>
</div>

hexo -g重新部署后,hero -server启动本地服务,打开http://localhost:4000/,在侧栏就能看到播放器了。

坚持原创技术分享,您的支持将鼓励我继续创作!