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.
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 }}
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.
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.
I’m going to hijack the convo for a second , 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:
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.