0.0
No release in over 3 years
Low commit activity in last 3 years
HTML5-flavored aplayer plugin for Jekyll
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 12.0
~> 3.0

Runtime

>= 3.0, < 5.0
~> 1.2, >= 1.2.1
~> 1.2, >= 1.2.1
~> 3.0
~> 1.0, >= 1.0.2
 Project Readme

[Developing...]

jekyll-aplayer

Embed aplayer in Jekyll posts/pages

Table of Contents

...

Requirements

  • Ruby >= 2.3.0

Installation

Add jekyll-aplayer plugin in your site's Gemfile, and run bundle install.

gem 'jekyll-aplayer'

Add jekyll-aplayer to the plugins: section in your site's _config.yml

plugins:
  - jekyll-aplayer

Configuration

This plugin runs with the following configuration options by default.

Alternative settings for these options can be explicitly specified in the configuration file _config.yml.

You can check the Aplayer Docs to know how to use them.

# Where things are
jekyll-aplayer:
  # default use 'default' processor
  processor: 'default' # 'netease'
  assets:
    css:
      - //unpkg.com/aplayer/dist/APlayer.min.css
    js:
      - //unpkg.com/aplayer/dist/APlayer.min.js
  class: 'jekyll-aplayer'
  fixed: false
  mini: false
  autoplay: false
  theme: '#b7daff'
  loop: 'all'
  order: 'random'
  preload: 'auto'
  volume: 0.7
  # audio:
  #   -
  #     name: 'name1',
  #     artist: 'artist1',
  #     url: 'url1.mp3',
  #     cover: 'cover1.jpg',
  #     lrc: 'lrc1.lrc',
  #     theme: '#ebd0c2'
  #   -
  #     name: 'name2',
  #     artist: 'artist2',
  #     url: 'url2.mp3',
  #     cover: 'cover2.jpg',
  #     lrc: 'lrc2.lrc',
  #     theme: '#46718b'
  audio: []
  mutex: true
  lrcType: 3
  listFolded: false
  listMaxHeight: 90
  storageName: 'aplayer-setting'

Usage

Markdown

default

```aplayer
{
  "processor": "default",
  // "id": "aplayer1", # Of course, you can set id byself, but i suggest not do it, because it will generate automatically.
  "fixed": true,
  "mini": false,
  "audio": [
    {
      "name": "Hahah",
      "artist": "artist",
      "url": "/audios/hikarunara.mp3",
      "cover": "/img/cover/hikarunara.jpg"
    }
  ]
}
```

netease (NeteaseMusic)

```aplayer
{
  "processor": "netease",
  ...
}
```

Html

default

<!-- Of course, you can set id byself, but i suggest not do it, because it will generate automatically. -->
<aplayer id="aplayer1" processor="default" fixed="true" mini="false" audio="[{ 'name': 'Hahah', 'artist': 'artist', 'url': '/audios/hikarunara.mp3', 'cover': '/img/cover/hikarunara.jpg' }]"></aplayer>

netease (NeteaseMusic)

<aplayer id="aplayer1" processor="netease" ...></aplayer>

Credits

  • Jekyll - A blog-aware static site generator in Ruby.
  • APlayer - Wow, such a lovely HTML5 music player
  • Jekyll Spaceship - A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.

Contributing

Issues and Pull Requests are greatly appreciated. If you've never contributed to an open source project before I'm more than happy to walk you through how to create a pull request.

You can start by opening an issue describing the problem that you're looking to resolve and we'll go from there.

License

This software is licensed under the MIT license © Oscaner Miao.