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

blogroller

v2.2.0

Published

A blogroll-like library for fetching & rendering feed data from a FreshRSS instance.

Readme

Blogroller

A lightweight JavaScript library for fetching and displaying RSS feeds from a FreshRSS instance, offering a "blogroll" experience similar to the Google Blogger widget.

Overview

Blogroller helps you display a list of the latest posts from multiple RSS feeds. It fetches them through a proxy (to hide credentials and unify requests) and shows them in a neat, paginated list with reading-time estimates and relative "published X days ago" labels.

Features

  • Automatic Reading Time Calculation: Estimates reading time based on word count.
  • Relative "Time Ago" Stamps: Displays how long ago a post was published (e.g., "2 days ago").
  • Batch-Based Pagination: Loads feeds in batches with a "Show More" link.
  • Graceful Error Handling: Manages missing feeds and empty categories without breaking.
  • Configurable: Easily customize via a simple JavaScript object.
  • Styling Customization: Modify appearance using CSS variables or custom CSS.

Setup FreshRSS Proxy

Blogroller requires a FreshRSS proxy to securely access your FreshRSS instance's API and protect your credentials. We recommend FreshProxy, a Python Flask application you can host separately. By default, FreshProxy now provides a single /digest endpoint that returns JSON data shaped like:

{
  "items": [
    {
      "title": "Some Post",
      "published": 1697000000,
      "feedId": "feed/123",
      "feedTitle": "Example Feed",
      "feedHtmlUrl": "https://example.com",
      "feedIconUrl": "https://example.com/icon.png",
      "alternate": [{ "href": "https://example.com/post" }]
    }
    // ...
  ],
  "page": 1,
  "limit": 50,
  "totalItems": 123
}

Note: Deploy the Flask app to a hosting service (e.g. Heroku, AWS, DigitalOcean) to make it accessible via a public URL. Please check the FreshProxy repo for detailed instructions on configuration and environment variables.

Installation

Via NPM

Install Blogroller using npm:

npm install blogroller

Then import in your code:

import { Blogroll } from 'blogroller';

CDN / Script Tag

You can also load Blogroller from a CDN like unpkg:

<!-- Include Blogroller CSS -->
<link
  rel="stylesheet"
  href="https://unpkg.com/blogroller@latest/dist/blogroller.css"
/>

<!-- Include Blogroller JS -->
<script src="https://unpkg.com/blogroller@latest/dist/blogroller.umd.js"></script>

<script>
  const blogroll = new Blogroller.Blogroll();
  blogroll.initialize({
    proxyUrl: 'https://your-proxy-url/',
    categoryLabel: 'myCategory',
    batchSize: 10, // Optional: defaults to 10
    containerId: 'rss-feed', // Optional: defaults to 'rss-feed'
  });
</script>

This exposes a global Blogroller object (i.e., window.Blogroller).

Styling Options

Blogroller provides default styling via the blogroller.css file, which you can customize to match your site's design. You can override the default styles using CSS variables or by adding your own CSS rules.

Customizing Styles

You can override the default CSS variables to customize colors. For example:

:root {
  --blogroller-border-color: #3c3836;
  --blogroller-feed-title-color: #d79921;
  --blogroller-feed-title-hover-bg: #d79921;
  --blogroller-feed-title-hover-color: #282828;
  --blogroller-link-color: #83a598;
  --blogroller-link-hover-color: #282828;
  --blogroller-text-italic-color: #98971a;
  --blogroller-text-italic-hl-color: #b8bb26;
}

Alternatively, you can write your own CSS rules targeting the .blogroller-* classes to fully customize the appearance.

Usage

Basic Example

Assume you have a <div id="rss-feed"></div> in your HTML. Then:

import { Blogroll } from 'https://unpkg.com/blogroller@latest/dist/blogroller.esm.js';

const blogroll = new Blogroll();
blogroll.initialize({
  proxyUrl: 'https://example-proxy.com/',
  categoryLabel: 'myCategory',
  batchSize: 5,
  containerId: 'rss-feed',
});

Parameters:

  • proxyUrl (string, required): The URL to your FreshRSS proxy.
  • categoryLabel (string, required): The label (or category) of the feeds in your FreshRSS instance you want to display.
  • batchSize (number, optional): How many items to display initially (optional, default 10).
  • containerId (string, optional): The DOM element ID to render the blogroll into (optional, default 'rss-feed').

Result: A blogroll that shows the latest posts from feeds that have the label "myCategory". If there are more than 5 items, a "Show More" link appears.

Contributing

Contributions are welcome! Feel free to open issues or pull requests. If you'd like to add a new feature, kindly open an issue first to discuss it.

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/awesome-feature
  3. Commit your changes: git commit -m "Add awesome feature"
  4. Push to your branch: git push origin feature/awesome-feature"
  5. Open a Pull Request on GitHub.