Hexo博客 | 插件推荐

文章目录

更多文章请到我的博客https://blog.justlovesmile.top

Hexo插件汇总

插件功能文档链接
hexo-generator-index-pin-top文章置顶https://github.com/netcan/hexo-generator-index-pin-top
hexo-wordcount文章字数统计和阅读时长统计https://github.com/willin/hexo-wordcount
hexo-abbrlink生成URL短链接https://github.com/rozbo/hexo-abbrlink
hexo-lazyload-image图片懒加载https://github.com/Troy-Yang/hexo-lazyload-image
hexo-generator-baidu-sitemap生成baidusitemap.xmlhttps://github.com/coneycode/hexo-generator-baidu-sitemap
hexo-generator-sitemap生成sitemap.xmlhttps://github.com/hexojs/hexo-generator-sitemap
hexo-generator-feed生成RSS文件https://github.com/hexojs/hexo-generator-feed
hexo-external-link外链跳转https://github.com/hvnobug/hexo-external-link
hexo-autonofollow自动对外部链接增加nofollow属性https://github.com/liuzc/hexo-autonofollow
hexo-filter-nofollow为外链添加rel="noopener external nofollow noreferrer"https://github.com/hexojs/hexo-filter-nofollow
hexo-prism-plugin代码高亮https://github.com/ele828/hexo-prism-plugin
hexo-neat博客压缩https://github.com/rozbo/hexo-neat
hexo-allminifier博客压缩https://developer.aliyun.com/mirror/npm/package/hexo-all-minifier
hexo-tag-aplayeraplayer音乐播放器https://github.com/MoePlayer/hexo-tag-aplayer
hexo-tag-dplayerdplayer视频播放器https://github.com/MoePlayer/hexo-tag-dplayer
hexo-douban添加豆瓣读书,电影,游戏页面https://github.com/mythsman/hexo-douban
hexo-generator-searchdb本地搜索,生成search.xmlhttps://github.com/theme-next/hexo-generator-searchdb
hexo-algoliasearch搜索系统https://github.com/LouisBarranqueiro/hexo-algoliasearch
hexo-algolia搜索系统https://github.com/oncletom/hexo-algolia
hexo-generator-search本地搜索系统https://github.com/wzpan/hexo-generator-search
hexo-baidu-url-submit百度站长主动推送https://github.com/huiwang/hexo-baidu-url-submit
hexo-offline开启PWAhttps://github.com/JLHwung/hexo-offline
hexo-pwa开启PWAhttps://github.com/lavas-project/hexo-pwa
hexo-helper-live2d看板娘https://github.com/EYHN/hexo-helper-live2d
hexo-addlink文末添加当前文章链接和版权声明https://github.com/acwong00/hexo-addlink
hexo-blog-encrypt博客文章加密https://github.com/MikeCoder/hexo-blog-encrypt
hexo-simple-mindmap博客添加脑图https://github.com/HunterXuan/hexo-simple-mindmap
hexo-pdf博客展示pdfhttps://github.com/superalsrk/hexo-pdf
hexo-tag-echarts博客添加图表https://github.com/zhoulvjun/hexo-tag-echarts
hexo-steam-games添加Steam游戏界面https://github.com/HCLonely/hexo-steam-games
hexo-bilibili-bangumi添加bilibili番剧页面https://github.com/HCLonely/hexo-bilibili-bangumi
hexo-generator-random生成随机文章页面https://github.com/Drew233/hexo-generator-random
阅读终点,创作起航,您可以撰写心得或摘录文章要点写篇博文。去创作
  • 0
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
要为 Hexo 博客添加搜索功能,你可以使用第三方搜索引擎,如 Algolia 或 Google Custom Search。这里我们介绍如何使用 AlgoliaAlgolia 是一个强大的搜索引擎,提供了易于使用的 API,可以轻松地将搜索功能添加到你的 Hexo 博客中。以下是如何为 Hexo 博客添加 Algolia 搜索的步骤: 1. 注册 Algolia 账户并创建一个应用程序。 2. 安装 Hexo Algolia 插件。 ``` npm install hexo-algolia --save ``` 3. 在博客根目录下创建一个名为 `algolia.json` 的配置文件,并填写以下内容: ``` { "applicationID": "YOUR_APP_ID", "apiKey": "YOUR_API_KEY", "indexName": "YOUR_INDEX_NAME" } ``` 将 `YOUR_APP_ID`、`YOUR_API_KEY` 和 `YOUR_INDEX_NAME` 替换为你在 Algolia 上创建的应用程序的信息。 4. 在你的 Hexo 主题中添加搜索框和搜索结果页面。 在主题的相应文件中添加以下代码: 搜索框: ```html <form class="search-form" method="get" action="/search/"> <input class="search-input" type="text" placeholder="Search" name="query"> <button class="search-submit" type="submit">Search</button> </form> ``` 搜索结果页面: ```html --- title: "Search Results" layout: "search" --- <section class="search-results"> {% for page in page.posts %} <article class="search-result"> <h2 class="search-result-title"><a href="{{ page.url }}">{{ page.title }}</a></h2> <p class="search-result-excerpt">{{ page.excerpt }}</p> </article> {% endfor %} </section> ``` 5. 重新生成站点并上传到你的服务器。 ``` hexo generate ``` 6. 同步你的博客数据到 Algolia 上。 ``` hexo algolia ``` 完成以上步骤后,你的 Hexo 博客就可以使用 Algolia 进行搜索了。当用户在搜索框中输入关键字并提交时,将会跳转到搜索结果页面,显示与关键字匹配的文章列表。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

JUST LOVE SMILE

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值