历史上的今天

NPM 插件安装的部署方法:

1
2
3
4
5
npm i hexo-history-calendar --save

# 或者

cnpm i hexo-history-calendar --save

注意,一定要加–save,不然本地预览的时候可能不会显示!!!

新增网站根目录_config 配置项(不是主题的):

1
2
3
4
5
6
7
8
9
history_calendar:
priority: 4
enable: true
enable_page: all
layout:
type: class
name: sticky_layout
index: 0
temple_html: '<div class="card-widget card-history"><div class="card-content"><div class="item-headline"><i class="fas fa-clock fa-spin"></i><span>那年今日</span></div><div id="history-baidu" style="height: 100px;overflow: hidden"><div class="history_swiper-container" id="history-container" style="width: 100%;height: 100%"><div class="swiper-wrapper" id="history_container_wrapper" style="height:20px"></div></div></div></div>'

enable
参数:true/false
含义:是否开启插件

enable_page
参数:all
含义:路由地址,all 代表全局开启。如 / 代表主页。

priority
参数:1
含义:插件的叠放顺序,数字越大,叠放约靠前。

1
2
3
history_calendar:
enable: true
priority: 4 # 这里是参数

hexo 三连

1
hexo clean && hexo g && hexo s

已经成功部署