1、打開(kāi)網(wǎng)易云音樂(lè)首頁(yè),復(fù)制選擇的背景音樂(lè)分享外鏈
2、引入播放器代碼
????在themes/yilia/layout/_partial/left-col.ejs文件nav標(biāo)簽中添加代碼
注:放在
<nav>和</nav>之內(nèi)
????筆者添加了一些判斷和表達(dá)式
<!-- 網(wǎng)易云音樂(lè)插件 -->
<% if (theme.music && theme.music.enable){ %>
<div style="position:absolute; bottom:120px left:auto; width:85%">
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="240" height="52" src="http://music.163.com/outchain/player?type=2&id=<%=theme.music.id||1334445174%>&auto=<%=theme.music.autoplay?1:0%>&height=32"></iframe>
</div>
<% } %>

3、在yilia主題配置文件中添加屬性
# 網(wǎng)易云音樂(lè)插件
music:
enable: true
#id: 1332647902 # 網(wǎng)易云分享的ID
autoplay: true # 是否開(kāi)啟自動(dòng)播放