I was able to reproduce the problem. As noted above, substack serves the feeds with content-type “application/xml”. Add this to your site configuration:
[mediaTypes."application/xml"]
suffixes = ["rss"]
Some of the feeds you’re visiting (e.g., https://nitter.poast.org/tworepcave/rss
) refuse the connection, causing the build to fail. Change your shortcode to emit a warning instead:
{{ with .Get "url" }}
{{ with resources.GetRemote . }}
{{ with .Err }}
{{ warnf "%s" . }}
{{ else }}
{{ with .Content | transform.Unmarshal }}
{{ with .channel.item }}
{{ range first 1 . }}
{{ with .pubDate }}
{{ dateFormat "2006-01-02" . }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
With so many resources.GetRemote
calls, you may want to increase the build time-out in your site configuration:
timeout = '10m'