🪴/ openring

Building @jasikpark/astro-openring, an Astro rewrite of a simple webring implementation

Nov 23, 2026 – Caleb Jasik

Was reading Drew DeVault's blog, and saw three cards at the bottom with links to posts on other sites, with a note "provided by openring".

screenshot of openring, there's three cards with blog post titles, links, descriptions

Looking into it, it's an open webring, in that you can create it yourself without group memberships controlled by a central party, it's just links between people.

I also saw openring-rs, a Rust based rewrite, that seemed pretty sweet.

This blog is built with Astro, so I worked to adapt it into TypeScript and to work with Astro's Content Collections.

The rewrite is available at https://tangled.org/calebjasik.jasik.xyz/astro-openring

screenshot of astro-openring, there's three cards with blog post titles, links, descriptions

There's three parts, the content collection loader, the getter for random posts, and the component that renders them. It uses round-robin to try to ensure that every RSS feed gets the same number of posts included, regardless of how often they post.

I tried reimplementing it in the same fashion as openring-rs then I was sad some of the blog authors dominated the selection, and I couldn't find eg: https://mango.pdf.zone among the blog posts. The round-robin helps with that. Each round, we go through each loaded feed and pull the latest feed item from it and save it to the content loader store. Then, we continue until num articles per feed and num articles are satisfied.

// Group articles by feed for fair distribution
// This prevents prolific authors from dominating the selection
const articlesByFeed = new Map<string, Article[]>();
for (const article of allArticles) {
const feedArticles = articlesByFeed.get(article.feedUrl) ?? [];
feedArticles.push(article);
articlesByFeed.set(article.feedUrl, feedArticles);
}
// Sort articles within each feed by date (newest first)
for (const feedArticles of articlesByFeed.values()) {
feedArticles.sort((a, b) => b.pubDate.getTime() - a.pubDate.getTime());
}
// Round-robin selection to ensure fair distribution across feeds
// Round 0: Take newest article from each feed
// Round 1: Take 2nd newest article from each feed (if available)
// Round 2: Take 3rd newest article from each feed (if available)
// Continue until we have `numArticles` total
const selectedArticles: Article[] = [];
const totalArticles = allArticles.length;
let round = 0;
while (
selectedArticles.length < numArticles &&
selectedArticles.length < totalArticles
) {
let addedThisRound = 0;
for (const feedArticles of articlesByFeed.values()) {
if (round < feedArticles.length) {
selectedArticles.push(feedArticles[round]);
addedThisRound++;
if (selectedArticles.length >= numArticles) {
break;
}
}
}
// If no articles were added this round, we've exhausted all feeds
if (addedThisRound === 0) {
break;
}
round++;
}
// Clear articles array to free memory
allArticles.length = 0;
// Store the selected articles
for (const article of selectedArticles) {
store.set({
id: article.id,
data: {
title: article.title,
link: article.link,
pubDate: article.pubDate,
summary: article.summary,
author: article.author,
feedUrl: article.feedUrl,
feedTitle: article.feedTitle,
feedLink: article.feedLink,
},
});
}

I've been running into OOM errors when building with this, so I may need to get a little more antiquated with how to properly memory manage in TypeScript. For now, allocating 4GB instead of 2GB to nodejs in CI does the trick.

I’ve got to add the OpenRingSection and the random article loader to the astro-openring repo.

(this has been in the drafts since Jan 2026 lmao).

Posts from blogs I follow

Hypervisors for Memory Introspection and Reverse Engineering

Introduction In this article, we explore the design and implementation of Rust-based hypervisors for memory introspection and reverse engineering on Windows. We cover two projects - illusion-rs , a UEFI-based hypervisor, and matrix-rs , a Windows kernel...

via secret clubJune 2, 2025

Conventional Commit rules everything around me

There’s a community standard out there called Conventional Commit for structured git-commit messages. If you don’t know about it already, it recommends a strict type(scope?): description format for describing a code change in a repo. A normal git com...

via daverupert.comNovember 13, 2026

Generators with UnpinCell

In July, I described a way to make pinning more ergonomic by integrating it more fully into the language. Last week, I develoepd that idea further with the notion of UnpinCell : a wrapper type that lets a user take an &amp;pin mut UnpinCell and prod...

via Without boats, dreams dry upOctober 25, 2024

Generated byastro-openring