MoePlayer / hexo-tag-dplayer

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

css/js filepath error: hexo generate with plug-in hexo-tag-dplayer #23

Open leizh81 opened 6 years ago

leizh81 commented 6 years ago

查看了html发现hexo 生成的引用css/js路径是在./assets/..下面,然而文件目录里边并没有对应的assets folder,所以hexo generate以后webpage调用不了dplayer module。

这个问题应该是反馈在这里还是去hexo的板块呢?

dixyes commented 6 years ago

hexo g之后看看public文件夹有没有相关文件 如果有 那可以正常使用 如果没有 我又写bug了 提供具体信息我来找找问题在哪

leizh81 commented 6 years ago

这个是生成文件夹下面的内容:

pi@raspberrypi:~/Web/blog $ ls public/2018/04/25/dplayer-test-1/
1.mp4  index.html

这个是head里边相关的:

<meta name="description" content="(function(){var player = new DPlayer({&quot;container&quot;:document.getElementById(&quot;dplayer0&quot;),&quot;video&quot;:{&quot;url&quot;:&quot;/html/2018/04/25/dplayer-test-1/1.mp4&quot;}});window.dplayers||(window.dplayers=[]);window.dplayers.pu">
<link rel="stylesheet" type="text/css" href="/assets/css/DPlayer.min.css">
<script src="/assets/js/DPlayer.min.js"></script>

这个是body里边的

<div id="dplayer0" class="dplayer hexo-tag-dplayer-mark" style="margin-bottom: 20px;"></div><script>(function(){var player = new DPlayer({"container":document.getElementById("dplayer0"),"video":{"url":"/html/2018/04/25/dplayer-test-1/1.mp4"}});window.dplayers||(window.dplayers=[]);window.dplayers.push(player);})()</script>