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

netlify-plugin-rss

v0.0.8

Published

netlify-plugin-rss

Downloads

10

Readme

Netlify Plugin RSS

Generate an RSS feed from your static html files, agnostic of static site generator!

Demo

This is a file generated from the repo in /demo: https://netlify-plugin-rss.netlify.com/rss.xml

  • note that it doesn't index anything outside of /posts: in our plugin inputs we specified dirToScan of /posts so only html files in that tree of folders is scanned.

The demo uses Eleventy to generate the site, but this plugin itself doesnt rely on any static site generator, that is the point (Eleventy has its own rss plugin).

How it works

You define a folder, the plugin recursively scans everything inside, sorts by publish date, and generates the appropriate XML.

This plugin uses Cheerio to extract data from your HTML, so you can use jQuery/CSS selectors to customize how to extract your content, title, publish date, and description metadata per item.

See our Demo for example of generated RSS from a /posts folder with nested html files.

Usage

To install, add the following lines to your netlify.toml file. For best results, we recommend customizing publishDateSelector and publishDateSelector:

[[plugins]]
package = "netlify-plugin-rss"
  [plugins.inputs]
  # required configs, customize as needed
  dirToScan = "/posts" # a subfolder to scan. "/" to scan all
  authorName = "swyx"
  site_url = "https://swyx.io"
  title = "swyx RSS Feed"
  rssDescription = "swyx.io RSS Feed"
  categories = ['Technology', 'JAMstack', 'Web Development']

  # # optional configs, defaults shown
  # rssFaviconUrl = "https://swyx.io/favicon.png"
  # docs = "http://example.com/rss/docs.html"
  # managingEditor = "authorName"
  # webMaster = "authorName"
  # copyright = "2020 ${authorName}"
  # language = "en"
  # pubDate = "new Date().toUTCString(),"
  # ttl = "60" # aka refresh every hour

  # # cheerio selectors for extractMetadataFromFile
  # # defaults shown
  # contentSelector = "main"
  # publishDateSelector = # if not specified, we use the date of file creation
  # descriptionSelector = "meta[name=description]" # probably no need to change
  # titleSelector = "title" # probably no need to change

  # # developer configs
  # debugMode = false # (for development) turn true for extra diagnostic logging

Future plans

WE ARE SEEKING MAINTAINERS.

  • limit RSS length to last X posts?
  • other feature requests?