编辑D:\hexo\themes\你的主题目录\layout\_widget\tagcloud.ejs文件,搜索<%- tagcloud,然后把整个代码修改为如下样式:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<% if (site.tags.length){ %>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('tagcloud') %></h3>
<div class="widget tagcloud">
<%- tagcloud(site.tags, {
min_font: 13,
max_font: 23,
amount: 65,
orderby: 'count',
color: true,
start_color: '#9900FF',
end_color: '#FF0000'
}) %>
</div>
</div>
<% } %>

保存后重新部署即可。
其中end_color为最多标签的字体颜色,start_color为最少标签的字体颜色。
感谢xfeng.me