MoePlayer / hexo-tag-dplayer

Embed dplayer in Hexo posts/pages
MIT License
207 stars 30 forks source link

css and js can not be loaded when blog is in a subdir #19

Closed CharlesLiu7 closed 6 years ago

CharlesLiu7 commented 6 years ago

TL;DR : you use the same logic to generate the DPlayer.min.js and find the DPlayer.min.js in stylesheet.

Details: I put my blog in a subdirectory, i.e. in `_config.yml

url: https://xxx.me
root: /blog/

And I set styleDir = '/blog/assets/css/', now it puts the DPlayer.min.js in 'https:xxx.me/blog/blog/assests/css/ and the stylesheet tries to find it https:xxx.me/blog/assests/css/. WRONG!

THX

dixyes commented 6 years ago

try this https://github.com/dixyes/hexo-tag-dplayer in commit 8031282974e78d6e9db324557c3c4be49cdbf0c7

CharlesLiu7 commented 6 years ago

THX