Blog: Jeremy Warner
Jeremy Warner's Blog
Posts
Categories
Tags
Jeremy Warner's Blog
Posts
Categories
Tags
  • Atom Feed

Atom Feed

I took a few minutes today to get an atom feed set up on the blog. It was fairly straightforward, though I had a bit of work to do to properly configure the feed filters. I figured I would document what I did here in case it's helpful.

Since I'm using VuePress, I grabbed the VuePress feed plugin. Installation was straightforward.

However, I found that the default filters were pulling in more than I wanted - in particular the get-started.md file that I'm leaving around for reference. I also added a frontmatter 'archive' property as a simple way to ignore pages, and I wanted the feed's filter to honor that as well. After a bit of tinkering, this is what I ended up with:

feedPlugin({
      hostname: "https://jeremywarner.net",
      atom: true,
      count: 10,
      devServer: true,
      filter: ({ frontmatter, filePathRelative }) =>
        (frontmatter.feed ?? true) &&
        !(frontmatter.archive ?? false) &&
        frontmatter.layout == null &&
        filePathRelative != "get-started.md",
    }),

Not particularly elegant, but easy enough to understand in 6 months when I've forgotten exactly why it's configured this way.

Last Updated:: 5/5/25, 3:16 AM
Contributors: Jeremy Warner