RSS Feed Generator

https://webweav.ing/feedgen

I showed off a preview of this in Discord a little while back, but it’s finally ready to go live! This is my RSS (and soon other formats) feed generator!

I made this because I know a lot of people here hand-code their sites, which means if they want to provide an RSS feed, they have to hand-code that as well, and that can be quite a pain. While this isn’t quite as seamless as the automatic feed generators SSGs provide, I hope it is an acceptable compromise and can bring more RSS feeds for me to follow :smiley:

The way it works is: you give it some metadata about your site and the pages you want to include, then the generator will grab those pages and attempt to parse them. Specifically, it looks for an <article> tag, then a <time> element with a valid datetime attribute representing the publish date of the page. I think this these two requirements are easy enough for hand-coders to implement.

It is quite barebones currently, but I plan to add on to it more in the near future. I want to add support for Atom and JSON feeds, as well as make a more appealing stylesheet. If you’re curious about the code that makes this work, take a look at the git repository. There is also a command line version available if you’re willing to compile it yourself, I plan to package it for easy installation at a later time.

Please give it a try and let me know if you find it helpful or if there is anything I can improve!

15 Likes

this is amazing!! great job on this!

edit: also moving this to Community Projects to foster this forum as a way for us as a community to promote personal projects for the small/indie web as well as collaborative projects!

1 Like

oohhh whoa this is so cool yequari thank you!!! I’m definitely gonna try to implement this when I have the time because oh boy handcoding my rss feed has been a pain in the ass lmao.

I do have to go back and manually add datetime attributes but that is certainly easier than. uh. well. the everything else!

addendum; I have all my blog posts on separate pages, as opposed to one big ‘roll’. should i put in the URL of the page listing the blog posts, or should I put in separate URLs for each one?

If the latter, how do I make it automatically update?

You would put the individual URL for each post you want included in the feed. To update it you would need to do the whole process again with your new URL(s), which I understand is not ideal. What I did while testing this was keep a text file with the list of URLs and just pasted it in. I plan on making the cli version able to read such a file, but for the web interface I’ll need to figure out a better way to update a feed. Maybe I could pull the current feed on the website and pre-populate the form with its data.

1 Like

i’m so sorry I keep having problems with this haha but I tried to load my updates page into the reader; it says that the time is in an invalid format, but I’m not sure how? I used date and time as shown in the second “dates and times” example on this page by w3schools. Am I right in assuming that something like my updates page doesn’t work because it has multiple articles?

Don’t be sorry this is good feedback! This is an error on my side. For some reason the time format MM-DD-YYYY 00:00 requires a time zone. If I get time I will fix this today.

ETA: you’re right that multiple articles won’t be parsed, but the first one should be at least. I think supporting multiple articles on a page is a valid use case, so I’ll work on supporting that as well.

1 Like

Awesome thank you! Lemme know when you add that functionality, and I love this webapp. It’s so easy ^^

I’ve just pushed out an update:

  • The generator now supports more datetime formats, most sane ones should work
  • If you include a page URL with multiple <article> elements, the generator will create an <item> for each one. It will search the article for h1, h2, and h3 elements, using the biggest one as a title and a url (if the selected heading has an <a> element.

I hope this makes it more useful and as always please let me know if you come across any bugs or have any further feedback. Feel free to open issues on the git repository, which you should be able to sign into with your 32bit cafe SSO ID.

(cc @Jay)

2 Likes

YAY omg i just got around to checking this; so exciting! I’m hoping to implement this into my site soon >:) tysm for your hard work yequari

1 Like