Skip to main content

Gadget Wisdom

Improving Performance on This Site with a New Widget

In the sidebar of this site, I have links to another affiliated site, Mechdreams, where various keyboard themed items are available for sale. Specifically some posts I made showing off various keyboards I had constructed. I thought it would be nice to have pages for some of my construction, where I could talk about these items.

I did this quickly with the built-in RSS widget in WordPress/ClassicPress, but discovered that despite the fact that it is supposed to cache this information, it was regularly polling my other site, asking for a copy of the latest list. The RSS format is not dead. It is still in use every day, including by me to read sites.

The RSS Widget clearly has not been updated in some time, and could definitely use some enhancements. I decided to write some new widgets to display feeds from different sources. I had a few prerequisites for this project design:

  • No Scraping of Content – I am not going to write code designed to extract anything other than a link preview. This is designed to share related content, not keep people away from those sites.
  • Reasonable Caching – The code should not be constantly polling other sites and should act in a friendly manner
  •  Good Visual Design – The initial version of the code is very simple, but I think I can go beyond over time a simple list.

A link preview is a common web element that shows information about a link, such as title, featured image, or summary.

The sources I’m interested in supporting, in order, are:

  • The WordPress REST API
  • RSS
  • JSONFeed

WordPress REST API

If you are looking to syndicate content from a WordPress or ClassicPress site, the built-in REST API provides data in a format that can easily be interpreted for a single page or a feed. Discoverability for links directly to the REST URL representing a page of posts has been in WordPress for about five years. I contributed the code after a conversation with one of the REST API maintainers some years ago, as I was looking to generate better link previews for a different type of citation.

People don’t seem to think of the WordPress REST API as a feed source, but it is one. And it is the first one I wrote for this project.

RSS/Atom

The RSS protocol is the classic standard for syndication. And it does hold up, although it has its limitations. Depressingly, more and more sites are foregoing offering RSS or Atom feeds, or if they do, actually showing you how to get to them.

JSONFeed

JSONFeed was an attempt by Brent Simmons and Manton Reece to create a syndication format using JSON, as opposed to XML, which is what RSS and Atom use. Most modern APIs use JSON in 2025. While regrettably, JSONFeed never took off, you never know. It is also similar enough to RSS and Atom to make it easy to add.

Future Enhancements

The original RSS widget supported showing the title, date, a summary, and the author. I would like to return to add featured images and better ways to display the information. But for now, the new functionality is there.

Published on October 12, 2025
Categories:

Leave a Reply

Your email address will not be published. Required fields are marked *

Get New Posts By Email