SoundCloud on Hexo

2018-01-23

hexo-soundcloud is a simple Hexo plugin that allows you to embed SoundCloud in your webpage.
We can get it via npm command:

1
2
#添加插件
npm install hexo-soundcloud --save

And then, add the plugin into _config.yml:

1
2
3
#将插件添加到_config.yml文件中
plugins:
hexo-soundcloud

After that, you could add a tag to your post:

1
2
#使用markdownt添加插件
{% soundcloud soundcloud_url %}

However, I found that hexo-soudcl didn’t provide function to autoplay the music after opening a new webpage when I was writing my blog.
If you are going to make it autoplay the music, you would have to configure it manually.
The plugin is the folder:
/blog/node_modules/hexo-soundcloud

In
/blog/node_modules/hexo-soundcloud/dist/hexo-soundcloud.js /blog/node_modules/hexo-soundcloud/dist/hexo-soundcloud.min.js /blog/node_modules/hexo-soundcloud/src/hexo-soundcloud.coffee
find a variable namely auto_play and change its value to true.

hexo的源码在上面的路径中,相应修改三个文件中auto_play的值即可实现自动播放
如果要更丰富的功能…那只能自己改插件源码

Do remember to save these changes and regenerate statistic files, and then you can see those modifications work.

Storm Inside

..-. . -.