Blogroll

By chimo on (updated on )

I've added a "blogroll" section at the bottom of my blog posts ("Recent articles from blogs I follow"). This post describes how it's implemented.

The heavy-lifting is done by openring. Paraphrasing the README:

It will fetch the latest 3 articles from among your sources, pass them to a template and write the output a file of your choosing. Then you can include this file with your static site generator's normal file include mechanism.

In my case, the interesting part (to me) is how I pass my list of sources to openring. As a prerequisite, I setup a "Blogroll" category in my miniflux instance. Then, at hugo build-time, I call the "Get Category Feeds" API endpoint, extract the "feed_url" properties and pass those to openring. The complete build script is available in my git repository for this blog.