d0n9x1n / hexo-tag-cloud Goto Github PK
View Code? Open in Web Editor NEWYet, just another tag cloud plugin for hexo.
Home Page: https://www.npmjs.com/package/hexo-tag-cloud
License: MIT License
Yet, just another tag cloud plugin for hexo.
Home Page: https://www.npmjs.com/package/hexo-tag-cloud
License: MIT License
当前情况为默认 outlineMethod = block 不知道如何配置 还是当前不支持配置
作者好,感谢做出这个优秀的插件.但是我现在遇到了一点问题
我看了#7 但还是存在一些问题 .deploy_git文件夹下也有js/tagcloud和js/tagcanvas文件
hexo clean
hexo g
hexo d 分别执行
按照文档应该有
但之后网站没有出现词云
网站 https://sekyoro.top/
DOM也加载出来了
同时我看两个文件也是加载了的
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"
}
}·
OS win10
标签云中能够同时显示的标签好像有点少QAQ
同时感谢作者提供的插件
I have used your widget, and sure it's nice. But the default font style like font-color, font-family is not suitable to my blog's theme. Can you provide an improvement so that we can write the css freely.
你好是这样的,我在NexT主题中使用了标签云插件后在我的归档页和标签页下拉到最后页面会出现回滚的情况,在sidebar中注释掉标签云代码回复正常,请问这是插件的bug吗?
附上出错的网址:
f12:
自己前端水平有限也不太明白,下面附上我的sidebar:
{% macro render(display_toc) %}
<div class="toggle sidebar-toggle">
<span class="toggle-line toggle-line-first"></span>
<span class="toggle-line toggle-line-middle"></span>
<span class="toggle-line toggle-line-last"></span>
</div>
<aside class="sidebar">
<div class="sidebar-inner">
{%- set display_toc = page.toc.enable and display_toc %}
{%- if display_toc %}
{%- set toc = toc(page.content, { class: "nav", list_number: page.toc.number, max_depth: page.toc.max_depth }) %}
{%- set display_toc = toc.length > 1 and display_toc %}
{%- endif %}
<ul class="sidebar-nav motion-element">
<li class="sidebar-nav-toc">
{{ __('sidebar.toc') }}
</li>
<li class="sidebar-nav-overview">
{{ __('sidebar.overview') }}
</li>
</ul>
<!--noindex-->
<div class="post-toc-wrap sidebar-panel">
{%- if display_toc %}
<div class="post-toc motion-element">{{ toc }}</div>
{%- endif %}
</div>
<!--/noindex-->
<div class="site-overview-wrap sidebar-panel">
{{ partial('_partials/sidebar/site-overview.swig', {}, {cache: theme.cache.enable}) }}
{{- next_inject('sidebar') }}
</div>
<!-- hitokoto
<p></p>
<div class="hitokoto-title">
<i class="fas fa-adjust"></i>
<b>一言</b>
</div>
<div id="hitokoto">:D 获取中...</div>
<center><p id="hitofrom">:D 获取中...</p></center>
<script src="https://cdn.jsdelivr.net/npm/bluebird@3/js/browser/bluebird.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/fetch.min.js"></script>
<script>
fetch('https://v1.hitokoto.cn')
.then(function (res){
return res.json();
})
.then(function (data) {
var hitokoto = document.getElementById('hitokoto');
hitokoto.innerText = '\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + data.hitokoto;
var hitofrom = document.getElementById('hitofrom');
hitofrom.innerText = "——" + data.from + '\xa0';
})
.catch(function (err) {
console.error(err);
})
</script>
-->
+ {% if site.tags.length > 1 %}
+ <script type="text/javascript" charset="utf-8" src="{{ url_for('/js/tagcloud.js') }}"></script>
+ <script type="text/javascript" charset="utf-8" src="{{ url_for('/js/tagcanvas.js') }}"></script>
+ <div class="widget-wrap">
+ <h5 class="widget-title"></h5>
+ <div id="myCanvasContainer" class="widget tagcloud">
+ <canvas width="250" height="250" id="resCanvas" style="width:100%">
+ {{ list_tags() }}
+ </canvas>
+ </div>
+ </div>
+ {% endif %}
{%- if theme.back2top.enable and theme.back2top.sidebar %}
<div class="back-to-top motion-element">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>
{%- endif %}
</div>
</aside>
<div id="sidebar-dimmer">
</div>
{% endmacro %}
配置文件如下:
# hexo-tag-cloud 标签云 | see https://github.com/MikeCoder/hexo-tag-cloud
tag_cloud:
textFont: Trebuchet MS, Helvetica # 字体
textColor: '#555' # 字体颜色
textHeight: 14 # 字体高度
outlineColor: '#FFFFFF' # 字体背景色
maxSpeed: 0.1 # 标签云最大移动速度
安装版本:
{
"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-abbrlink": "^2.2.1",
"hexo-baidu-url-submit": "^0.0.6",
"hexo-deployer-git": "^2.1.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-pin-top": "^0.2.2",
"hexo-generator-searchdb": "^1.3.3",
"hexo-generator-sitemap": "^2.1.0",
"hexo-generator-tag": "^1.0.0",
"hexo-helper-live2d": "^3.1.1",
"hexo-lazyload": "^1.3.6",
"hexo-lazyload-image": "^1.0.9",
"hexo-neat": "^1.0.9",
"hexo-related-popular-posts": "^5.0.1",
"hexo-renderer-ejs": "^1.0.0",
"hexo-renderer-marked": "^3.0.0",
"hexo-renderer-stylus": "^2.0.0",
"hexo-server": "^2.0.0",
"hexo-symbols-count-time": "^0.7.1",
"hexo-tag-aplayer": "^3.0.4",
+ "hexo-tag-cloud": "^2.1.2",
"hexo-tag-dplayer": "^0.3.3",
"hexo-theme-landscape": "^0.0.3",
"hexo-wordcount": "^6.0.1"
}
}
我用的主题是icarus3.x版本的,它从ejs变成了jsx,不知道作者能否提供一下支持呢?谢谢
然后执行hexo其他操作就有问题了
FATAL Cannot read property 'code' of undefined
TypeError: Cannot read property 'code' of undefined
at C:\Users\Shinelon\AppData\Roaming\npm\node_modules\hexo-cli\lib\find_pkg. js:23:25
at tryCatcher (C:\Users\Shinelon\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\Shinelon\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (C:\Users\Shinelon\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (C:\Users\Shinelon\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (C:\Users\Shinelon\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\bluebird\js\release\promise.js:689:18)
at Async._drainQueue (C:\Users\Shinelon\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\bluebird\js\release\async.js:133:16)
at Async._drainQueues (C:\Users\Shinelon\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\bluebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues (C:\Users\Shinelon\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
我在我的theme文件夹下找不到tagcloud.ejs文件
我的theme是alpha_dust
hexo版本是3.9.0
但landscape的theme文件夹下就有tagcloud.ejs文件
next的theme文件夹下也能找到sidebar.swig文件
只有alpha_dust的theme文件夹下没有
这是我的标签页链接:https://jerrywcy.github.io/tags/
似乎完全没有加载出来的样子
能帮忙看看嘛?
麻烦大佬了!
RT
这样会显得标签云一卡一卡的
https://morainzh.org
你好作者,使用的next主题,但是按照你说的方法假如之后无效,以下是next主题的链接:
https://github.com/theme-next/hexo-theme-next
按照你的方法,在路径/next/layout/_macro/sidebar.swig文件,打开之后,我在最后添加的代码。
添加完毕之后,在博客根目录下,_config.yml文件,添加tag_cloud配置,但是还是无效,麻烦你帮我看一下
这个标签云能在哪里修改它的速度啊。。
以上
大佬您好。我在TagCanvas的官网看到了好多可以在_config.yml中修改球体大小的选项,但是因为理解能力不够,并未成功修改,可以帮帮孩子嘛,蟹蟹
按照操作,“hexo d”以后,在标签页就可以看到标签云了
但是,在其他页,比如about,categories等也会出现标签云,并且在标签页点击标签跳转以后,也会出现标签云
next/layout/_macro/sidebar.swig
内添加代码补充:tag canvas.js和tagcloud.js文件都已经导入,在public中也有(非手动导入)
(The version of the project, operating system, hardware etc.)
hexo: 3.7.0
hexo-cli: 1.1.0
os: Windows_NT 10.0.14393 win32 x64
http_parser: 2.7.0
node: 8.9.0
v8: 6.1.534.46
uv: 1.15.0
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.25.0
openssl: 1.0.2l
icu: 59.1
unicode: 9.0
cldr: 31.0.1
tz: 2017b
DeprecationWarning: fs.SyncWriteStream is deprecated.
exports.SyncWriteStream = fs.SyncWriteStream;
安装貌似好像应该是正确的,,但最关键的标签页没有任何显示。
hexo c && hexo g
生成的public 目录下没有 tagcloud.xml 和 tagcloud.swf 文件
next/layout/page.swig
中的部分代码
{#<div class="tag-cloud-tags">
{{ tagcloud({min_font: 14, max_font: 30, amount: 300, color: true, start_color: '#582e4b', end_color: '#111'}) }}
</div>#}
{% if site.tags.length > 1 %}
<script type="text/javascript" charset="utf-8" src="/js/tagcloud.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/tagcanvas.js"></script>
<div class="widget-wrap">
<div id="myCanvasContainer" class="widget tagcloud">
<canvas width="500" height="500" id="resCanvas" style="width=100%">
{{ list_tags() }}
</canvas>
</div>
</div>
{% endif %}
hexo/_config.yml
文件中也加入了
#tag_cloud
tag_cloud:
textColour: \#2626ff
outlineColour: \#9999ff
textHeight: 25
你好,可以切换为普通标签云吗,不使用canvas
(The version of the project, operating system, hardware etc.)
This demo for NexT them fails if blog is deployed in a subdirectory: .js wrong path.
{% if site.tags.length > 1 %}
<script type="text/javascript" charset="utf-8" src="/js/tagcloud.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/tagcanvas.js"></script>
<div class="widget-wrap">
<h3 class="widget-title">Tag Cloud</h3>
<div id="myCanvasContainer" class="widget tagcloud">
<canvas width="250" height="250" id="resCanvas" style="width=100%">
{{ list_tags() }}
</canvas>
</div>
</div>
{% endif %}
If deployed in a subdirectory, i.e., root = /blog/
for example, the following changes will help.
"/js/tagcloud.js"
to "{{ url_for('/js/tagcloud.js') }}"
"/js/tagcanvas.js"
to "{{ url_for('/js/tagcanvas.js') }}"
It makes use of the official Hexo helper url_for
(see here), so that browser can find .js with correct url.
Please confirm this. Thx.
打扰您啦,这是我的标签页地址
https://dlovexj.cn/tags/
我是按照您的说明之前成功的,但是现在我使用的主题更新了,不过在关键位置跟之前几乎是一样哒,我还是按照之前的方法,先安装插件,然后在page-header.ejs 处添加代码,可是并没有出现,包括hexo s 也没有出现,可以帮帮我嘛,蟹蟹,♥
Tag cloud无法在icarus主题下的右侧widget处显示。
在左侧和下方都显示正常,但在右侧无法显示(有tagcloud的标题,看不到球体)
用朋友的icarus主题blog的tag cloud放在右侧显示,也出现同样的问题,应该不是我的个例问题。
[click]我的icarus主题blog链接(tagcloud暂时放右侧)
查看tagcloud在左侧的显示效果可将网页以一半屏幕大小显示
另:作者您提供的ejs代码无法在icarus主题下正常显示widget的白色背景
可以使用以下代码替换(~/themes/icarus/layout/widget/tagcloud.ejs)
<% if (site.tags.length) { %>
<div class="card widget">
<div class="card-content">
<h3 class="menu-label">
<%= __('widget.tag_cloud') %>
</h3>
<script type="text/javascript" charset="utf-8" src="<%- url_for('/js/tagcloud.js') %>"></script>
<script type="text/javascript" charset="utf-8" src="<%- url_for('/js/tagcanvas.js') %>"></script>
<canvas width="250" height="250" id="resCanvas" style="width:100%">
<%- tagcloud() %>
</canvas>
</div>
</div>
<% } %>
这个tag cloud能添加到hexo别的主题吗?例如tranquilpeak。
我没有接触过js,所以具体怎么我不会,能不能指教一下。谢谢!
How to add the “hexo-tag-cloud” widget to the theme maupassant-hexo , the filepath of the widget of this theme is "maupassant-hexo/layout/_widget/" and the filetype of the widgets is "*.pug" , I copied "tagcloud.jade" to this filepath, but it doesn't work and satisfy my needs.
安装步骤都是按照说明在做。但我的设置文件都是njk。
按说明修改了next/layout/_macro/sidebar.njk,但是没有出现标签云。
请问怎么回事呢。
如题。
The tags should show up on the side bar
nothing happened
<div class="site-state-item">
{% if site.tags.length > 1 %}
<script type="text/javascript" charset="utf-8" src="/js/tagcloud.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/tagcanvas.js"></script>
<div class="widget-wrap">
<h3 class="widget-title">Tag Cloud</h3>
<div id="myCanvasContainer" class="widget tagcloud">
<canvas width="250" height="250" id="resCanvas" style="width=100%">
{{ list_tags() }}
</canvas>
</div>
</div>
{% endif %}
</div>
(The version of the project, operating system, hardware etc.)
Thank you very much.
无法显示标签..不知道如何解决,在tag.swif
下添加代码无法显示,如何解决?
C:\hexo\themes\next\layout\_macro
下的sidebar.swig
文件部分代码
{% macro render(is_post) %}
<div class="sidebar-toggle">
<div class="sidebar-toggle-line-wrap">
<span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
</div>
</div>
<aside id="sidebar" class="sidebar">
<div class="sidebar-inner">
{% set display_toc = is_post and theme.toc.enable %}
{% if display_toc and toc(page.content).length > 1 %}
<ul class="sidebar-nav motion-element">
<li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
{{ __('sidebar.toc') }}
</li>
<li class="sidebar-nav-overview" data-target="site-overview">
{{ __('sidebar.overview') }}
</li>
</ul>
{% endif %}
......
{% if display_toc and toc(page.content).length > 1 %}
<!--noindex-->
<section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
<div class="post-toc">
{% if page.toc_number === undefined %}
{% set toc = toc(page.content, { "class": "nav", list_number: theme.toc.number }) %}
{% else %}
{% set toc = toc(page.content, { "class": "nav", list_number: page.toc_number }) %}
{% endif %}
{% if toc.length <= 1 %}
<p class="post-toc-empty">{{ __('post.toc_empty') }}</p>
{% else %}
<div class="post-toc-content">{{ toc }}</div>
{% endif %}
</div>
</section>
<!--/noindex-->
{% endif %}
// 以下是插入的标签云代码
<% if (site.tags.length){ %>
<script type="text/javascript" charset="utf-8" src="/js/tagcloud.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/tagcanvas.js"></script>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('tagcloud') %></h3>
<div id="myCanvasContainer" class="widget tagcloud">
<canvas width="250" height="250" id="resCanvas" style="width=100%">
<%- tagcloud() %>
</canvas>
</div>
</div>
<% } %>
</div>
</aside>
{% endmacro %}
里面的文件时jade后缀的,这个怎么修改啊?
希望标签云中显示的是“矩阵快速幂+”
“+”的HTML特殊字符编码没有进行转义:
(The version of the project, operating system, hardware etc.)
Ubuntu 22.04
> npm list
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] extraneous
├── [email protected]
├── [email protected] extraneous
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] extraneous
├── [email protected]
└── [email protected]
简单修改了一下index.js
文件:
var fs = require('hexo-fs');
var pathFn = require('path');
var Hexo = require('hexo');
var log = require('hexo-log')({
debug: false,
silent: false
});
hexo.extend.filter.register('after_generate', function(post) {
log.info("--- 开始运行 hexo-tag-cloud 插件 ---");
解决之前issue中遗留的一些问题:#11 #7
经测试,命令hexo s
可以自动生成js文件。
经测试,命令hexo d -g
可以成功部署。
下面提供index.js
的全部代码:
// Copyright © 2016 TangDongxin
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
var fs = require('hexo-fs');
var pathFn = require('path');
var Hexo = require('hexo');
var log = require('hexo-log')({
debug: false,
silent: false
});
hexo.extend.filter.register('after_generate', function(post) {
log.info("--- 开始运行 hexo-tag-cloud 插件 ---");
/*if (!fs.existsSync(pathFn.join(hexo.public_dir, 'tags'))) {
log.info("Return");
return;
}*/
var libPath = pathFn.join(pathFn.join(pathFn.join(hexo.base_dir, 'node_modules'), 'hexo-tag-cloud'), 'lib');
var tagcanvasPubPath = pathFn.join(pathFn.join(hexo.public_dir, 'js'), 'tagcanvas.js');
var tagcloudPubPath = pathFn.join(pathFn.join(hexo.public_dir, 'js'), 'tagcloud.js');
log.info("已复制 tagcanvas.js tagcloud.js 到 public/js/");
fs.copyFile(pathFn.join(libPath, 'tagcanvas.js'), tagcanvasPubPath);
var tagCloudJsContent = "function addLoadEvent(func) {"
+ "var oldonload = window.onload;"
+ "if (typeof window.onload != 'function') {"
+ "window.onload = func;"
+ "} else {"
+ "window.onload = function() {"
+ "oldonload();"
+ "func();"
+ "}"
+ "}"
+ "}"
+ "addLoadEvent(function() {"
+ "console.log('tag cloud plugin rock and roll!');"
+ " try {"
+ " TagCanvas.textFont = " + (!(hexo.config.tag_cloud && hexo.config.tag_cloud.textFont) ? "'Trebuchet MS, Helvetica, sans-serif';" : "'" + hexo.config.tag_cloud.textFont + "';")
+ " TagCanvas.textColour = " + (!(hexo.config.tag_cloud && hexo.config.tag_cloud.textColour) ? "'#333';" : "'" + hexo.config.tag_cloud.textColour + "';")
+ " TagCanvas.textHeight = " + (!(hexo.config.tag_cloud && hexo.config.tag_cloud.textHeight) ? "15;" : hexo.config.tag_cloud.textHeight + ";")
+ " TagCanvas.outlineColour = " + (!(hexo.config.tag_cloud && hexo.config.tag_cloud.outlineColour) ? "'#E2E1C1';" : "'" + hexo.config.tag_cloud.outlineColour + "';")
+ " TagCanvas.outlineMethod = 'block';"
+ " TagCanvas.maxSpeed = 0.03;"
+ " TagCanvas.minBrightness = 0.2;"
+ " TagCanvas.depth = 0.92;"
+ " TagCanvas.pulsateTo = 0.6;"
+ " TagCanvas.initial = [0.1,-0.1];"
+ " TagCanvas.decel = 0.98;"
+ " TagCanvas.reverse = true;"
+ " TagCanvas.hideTags = false;"
+ " TagCanvas.shadow = '#ccf';"
+ " TagCanvas.shadowBlur = 3;"
+ " TagCanvas.weight = false;"
+ " TagCanvas.imageScale = null;"
+ " TagCanvas.fadeIn = 1000;"
+ " TagCanvas.clickToFront = 600;"
+ " TagCanvas.Start('resCanvas');"
+ " TagCanvas.tc['resCanvas'].Wheel(false)"
+ "} catch(e) {"
+ " console.log(e);"
+ " document.getElementById('myCanvasContainer').style.display = 'none';"
+ " }"
+ " });";
fs.writeFile(tagcloudPubPath, tagCloudJsContent);
log.info("--- hexo-tag-cloud 插件运行完毕 ---");
});
@MikeCoder 希望尽快merge :)
网站资料卡下面应该会显示标签云
网站资料卡下面应该没有显示标签云
操作系统是Windows11家庭版,Hexo用的主题是ParticleX
我试了下,文件都生成了,但tags.xml里面没有节点啊。
我看了一下tag的配置文件,路径指向的是src="/js/tagcloud.js"
和src="/js/tagcanvas.js"
,也就是说,这两个文件都是生成再js目录下的,但我本地成功在这个目录是没有找到这两个文件的,之后用find命令找到在/public/js/
下,在hexo的.gitignore文件中,这个目录是被忽略的,线上就是在js目录下找不到对应的两个文件而加载失败的。
随后我又将tag的配置文件路径指向`src="/public/js/tagcloud.js",部署到线上仍然不行,请问如何解决?这个标签云真的很不错的说。
All right.
It doesn't work.
Here is my 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": "4.2.0"
},
"dependencies": {
"hexo": "^4.0.0",
"hexo-deployer-git": "^2.1.0",
"hexo-generator-archive": "^1.0.0",
"hexo-generator-category": "^1.0.0",
"hexo-generator-feed": "^2.2.0",
"hexo-generator-index": "^1.0.0",
"hexo-generator-searchdb": "^1.2.0",
"hexo-generator-sitemap": "^2.0.0",
"hexo-generator-tag": "^1.0.0",
"hexo-renderer-ejs": "^1.0.0",
"hexo-renderer-marked": "^2.0.0",
"hexo-renderer-stylus": "^1.1.0",
"hexo-server": "^1.0.0",
"hexo-tag-cloud": "^2.1.1"
},
"devDependencies": {}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.