記錄一下正在使用的兩款Hexo插件
效果請看這裏~ http://taqini.space/
Hexo-Tag-Cloud
官網
安裝流程
進入到 hexo 的根目錄,然後在 package.json
中添加依賴: "hexo-tag-cloud": "2.1.*"
執行 "hexo-tag-cloud": "2.1.*"
l 命令
修改主題模板(詳情請見下文)
配置_config.yml(詳情請見下文)
修改標籤雲的模板
我使用的是Butterfly,對應的模板是pug格式的,官方文檔中原先是沒有pug的文檔,我折騰了一下給移植過去了(pug貌似就是html語言的簡化):
首先找到 `Butterfly/layout/includes/widget/card_tags.pug 文件
將這個文件修改爲如下內容(注意縮進):
if site.tags.length
.card-widget.card-tags
.card-content
.item-headline
i.fa.fa-tags(aria-hidden="true")
span= _p('aside.card_tags')
script(type="text/javascript" charset="utf-8" src="/js/tagcloud.js")
script(type="text/javascript" charset="utf-8" src="/js/tagcanvas.js")
#myCanvasContainer.widget.tagcloud(align='center', style='width=100%;height=100%;margin:0;padding:0')
canvas#resCanvas(width=200,style='width=100%;height=100%;margin:0;padding:0;display:block')
!= tagcloud()
br
!= tagcloud({min_font: 16, max_font: 24, amount: 50, color: true, start_color: '#0D0E0F', end_color: '#99a9bf'})
其中resCanvas的參數可以設置,tagcloud的字體大小顏色等參數也可以設置
配置_config.yml
# hexo-tag-cloud
tag_cloud:
textFont: Microsoft YaHei, monospace
textColor: '#323'
textHeight: 18
outlineColor: '#E2E1D1' # '#B5B4AA' '#E2E1D1'
maxSpeed: 0.2
Hexo-Helper-Live2d
安裝模塊:npm install --save hexo-helper-live2d
安裝模型:模型列表 模型展示
配置_config.yml
配置_config.yml
live-2d
live2d:
enable: true
scriptFrom: jsdelivr # local
pluginRootPath: live2dw/
pluginJsPath: lib/
pluginModelPath: assets/
tagMode: false
debug: false
model:
use: live2d-widget-model-hijiki # npm-module package name
# use: wanko # 博客根目錄/live2d_models/ 下的目錄名
# use: ./wives/wanko # 相對於博客根目錄的路徑
# use: https://cdn.jsdelivr.net/npm/[email protected]/assets/wanko.model.json # 你的自定義 url
scale: 1
hHeadPos: 0.5
vHeadPos: 0.618
display:
superSample: 2
position: left # right
width: 150
height: 300
hOffset: 20
vOffset: -90
mobile:
show: true
scale: 1
react:
opacityDefault: 0.3
opacityOnHover: 0.3
opacity: 0.95 # 模型透明度
好了接下來就可以收工了
版權聲明:如無特殊說明,文章均爲本站原創,轉載請註明出處
本文鏈接:https://blog.csdn.net/wsad861512140