D0n9X1n / hexo-tag-cloud

Yet, just another tag cloud plugin for hexo.
https://www.npmjs.com/package/hexo-tag-cloud
MIT License
149 stars 27 forks source link

部署后没有显示内容 #38

Closed drowning-in-codes closed 1 year ago

drowning-in-codes commented 1 year ago

作者好,感谢做出这个优秀的插件.但是我现在遇到了一点问题 我看了#7 但还是存在一些问题 .deploy_git文件夹下也有js/tagcloud和js/tagcanvas文件

Expected Behavior

hexo clean hexo g hexo d 分别执行 按照文档应该有 但之后网站没有出现词云

Actual Behavior

网站 https://sekyoro.top/ image DOM也加载出来了 image 同时我看两个文件也是加载了的

同时hexo s预览发现能正常显示 image

Steps to Reproduce the Problem

package.json内容 `{ "name": "hexo-site", "version": "0.0.0", "private": true, "scripts": { "build": "hexo generate", "clean": "hexo clean", "deploy": "hexo deploy", "server": "hexo server" }, "hexo": { "version": "5.4.0" }, "dependencies": { "hexo": "^5.0.0", "hexo-algoliasearch": "^1.0.0", "hexo-baidu-url-submit": "0.0.6", "hexo-bilibili-bangumi": "^1.8.5", "hexo-blog-encrypt": "^3.1.6", "hexo-deployer-git": "^3.0.0", "hexo-generator-archive": "^1.0.0", "hexo-generator-baidu-sitemap": "^0.1.9", "hexo-generator-category": "^1.0.0", "hexo-generator-feed": "^3.0.0", "hexo-generator-index": "^2.0.0", "hexo-generator-index-pin-top": "^0.2.2", "hexo-generator-search": "^2.4.1", "hexo-generator-sitemap": "^2.1.0", "hexo-generator-tag": "^1.0.0", "hexo-offline-popup": "^1.0.3", "hexo-pdf": "^1.1.1", "hexo-related-popular-posts": "^5.0.1", "hexo-renderer-ejs": "^1.0.0", "hexo-renderer-kramed": "^0.1.4", "hexo-renderer-stylus": "^2.0.0", "hexo-server": "^2.0.0", "hexo-sliding-spoiler": "^1.2.1", "hexo-symbols-count-time": "^0.7.1", "hexo-tag-aplayer": "^3.0.4", "hexo-tag-cloud": "2.1.*", "hexo-theme-landscape": "^0.0.3", "hexo-util": "^2.5.0", "hexo-wordcount": "^6.0.1" } }·

Env

OS win10

D0n9X1n commented 1 year ago

看了下应该是主题或者某个插件覆盖了 window.onload 函数。

比较简单的改法就是把这两行放到主题的 </body> 标签前面, 确保是最后执行的两个 js。

  <script type="text/javascript" charset="utf-8" src="/js/tagcloud.js"></script>
  <script type="text/javascript" charset="utf-8" src="/js/tagcanvas.js"></script>