RSS插件
cnpm install hexo-generator-feed --save
feed:
type: atom
path: atom.xml
limit: 20
hub:
content:
content_limit: 140
content\_limit\_delim: " "
order_by: -date
搜索插件
cnpm install hexo-generator-searchdb --save
# hexo-generator-searchdb
search:
path: search.xml
field: post
format: html
引用插件
cnpm install hexo-reference --save
注:此插件有bug,需要在hexo clean
后删除此插件重装,不然会报
FATAL {
err: TypeError: Cannot read properties of undefined (reading 'content')
at /home/fangyuan/文档/博客/node_modules/_hexo-reference@1.0.4@hexo-reference/src/footnotes.js:55:43
at String.replace (<anonymous>)
at renderFootnotes (/home/fangyuan/文档/博客/node_modules/_hexo-reference@1.0.4@hexo-reference/src/footnotes.js:53:17)
at Hexo.<anonymous> (/home/fangyuan/文档/博客/node_modules/hexo-reference/index.js:6:18)
at Hexo.tryCatcher (/home/fangyuan/文档/博客/node_modules/bluebird/js/release/util.js:16:23)
at Hexo.<anonymous> (/home/fangyuan/文档/博客/node_modules/bluebird/js/release/method.js:15:34)
at /home/fangyuan/文档/博客/node_modules/hexo/lib/extend/filter.js:67:52
at tryCatcher (/home/fangyuan/文档/博客/node_modules/bluebird/js/release/util.js:16:23)
at Object.gotValue (/home/fangyuan/文档/博客/node_modules/bluebird/js/release/reduce.js:166:18)
at Object.gotAccum (/home/fangyuan/文档/博客/node_modules/bluebird/js/release/reduce.js:155:25)
at Object.tryCatcher (/home/fangyuan/文档/博客/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/fangyuan/文档/博客/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/home/fangyuan/文档/博客/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/home/fangyuan/文档/博客/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/home/fangyuan/文档/博客/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/home/fangyuan/文档/博客/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/home/fangyuan/文档/博客/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/home/fangyuan/文档/博客/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/home/fangyuan/文档/博客/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (node:internal/timers:473:21)
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html
echarts图表插件
cnpm install hexo-tag-echarts --save
在当前主题下的layout/_partial/head.ejs
中加入
<script src="https://cdn.jsdelivr.net/npm/echarts@5.3.0/dist/echarts.common.min.js"></script>