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

@riverfox/webring

v0.0.1

Published

A simple webring navigation script

Downloads

4

Readme

WebRing

This script provides a simple webring navigation script. A webring is a collection of websites linked together in a circular structure, allowing users to navigate from one site to the next, promoting discovery and traffic among sites, usually sharing a common theme.

Features

  • Supports multiple webrings.
  • Allows navigation to the next, previous, and a random site within the webring.

Webring Structure (webrings.json)

The webrings.json file should contain a JSON object where each key represents the name of a webring, and its value is an array of websites part of that webring. Websites should be specified by their URL strings.

{
  "tech": [
    "http://example1.com",
    "https://example2.com"
  ],
  "art": [
    "https://example3.com",
    "http://example4.com"
  ]
}

.env Parameters

  • PORT: The port on which your server will run. Defaults to 3000 if not specified.
  • WEBRINGS_JSON: The file path to your webrings.json, defining the structure of your webrings.
  • WEBRINGS_CACHE_MINUTES: Read the webrings.json once in X minutes.

URL Formats

Members of a webring should implement navigation by creating links to the endpoints provided by this script. Use the following URL formats to navigate within your webring:

  • Next Site: /webring/<webring_name>/next?from=current_site_url
  • Previous Site: /webring/<webring_name>/previous?from=current_site_url
  • Random Site: /webring/<webring_name>/random

Replace <webring_name> with the name of your webring and current_site_url with the URL of the current site the user is visiting.

Usage

  1. Ensure you have Node.js and npm installed.
  2. Set up your webrings.json with the structure of your webrings.
  3. Configure the .env file with your preferred PORT and the path to your webrings.json.
  4. Start the server with npm run start.
  5. Add navigation links on webring websites as described in the URL Formats section.