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

@a-morphous/wanderer-plugin-rss

v1.0.2

Published

Generates an RSS feed out of whatever feed you create from your site.

Downloads

7

Readme

Wanderer RSS Feed Plugin

Generates an RSS feed out of whatever feed you create from your site.

Usage

In your site configuration, add this plugin to your plugins list:

# config.toml

plugins=["@a-morphous/wanderer-plugin-rss", ...]

and then add your feed configuration to the site configuration as well. You do this by setting the rss object in the configuration. See https://www.npmjs.com/package/feed for a full list of configuration options.

# config.toml

[rss]
title = "Feed Title"
description = "Feed description"
url = "http://localhost:8080" # please add your actual URL here, without a trailing /
author = "Name of Author"
email = "author email address"
language = "en" # english by default, set your own locale code if not
image = "link/to/image/file"
favicon = "link/to/favicon.ico"

Then, finally, you need a query to determine which items to put into the feed:

[rss.feed]
query = [{ key="configuration.tags", value="blog", modifier="CONTAINS" }]
isAscending = true
limit = 10
sortBy = "date"

The feed has the following parameters (which is the same as feeds used elsewhere in Wanderer:)

  • query: an array with query operation objects. Each operation checks whether a key matches the modifier for a value, where the modifier can be =, <= <, >=, >, !=, CONTAINS, IN, or EXISTS.
    • IN is used to determine if the value is part of a string
    • EXISTS is used to determine if the key exists, and the value is discarded
    • CONTAINS is used to determine if the value is contained within an array
  • If there is more than one operation in the query, each of them also needs an operator:
query=[{ key="configuration.tags", value="blog", modifier="CONTAINS", operator="AND" }, { key="configuration.tags", value="test", modifier="CONTAINS", operator="NOT" }]
  • Operators determine how the query operations are joined together. There are three choices, AND, OR, and NOT. They are always operated directly from left to right.

The feed will then operate on every file in the site that matches the query.

Which items get syndicated?

However, even after you make your feed, not every item might end up in the feed.

The reason is that only pages that are eventually rendered into HTML are turned into feed items. This is to prevent things like CSS and JS files from getting syndicated.