功能强大的Hexo第三方插件 | 小结
汇总简单好用的Hexo插件(好用但没有那么好用,矛盾文学)
永久链接
hexo-abbrlink
npm install hexo-abbrlink --save
配置_config.yml
permalink: /:abbrlink.html
abbrlink:
alg: crc32 # 算法:crc16(default) and crc32
rep: hex # 进制:dec(default) and hex
文章加密
hexo-blog-encrypt
npm install hexo-blog-encrypt --save
配置_config.yml
encrypt: # hexo-blog-encrypt
abstract: 此文章已加密, 请输入密码查看
message: 在此输入密码
tags:
- {name: Encrypted, password: ******}
wrong_pass_message: 密码错误, 请重新输入
wrong_hash_message: 此文章不能被校验, 但可以查看解密后的内容
引入Bangumi
hexo-bilibili-bangumi
npm install hexo-bilibili-bangumi --save
配置_config.yml
bangumi:
enable: true
source: bgm
path:
vmid: ******
title: '番剧'
quote: '要说他背上的铁块是把剑那也未免太过于巨大了'
show: 2
lazyload: true
loading: https://assets.btwoa.com/202201220914423.gif
metaColor:
color:
avif: false
progress: true
extra_options:
key: value
引入豆瓣卡片
hexo-douban-card
npm install hexo-douban-card --save
配置_config.yml
doubanCard:
cookie: ********
实现外链转内链
hexo-filter-links
npm install hexo-filter-links --save
配置_config.yml
links:
enable: true
field: 'site'
exclude:
- 'exclude1.com'
- 'exclude2.com'
- '*.exclude3.com'
Atom/RSS2 订阅
hexo-generator-feed
npm install hexo-generator-feed --save
配置_config.yml
plugins:
hexo-generator-feed
#Feed Atom
feed:
type:
- atom
- rss2
path:
- atom.xml
- rss2.xml
limit: false
hub:
content: fales
content_limit: 140
content_limit_delim: ' '
order_by: -date
icon: #icon.avif
文章置顶
hexo-generator-index-pin-top
npm uninstall hexo-generator-index --save
npm install hexo-generator-index-pin-top --save
在需要置顶的文章Front-matter处添加top: true
随机访问文章
安装依赖
npm install object-assign
hexo-generator-random
npm install hexo-generator-random --save
站点地图
hexo-generator-sitemap
npm install hexo-generator-sitemap --save
配置_config.yml
sitemap:
path: sitemap.xml
更换Markdown渲染器
hexo-renderer-markdown-it-plus
npm install hexo-renderer-markdown-it-plus --save
配置_config.yml
markdown_it_plus:
highlight: true
html: true
xhtmlOut: true
breaks: true
langPrefix:
linkify: true
typographer:
quotes: “”‘’
pre_class: highlight
主动推送链接
hexo-submit-urls-to-search-engine
npm install hexo-submit-urls-to-search-engine --save
配置_config.yml
hexo_submit_urls_to_search_engine:
submit_condition: count
count: 10
period: 900
google: 1
bing: 1
baidu: 1
txt_path: submit_urls.txt
baidu_host: https://www.ba2in9a.com
baidu_token: ********
bing_host: https://www.ba2in9a.com
bing_token: ********
google_host: https://www.ba2in9a.com
google_key_file: project.json
google_proxy: 0
replace: 0
find_what: https://www.ba2in9a.com
replace_with: https://www.ba2in9a.com
deploy:
- type: cjh_google_url_submitter
- type: cjh_bing_url_submitter
- type: cjh_baidu_url_submitter
引入动态图表库
hexo-tag-chart
npm install hexo-tag-chart --save
hexo-tag-echarts4
npm install hexo-tag-echarts4 --save
引入各类地图
hexo-tag-map
npm install hexo-tag-map --save
引入音频视频
hexo-tag-mmedia
npm install hexo-tag-mmedia@1 --save
配置_config.yml
mmedia:
audio:
default:
autoplay: true
key: vaule
video:
default:
autoplay: true
key: vaule
meting:
js: https://cdn.jsdelivr.net/npm/meting@2/dist/Meting.min.js
api:
default:
key: vaule
aplayer:
js: https://cdn.jsdelivr.net/npm/aplayer@1/dist/APlayer.min.js
css: https://cdn.jsdelivr.net/npm/aplayer@1/dist/APlayer.min.css
default:
contents:
dplayer:
js: https://cdn.jsdelivr.net/npm/dplayer@1/dist/DPlayer.min.js
hls_js: https://cdn.jsdelivr.net/npm/hls.js/dist/hls.min.js
dash_js: https://cdn.jsdelivr.net/npm/dashjs/dist/dash.all.min.js
shaka_dash_js: https://cdn.jsdelivr.net/npm/shaka-player/dist/shaka-player.compiled.js
flv_js: https://cdn.jsdelivr.net/npm/flv.js/dist/flv.min.js
webtorrent_js: https://cdn.jsdelivr.net/npm/webtorrent/webtorrent.min.js
default:
contents:
bilibili:
default:
page: 1
danmaku: true
allowfullscreen: allowfullscreen
sandbox: allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups
width: 100%
max_width: 850px
margin: auto
xigua:
default:
autoplay: false
startTime: 0
allowfullscreen: allowfullscreen
sandbox: allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups
width: 100%
max_width: 850px
margin: auto
artplayer:
js: https://cdn.jsdelivr.net/npm/artplayer@3/dist/artplayer.js
hls_js: https://cdn.jsdelivr.net/npm/hls.js/dist/hls.min.js
dash_js: https://cdn.jsdelivr.net/npm/dashjs/dist/dash.all.min.js
shaka_dash_js: https://cdn.jsdelivr.net/npm/shaka-player/dist/shaka-player.compiled.js
flv_js: https://cdn.jsdelivr.net/npm/flv.js/dist/flv.min.js
webtorrent_js: https://cdn.jsdelivr.net/npm/webtorrent/webtorrent.min.js
default:
style: width:100%;height:650px;max-width:1200px;center
contents:
autoSize: true
autoMini: true
fullscreen: true
fullscreenWeb: true
百度主动推送
hexo-baidu-url-submit
npm install hexo-baidu-url-submit --save
配置_config.yml
Plugins:
- baidu_url_submit
baidu_url_submit:
count: 80
host: ba2in9a.top # 在百度站长平台中注册的域名
token: ********** # API提交处复制个人私钥
path: baidu_urls.txt
deploy:
- type: baidu_url_submitter
引入豆瓣
hexo-douban
npm install hexo-douban --save
配置_config.yml
douban:
user: ********
builtin: true
book:
title: '书单'
quote: '向文明低头'
movie:
title: '影集'
quote: '让河流接住倒影画一个你'
game:
title: '游戏'
quote: '只不过是镜花水月而已'
timeout: 10000
插入媒体标签
hexo-tag-aplayer
npm install hexo-tag-aplayer --save
配置_config.yml
aplayer:
meting: true
hexo-tag-dplayer
npm install hexo-tag-dplayer --save
配置_config.yml
hexo-tag-dplayer:
cdn:
- https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.js
- https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.css
default:
api: https://api.prprpr.me/dplayer/
loop: yes
screenshot: yes
- 感谢你的投喂
赞赏名单
你的支持是我前进路上不可或缺的动力
本文是原创文章,采用CC BY-NC-SA 4.0协议,完整转载请注明来自放养平凡
评论 ()
TwikooValine