配置插件
1 | npm install hexo-tag-aplayer --save |
插件 Github 仓库:
修改 Hexo 根目录配置文件 _config.yml
1 | aplayer: |
以下引用插件作者说明:
Now you can use in your post:
1 | <!-- Simple example (id, server, type) --> |
The options are shown below:
| Option | Default | Description |
|---|---|---|
| id | required | song id / playlist id / album id / search keyword |
| server | required | Music platform: netease, tencent, kugou, xiami, baidu |
| type | required | song, playlist, album, search, artist |
| fixed | false |
Enable fixed mode |
| mini | false |
Enable mini mode |
| loop | all |
Player loop play, values: ‘all’, ‘one’, ‘none’ |
| order | list |
Player play order, values: ‘list’, ‘random’ |
| volume | 0.7 | Default volume, notice that player will remember user setting, default volume will not work after user set volume themselves |
| lrctype | 0 | Lyric type |
| listfolded | false |
Indicate whether list should folded at first |
| autoplay | false |
Autoplay song(s), not supported by mobile browsers |
| mutex | true |
Pause other players when this player playing |
| listmaxheight | 340px |
Max height of play list |
| preload | auto |
The way to load music, can be none, metadata, auto |
| storagename | metingjs |
LocalStorage key that store player setting |
| theme | #ad7a86 |
Theme color |
Read section customization to learn how to configure self-host meting api server in hexo-tag-aplayer and other configuration.