Hugo 0.117 Issues Log

I thought it’d be worth having a thread on issues with 0.117 conversions to help us all get themes up to date and get ready for newer versions of Hugo.

FYI, the issue I had building my site with Hugo 0.117 was this:

failed to extract shortcode: shortcode "bookshop" must be closed or self-closed

Pretty easy to fix. You now can’t have something like:

{{< bookshop ISBNNUMBERHERE >}}

instead it has to be:

{{< bookshop ISBNNUMBERHERE />}}

That got my site building with 0.117 locally. I also noted the warnings on embedded Tweets that don’t have the new two-parameter format. I chose to replace all tweet embeds with screenshots while they’re available since I don’t trust that to stay around.

All in all an easy experience once I downloaded my content and theme locally.

3 Likes

Great idea!

One issue I’ve stumbled upon is the presence of .RSSLink, which has been deprecated for a while and is removed in 0.117. So if there’s code looking like this:

{{ if .RSSLink }}
  <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}">
{{ end }}

it must be replaced, for example, with this:

{{ with .OutputFormats.Get "rss" }}
  {{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end }}

You solved my issue, thanks!

How do you download your content/theme from micro.blog locally? Really interested in that.

Thanks!

Hm, although I have a new issue: when I update to 117, my posts never publish. There are no errors in the log. Downgrading to 93 allows the content to publish.

In the Micro.blog CP, click the ellipses next to your blog name then ExportExport theme and Markdown.

You’ll get an email w/ your content and theme zipped up and then you can run Hugo locally against the unzipped contents.

1 Like

Ah ha, thank you so much!

Hugo changed how it reports errors. Manton is working on it. You should be able to see those issues locally though, now that you know how to download your post content.

1 Like

Ahh that makes sense. Thanks! Very excited to dig in.

I’m going to hijack the convo for a second :smiling_face_with_tear:, sorry

It’s an expected behaviour to have either version of this working only on the homepage?
I noticed it first on my blog, but I then checked a few others and it seems to happen for everyone.

Yes, Hugo’s .OutputFormats (and previously .RSSLink) are context-aware. So on the homepage, you will get the main feed, and on a category page, you will get the feed for that category. And if there are no feeds for a specific page or section, you will get nothing.

If you don’t want context-aware output formats and instead force-fetch the homepage RSS feed, you can do it like this: .Site.Home.OutputFormats.Get "rss". Or harcode the path like this:

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

Got it! Thanks for the quick reply.

I just saw the usage of .URL in a theme which has been deprecated for a while and is no longer available in Hugo 0.117. Use .Permalink or .RelPermalink instead.

Things are looking good now. Thanks to @sod, all the themes have new versions that are compatible with Hugo 0.117.