Web Development Curiosities

Hugo Feed Link

Yesterday I wrote about how to customize your Hugo RSS feed so that you have one feed named feed.xml. One other addition you may wish to make is to link to it in your page headers.

It’s simple enough – assuming you’ve made the modifications to make Hugo name your RSS feed “feed.xml”, add the following to your base template somewhere between the <head></head> tags. Obviously there will be a lot more in your page header, but this is simplified for our purposes.

<link rel="alternate" type="application/rss+xml" href='{{ "feed.xml" | absURL }}' />

Now when you view your page source, you’ll see a link to your RSS feed embedded within.

By the way, in case you’re wondering how I did a view source on iPadOS, the answer is a View Source shortcut, which can be found here.

Customizing Hugo RSS Feeds

Yesterday I griped about the way Hugo generates RSS feeds for every section and taxonomy, and how it names them all index.xml. Then, not long after I posted my complaints, I found all the answers I’d been seeking.

First, the default RSS handling in Hugo is weird. Anyone who thinks it’s how RSS should work on a website is … well, let’s just use the word wrong and smile in a friendly manner while we do. But it’s wrong.

The good news is, both of my desired changes, having one RSS feed for my blog posts only and having that feed named feed.xml, are quite simple to achieve. All that’s needed are some minor additions to the site config file and an RSS template.

The list of steps to perform are as follows:

  • Configure the site to have one single RSS feed in the site’s root directory.
  • Configure …

(Read More)

Hugo RSS Feeds

One thing about Hugo that I’m not in love with so far is its default RSS feed handling, which admittedly I most likely don’t fully understand. What I want from my site is specific feeds for specific things, and nothing more. That might sound controlling, but it’s not about that so much as it’s about clarity and organization.

For example, Hugo by default makes an RSS feed for all new content on the site. That means if I create a Contact page or an About page or a Projects page, it gets added into my RSS feed, which seems really stupid it me. Generally people want RSS to follow blog posts or specific topics. That’s what I want too.

In addition to this overall, way too comprehensive feed, Hugo loves to create feeds for every item in every taxonomy type. I don’t want to be rude to whoever decided this was a great idea, but does it really seem likely that anyone wants to follow an RSS feed for tags used in blog posts? …

(Read More)

Serving up Hugo on the Mac

The beauty of the Mac that my Windows-tolerating, Mac-non-understanding friends don’t see is that it runs Unix, and that means it can run everything the entire web is built on and the tools that are used to develop the entire web.

Hugo is no exception. You’re probably not going to want to run production sites from your Mac, but you can get a lot of development work and testing done by running Hugo on a Mac and hacking away at your sites from your local network.

Installing Hugo on macOS is relatively simple using Homebrew.

Homebrew’s marketing technique leaves a bit to be desired:

Homebrew installs the stuff you need that Apple (or your Linux system) didn’t.

Less than convincing, yes, but Homebrew is in fact quite useful. Once Homebrew is installed, getting Hugo on your Mac is just a matter of typing the following in the command line:

brew …

(Read More)

Pair Programming with Hugo

I mentioned in my first post on my new parallel universe version of scottwillsey.com that I am using Hugo to generate the site. And Vic and I joked in our Mr. Robot Season 4 podcast on BubbleSort TV that we are now pair programming buddies. Truth is, I have worked a lot with Vic on both the BubbleSort sites and server and on Hugo in general, learning what I needed in order to build this site and prepare for some future projects.

Hugo has a lot of what you need to make a full-featured website built in. It’s highly customizable, and it’s not hard to learn. Like anything, it does take a little time and digging to uncover some of its nuances.

One of the things I’m working on right now is customizing the RSS feeds for the site so I can start linking to them and people can start using them. By …

(Read More)