Embed APlayer(https://github.com/DIYgod/APlayer) in Hexo posts/pages.
npm install --save hexo-tag-aplayer
no lrc
{% aplayer title author url [picture_url, narrow, autoplay] %}
yes lrc
{% aplayerlrc "title" "author" "url" "autoplay" %}
[00:00.00]lrc here
{% endaplayerlrc %}
Hexo has an issue that cannot use space within tag arguments.
If you encounter this problem, install the latest (beta) version, and wrap the arguments within a string literal, for example: no lrc {% aplayer "Caffeine" "Jeff Williams" "caffeine.mp3" "autoplay" %} yes lrc {% aplayerlrc "Caffeine" "Jeff Williams" "caffeine.mp3" "autoplay" %} [00:00.00]lrc here {% endaplayerlrc %}
You can modify variables scriptDir
(default: "/assets/js/" ) and styleDir
(default: "/assets/css/") in index.js
according to your blog's directory structure.
- More options(e.g. autoplay, narrow)
- Display lyrics
- Fix issue cannot use space within arguments
- Publish it to the hexo plugin list and npm
MIT