在你的主题目录\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>
<% } %>

其中,start_color为颜色变化的起始端,end_color为颜色变化的结束端。

参考