npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

hexo-recommended-posts

v1.2.0

Published

Recommended Posts Plugin for Hexo

Downloads

299

Readme

npm version Join the chat at https://gitter.im/hexo-recommended-posts/Lobby

Hexo跨博客文章推荐插件

此插件借助人工智能为友情链接升级换代,通过文章推荐的方式帮助大家推广博客。它从推荐引擎里获取文章推荐列表,列表里既有您博客的内部文章链接,也有使用此服务的其他博主的外部链接,自动,精准,公平的实现文章互推。

在安装使用之前,您可以实时预览该插件的效果。

如何使用

1. 安装文章推荐插件:

npm install hexo-recommended-posts --save

2. 下载推荐文章列表

在编辑完新的文章之后,使用如下命令获取推荐列表

hexo recommend

自定义

本插件可以在零配置的情况下直接使用。

如果默认配置不能满足您的需求,您可以在博客根目录的_config.yml里覆盖默认配置:

recommended_posts:
  server: https://api.truelaurel.com #后端推荐服务器地址
  timeoutInMillis: 10000 #服务时长,超过此时长,则使用离线推荐模式
  internalLinks: 3 #内部文章数量
  externalLinks: 1 #外部文章数量
  fixedNumber: false
  autoDisplay: true #自动在文章底部显示推荐文章
  excludePattern: []
  titleHtml: <h1>推荐文章<span style="font-size:0.45em; color:gray">(由<a href="https://github.com/huiwang/hexo-recommended-posts">hexo文章推荐插件</a>驱动)</span></h1> #自定义标题

其中 excludePattern 可以添加想要被过滤的链接的正则表达式, 如配置为 ["example.com"], 则所有包含 example.com 的链接都会从推荐文章中过滤掉.

fixedNumber 字段用来控制是否返回固定数量的推荐文章, 如果默认推荐文章不够的话会填充当前文章的前后文章作为推荐文章.

如何自定义推荐文章的显示位置?

首先,您需要关闭推荐文章的自动显示 autoDisplay: false。 其次,您需要自定义您的博客主题,Hexo有几个比较流行的渲染器:

当无法连接推荐服务器时,插件如何工作?

当服务器无法使用时,对旧文章,插件会使用原有的推荐列表;对新文章,将使用离线推荐算法推荐内部文章。

致谢

我想感谢朋友们对此插件的贡献,谢谢他们极具建设性的意见和快速的测试反馈