hexo-douban-music

Generate douban pages of music for Hexo.

Usage no npm install needed!

<script type="module">
  import hexoDoubanMusic from 'https://cdn.skypack.dev/hexo-douban-music';
</script>

README

hexo-douban-music

Travis (.org) GitHub Depfu node (scoped with tag, custom registry)

This plugin is heavily inspired by hexo-douban, which generates douban movies, books and games page for hexo.

This package is published at npm

Install

go to the root folder of your hexo blog(contains \themes, index.html, \node_modules, etc.).

unix/linux terminal run

$ npm install hexo-douban-music

Configuration

open root _config.yml

add

douban_music:
  user: your-douban-username
  builtin: false #builtin means generate the douban page automatically when `$ hexo generate` command is running
  music:
    title: 'Music' #customizable
    quote: 'your quote goes there' #customizable
  timeout: 10000 #optional

Generate

if builtin

$ hexo g -d

if not builtin

$ hexo douban
$ hexo deploy

Finally a page http://xxx.your-site.xxx/music will be generated.

Menu

To add this page to the menu, add this code to the root _config.yml file:

menu:
  Home: /
  Archives: /archives
  Music: /music   #This is your music page

Demo

Demo: http://blog.zhuangliu.info/music

Future Work

There is a bug, when we open the music page on Safari, every cover of album never show up but blue question mark boxes, it is caused by 403 forbidden error. To fix this, you should go to directory /your-blog-folder/public/music/ and open index.html file, then add <meta name="referrer" content="no-referrer" /> to the <head></head> block. Finally run hexo deploy on terminal, images will show properly. I know it's inconvenient to do it every time. So I'm trying to make this process automatically.