1. 20
  1. 11

    An RSS (or ATOM) feed is so easy to implement you can fit it on probably 1/3rd of letter paper (as I’ve done in one of my posts). I really encourage everyone to make their website subscribeable! 🙂 It’d be nice instead of “enter your email” or “subscribe to me on X” we can eventually say “here’s my feed ” :D The author did a good job at reinforcing how simple it is.

    1. 1

      I wonder if someone could make some middleware that grabs s with a particular ID and generates a feed, including updating the HTML to insert the element? Seems a bit contrived (especially as you mention that the specs themselves aren’t complicated), but it’s an interesting thought exercise.

    2. 8

      I don’t see the rss exposed anywhere in the html. I think that’s pretty important for discovery. :P

      1. 4

        Whoops! Author here, it’s at https://prose.nsood.in/rss.xml. You’re right, I should add a link in somewhere, will do. :)

        1. 16

          It should be a <link rel="alternate" type="application/rss+xml" href="https://prose.nsood.in/rss.xml" /> in the <head>, so feed readers can programmatically detect it.

          1. 11

            Former news-reader framework developer here. Glad you’re adding a feed!

            • Please, please run your feed through a validator like the W3C’s! It will uncover a lot of common problems that vex readers.
            • It’s a very good idea to provide a GUID for each article; it makes it a lot easier for the consumer to match articles from the last-known feed to the current one. Without this, your feed is prone to annoying issues like old posts reappearing as new, for example if you ever change a post’s title or delete a recent post. Your blog engine probably has some kind of primary key; you can just use that.
        2. 3

          I found supporting RSS to be easy. I also found it easy (once I had RSS) to add Atom and JSON feed. I had to add some additions to my templating system to support all three on my blog, but it wasn’t terribly difficult.

          And the last time I checked, the JSON feed was the most popular feed.

          1. 2

            fun! i like the implementation :3 it reminds me of my own bespoke pile of feed reading garbage: https://git.j3s.sh/j3s.sh/tree/main/atom/atom.go

            1. 2

              I’ve also written an rss feed generator. I think there are some things I need to fix (e.g., relative links should be made absolute), but it’s working! Code here.

              1. 2

                I did a similar thing for my static blog. Originally, my bespoke static site generator (neon) was implemented in Go, and I used github.com/gorilla/feeds for the atom support (link to my go.mod file). I since rewrote my static site generator in Rust (I learn new languages by writing static site generators, and when I like an implementation I promote it to production), where I use the atom_syndication crate. link to Cargo.toml.

                My blog is here and the feed should be machine- and human-discoverable (the blog itself is not very useful, my hobby is building and hosting the blog rather than writing posts). I’ve also found that the w3c hosts a feed validator which is helpful for implementing these things.

                EDIT: Also, I just subscribed to your blog, so it seems the machine-discoverability stuff works! If anyone else has blogs about hobby-hacking or self-hosting, I would love to get links (I hope it’s not considered “self promotion” if it’s solicited?).

                1. 3

                  I did one thing more to my feed, added XSLT that produces more or less readable HTML output of it (see https://hauleth.dev/atom.xml, full link to show that it is “raw XML”). AFAIK all modern browsers (tested on Safari and Fx) support XSLT for XML files out of the box it is nice feature as it makes the feed readable for both - machines and people.

                  My feed is above, I do not write much, but I try my best.

                  1. 2

                    That’s super cool, I didn’t know that was an option. How does your site work? Static site generator? Server side rendering? In either case, what’s your stack?

                    1. 3

                      I use Zola for static rendering. Whole source is there - https://github.com/hauleth/hauleth. Hosting is done via Netlify with few plugins (webmentions and sitemap publishing). Website is rebuilt each 4h to update webmentions if any. So it is static, but with semi-dynamic parts.

                    2. 1

                      The Atlantic strangely has a really good XSLT last time I checked.

                    3. 1

                      woohoo! I haven’t used RSS before, so it’s good to get confirmation from someone who has. :) Your blog seems interesting, I can subscribe back too.

                      It seems like a lot of folks have shared their RSS/Atom implementations, presumably those would be a good starting point.