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 🙏

© 2024 – Pkg Stats / Ryan Hefner

hexo-neodb

v0.1.7

Published

Generate neodb pages of books, movies, tvs, musics and games for Hexo.

Downloads

4

Readme

hexo-neodb

一个在 Hexo 页面中嵌入 neodb 个人主页的小插件.



原理

hexo-neodb 参考 https://github.com/mythsman/hexo-douban 开发

由于豆瓣评论被删,因此转战 neodb 作为替代。

neodb 支持豆瓣数据导入,开源并开放 api

通过 https://neodb.social/developer/ 可生成 token 对 api 进行访问

安装

$ npm install hexo-neodb --save

配置

将下面的配置写入站点的配置文件 _config.yml 里(不是主题的配置文件).

neodb:
  token: '填入之前生成的 token'
  builtin: false
  item_per_page: 10
  meta_max_line: 4
  customize_layout: page
  book:
    path: books/index.html
    title: 'This is my book title'
    quote: 'This is my book quote'
    option:
  movie:
    path: movies/index.html
    title: 'This is my movie title'
    quote: 'This is my movie quote'
    option:
  game:
    path: games/index.html
    title: 'This is my game title'
    quote: 'This is my game quote'
    option:
  music:
    path: musics/index.html
    title: 'This is my music title'
    quote: 'This is my music quote'
    option:
  tv:
    path: tvs/index.html
    title: 'This is my tv title'
    quote: 'This is my tv quote'
    option:
  timeout: 10000

如果只想显示某一个页面(比如movie),那就把其他的配置项注释掉即可。

使用

展示帮助文档

$ hexo neodb -h
Usage: hexo neodb

Description:
Generate pages from neodb

Options:
  -b, --books   Generate neodb books only
  -g, --games   Generate neodb games only
  -m, --movies  Generate neodb movies only
  -s, --musics   Generate neodb songs only
  -t, --tvs   Generate neodb songs only

主动生成 neodb 页面

中途报错,不影响生成结果,只是会缺失几条。

默认采用了 7890 端口代理访问,国内访问 api 不太顺畅

$ hexo neodb
INFO  Start processing
INFO  0 (wishlist), 0 (progress),0 (complete) game loaded in 729 ms
INFO  0 (wishlist), 0 (progress),20 (complete) song loaded in 761 ms
INFO  2 (wishlist), 0 (progress),136 (complete) book loaded in 940 ms
INFO  30 (wishlist), 0 (progress),6105 (complete) movie loaded in 4129 ms
INFO  Generated: books/index.html
INFO  Generated: movies/index.html
INFO  Generated: games/index.html
INFO  Generated: musics/index.html
INFO  Generated: tvs/index.html

如果不加参数,那么默认参数为-bgmst。当然,前提是配置文件中均有这些类型的配置。

需要注意的是,通常大家都喜欢用hexo d来作为hexo deploy命令的简化,但是当安装了hexo neodb之后,就不能用hexo d了,因为hexo neodbhexo deploy
的前缀都是hexo d

升级

我会不定期更新一些功能或者修改一些Bug,所以如果想使用最新的特性,可以用下面的方法来更新:

  1. 修改 package.json 内 hexo-neodb 的版本号至最新
  2. 重新安装最新版本npm install hexo-neodb --save

或者使用npm install hexo-neodb --update --save直接更新。

显示

如果上面的配置和操作都没问题,就可以在生成站点之后打开 //yourblog/books//yourblog/movies, //yourblog/games, 来查看结果。

菜单

如果上面的显示没有问题就可以在主题的配置文件 _config.yml 里添加如下配置来为这些页面添加菜单链接.

menu:
  Home: /
  Archives: /archives
  Books: /books     #This is your books page
  Movies: /movies   #This is your movies page
  Games: /games   #This is your games page
  Musics: /musics   #This is your musics page
  TVs: /tvs   #This is your tvs page

他们在用

下面列举了在不同 hexo 主题下使用插件后的渲染结果,仅供参考。 如果您使用了本插件,也欢迎在 README.md 中提 PR 将您的网站添加进来,供后人参考。

hexo-theme-butterfly

  • https://lesslsmore.github.io/movies/

免责声明

本项目仅供学习交流使用,不得用于任何商业用途。

数据来源于互联网公开内容,没有获取任何私有和有权限的信息(个人信息等),由此引发的任何法律纠纷与本人无关。

反馈

系统刚上线,可能还不够完善。如果大家在使用的过程中数据有问题、或者有什么问题和意见,欢迎随时提issue。

如果你觉得这个插件很好用,欢迎右上角点下 star ⭐️,表达对作者的鼓励。

Star History

Stargazers over time

Lisense

MIT